You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A depConstraint defined as { "sourceTag": "scope:projectA", "onlyDependOnLibsWithTags": [] }
pass linting even if the project with tag "scope:projectA" depends on other projects with tags.
Expected Behavior
Linting should fail if projectA depends on other projects and the defined constraint shows an empty array for the property "onlyDependOnLibsWithTags".
I dig into the code and I've seen that version 13.8.5 was the last working version with the expected behavior.
I guess this PR introduced the change of behavior: #8633
Steps to Reproduce
create new nx workspace with npx create-nx-workspace (angular preset, scss and no Nx cloud)
create first lib: npx nx g @nrwl/angular:lib projectA --tags "scope:projectA"
create second lib: npx nx g @nrwl/angular:lib projectB --tags "scope:projectB"
replace the default depConstraint in the root .eslintrc.json with
What is the intention if "onlyDependOnLibsWithTags" is an empty array? In my interpretation it says that the project with the defined tag can't depend on other projects (if you can say 'depend on anything with "*"'). It may refer to #11236
Thank you for reviewing!
The text was updated successfully, but these errors were encountered:
This only functioned in the past because there was an error. The onlyDependOnLibsWithTags was never designed to be empty. But it makes sense. The behavior, in that case, would be:
A package that onlyDependsOnLibsWithTags: [] can only depend on libs that have no tags.
We do strongly discourage having projects with no tags, as it can lead to a lot of different issues and the whole rule starts to lose its purpose. But for the sake of feature completeness, we will add the above-mentioned logic to empty onlyDependOnLibsWithTags.
Current Behavior
A depConstraint defined as
{ "sourceTag": "scope:projectA", "onlyDependOnLibsWithTags": [] }
pass linting even if the project with tag "scope:projectA" depends on other projects with tags.
Expected Behavior
Linting should fail if projectA depends on other projects and the defined constraint shows an empty array for the property "onlyDependOnLibsWithTags".
I dig into the code and I've seen that version 13.8.5 was the last working version with the expected behavior.
I guess this PR introduced the change of behavior: #8633
Steps to Reproduce
npx create-nx-workspace
(angular preset, scss and no Nx cloud)npx nx g @nrwl/angular:lib projectA --tags "scope:projectA"
npx nx g @nrwl/angular:lib projectB --tags "scope:projectB"
Environment
What is the intention if "onlyDependOnLibsWithTags" is an empty array? In my interpretation it says that the project with the defined tag can't depend on other projects (if you can say 'depend on anything with "*"'). It may refer to #11236
Thank you for reviewing!
The text was updated successfully, but these errors were encountered: