From 740f4e5609253822ad5ce7491e9a18514a3d97af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sun, 24 Oct 2021 14:52:19 +0200 Subject: [PATCH] Enforce with constraints --- constraints.pro | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/constraints.pro b/constraints.pro index bf68e9d7fca4..738b3c65bddb 100644 --- a/constraints.pro +++ b/constraints.pro @@ -4,6 +4,12 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'workspace:*', 'devDepend % Only consider dependency ranges that start with 'workspace:' atom_concat('workspace:', _, DependencyRange). +% Enforces that all workspaces depend on other workspaces using `workspace:^` in dependencies +gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'workspace:^', 'dependencies') :- + workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, 'dependencies'), + % Only consider dependency ranges that start with 'workspace:' + atom_concat('workspace:', _, DependencyRange). + % Enforces the license in all public workspaces while removing it from private workspaces gen_enforced_field(WorkspaceCwd, 'license', 'MIT') :- \+ workspace_field(WorkspaceCwd, 'private', true).