From 04c40512a0aa3105cb98dd60302de92d587e04a9 Mon Sep 17 00:00:00 2001 From: ciclentfort <58112343+ciclentfort@users.noreply.github.com> Date: Wed, 19 Feb 2020 09:25:46 +0000 Subject: [PATCH] Use correct API The current example does not work because the used function is never called. --- packages/gatsby/content/features/constraints.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/gatsby/content/features/constraints.md b/packages/gatsby/content/features/constraints.md index 6d32822cce9b..fc9ce85151ef 100644 --- a/packages/gatsby/content/features/constraints.md +++ b/packages/gatsby/content/features/constraints.md @@ -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