-
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
fix(js): filter project dependencies when calculating topological ordering #26491
fix(js): filter project dependencies when calculating topological ordering #26491
Conversation
…ering For each project being sorted, only its dependent projects must be processed.
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 18df41b. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @mpsanchis, please can you add a unit test in packages/js/src/generators/release-version/utils/sort-projects-topologically.spec.ts
that demonstrates the behavior you are addressing here (i.e. it should fail before your change, and pass afterwards)
Hi @JamesHenry |
Thank you, please remove the indirection/abstraction from the tests (i.e. do not generate the project graph data dynamically). It will be a lot more lines of code (but still not a crazy amount), but a lot simpler to read which is the priority with tests |
78a8508
to
d48cb41
Compare
@mpsanchis Thank you this LGTM, I pushed a commit which greatly reduces the churn in test file and keeps things inline. I always prefer to keep additions of tests covering new behaviour separate from refactoring of existing tests where possible https://github.com/nrwl/nx/pull/26491/files#diff-dd7e8070cc17859170fab8e1ff1d38ce36fa3e1bf5cc0ec7928b7d7d0a117480 |
Thanks again @mpsanchis! |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Topological ordering of projects in the graph, used when calculating versions with
@nx/js:release-version
, has a bug. Projects are not sorted topologically correctly, leading to unexpected versioning behaviour.Fixes #26490