-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Circular dependencies detection do not exclude tests in buildable libraries #9645
Comments
Any update? |
Updated the example repo to the 14.1.4, the error still remaining....
@AgentEnder can you give me some updates on this? |
Found a solution, you can use the implicitDependencies configuration to ignore dependencies. |
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. |
Up this |
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. |
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. |
Current Behavior
I can't build a buildable library because NX is detecting wrong circular dependecies.
I have two buildable libraries in a project, the first library creates a value object to make a date inmutable, the second library generates random instance of the first library (for test purpouses).
I write a test for the first library, in this test, I import the second library and the tests works properly but if I try to build the application I get a circular dependency error.
However, if I build the library using the command
npx tsc --project libs\shared\domain\timestamp\tsconfig.lib.json
the library builds without no problem and no circular dependencies.This is the current dep graph of the application:
I think the problem comes from the dependency detection, he should ignore the test files.
Expected Behavior
I should be able to build the library without a circular dependency error.
Steps to Reproduce
I have created a repo with the example https://github.com/abrahamsaanchez/circular-dependencies
Failure Logs
> NX Could not execute shared/domain/timestamp:build because it has a circular dependency
Environment
The text was updated successfully, but these errors were encountered: