Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/gatsby/content/features/constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ We define a rule that says that for each dependency of each workspace in our pro
### Prevent two workspaces from depending on conflicting versions of a same dependency

```prolog
gen_invalid_dependency(WorkspaceCwd, DependencyIdent, DependencyType, 'This dependency conflicts with another one from another workspace') :-
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyType, _) :-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType),
workspace_has_dependency(_, DependencyIdent, DependencyRange2, _),
DependencyRange \= DependencyRange2.
```

We define a `gen_invalid_dependency` rule that is true for each dependency of each package (first `workspace_has_dependency`) if it also exists another dependency of another package (second `workspace_has_dependency`) that has the same name but a different range (`\=` operator).
We define a `gen_enforced_dependency` rule that is true for each dependency of each package (first `workspace_has_dependency`) if it also exists another dependency of another package (second `workspace_has_dependency`) that has the same name but a different range (`\=` operator).

### Force all workspace dependencies to be made explicit

Expand Down