Skip to content

Help with writing "no carets in DependencyRange" constraint #3570

Answered by merceyz
jtoar asked this question in Q&A
Discussion options

You must be logged in to vote

The query you included doesn't seem to match what you ran as you're missing a DependencyIdent so you should be getting this error

$ yarn constraints query "workspace_has_dependency(WorkspaceCwd, DependencyRange, DependencyType), atom_concat('^', _, DependencyRange)"
➤ YN0044: Existence error: procedure workspace_has_dependency/3 not found (in top_level/0)
➤ YN0000: Failed with errors in 0s 118ms

Ignoring that, you need to store the result from atom_concat to an atom that gen_enforced_dependency can use to set the new range

gen_enforced_dependency(WorkspaceCwd, DependencyIdent, TargetDependencyRange, DependencyType) :-
  workspace_has_dependency(WorkspaceCwd, DependencyIdent, CurrentDepen…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jtoar
Comment options

Answer selected by jtoar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants