Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for notDependOnLibsWithTags like onlyDependOnLibsWithTags #984

Closed
xmlking opened this issue Jan 8, 2019 · 12 comments · Fixed by #8633
Closed

add support for notDependOnLibsWithTags like onlyDependOnLibsWithTags #984

xmlking opened this issue Jan 8, 2019 · 12 comments · Fixed by #8633
Labels

Comments

@xmlking
Copy link
Contributor

xmlking commented Jan 8, 2019

Please make sure you have read the submission guidelines before posting an issue

Prerequisites

Expected Behavior

Today we cannot define all nx-enforce-module-boundaries with onlyDependOnLibsWithTags . Would be nice to have notDependOnLibsWithTags DSL to express forbid cases.

e.g.,
lazy loaded modules should not have dependency on eager loaded modules but can depend on shared modules

Current Behavior

What is the current behavior?
we only have onlyDependOnLibsWithTags and it is limited to express more specific rules.

Version

nx v.3.0

@maxime1992
Copy link

I find the onlyDependOnLibsWithTags quite restrictive too and I'm having a hard time trying to set some rules. notDependOnLibsWithTags would really be helpful :)

@vsavkin vsavkin added the scope: core core nx functionality label Dec 4, 2019
@kkuriata
Copy link

Yes, please add this prop!

@github-actions github-actions bot added the stale label May 29, 2020
@nrwl nrwl deleted a comment from github-actions bot May 29, 2020
@FrozenPandaz
Copy link
Collaborator

Hi, sorry about this.

This was mislabeled as stale. We are testing ways to mark not reproducible issues as stale so that we can focus on actionable items but our initial experiment was too broad and unintentionally labeled this issue as stale.

@github-actions
Copy link

github-actions bot commented Feb 3, 2021

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Feb 3, 2021
@maxime1992
Copy link

Keep active.

@github-actions github-actions bot removed the stale label Feb 5, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Mar 29, 2021
@zbarbuto
Copy link

Not stale. Still a feature I would like.

@github-actions github-actions bot removed the stale label Mar 29, 2021
@jaytavares
Copy link
Contributor

jaytavares commented May 4, 2021

This feature is needed. It's pretty limiting/cumbersome if we only have onlyDependOnLibsWithTags at our disposal. We really need the inverse as well. It's actually pretty odd that we don't already have notDependOnLibsWithTags considering that in Nrwl's official "Enterprise Angular Monorepo Patterns" book, all the constraints are described in terms of what apps/libs cannot depend on:

(from page 26)

Built-in Constraints on Libraries

The following invariants should hold true:

  1. a lib cannot depend on an app
  2. an app-specific library cannot depend on a lib from another app (e.g., "safe/" can only depend on libs from "safe/" or shared libs)
  3. a shared library cannot depend on on a app-specific lib (e.g., "common-ui/" cannot depend on "safe/")
  4. a ui library cannot depend on a feature library, or a data-access library.
  5. a utils library cannot depend on a feature library, data-access library, or a component library.
  6. a data-access library cannot depend on a feature library, or a component library.
  7. a project cannot have circular dependencies
  8. a project that lazy loads another project cannot import it directly.

@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Jan 10, 2022
@jaytavares
Copy link
Contributor

Not stale. I actually wrote an implementation of this rule on my fork; however, I discovered that we'll probably want to traverse the project graph to ensure no dependencies of dependencies have the disallowed tags. I'll try to find some time to finish that soon.

@jaytavares
Copy link
Contributor

jaytavares commented Jan 21, 2022

See #8633 for my implementation of this. Feedback appreciated.

jaytavares added a commit to CurioVision/nx that referenced this issue Feb 2, 2022
meeroslav pushed a commit to meeroslav/nx that referenced this issue Mar 4, 2022
meeroslav pushed a commit to meeroslav/nx that referenced this issue Mar 4, 2022
meeroslav pushed a commit to CurioVision/nx that referenced this issue Mar 4, 2022
meeroslav pushed a commit to CurioVision/nx that referenced this issue Mar 4, 2022
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
7 participants