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

fix(js): only add typescript project references for explicit dependencies in sync generator #28998

Merged
merged 15 commits into from
Jan 7, 2025

Conversation

cogwirrel
Copy link
Contributor

This change omits references to implicit dependency tsconfigs for typescript projects in the sync generator, since given that they are not referenced directly in code there is no need for project references.

Current Behavior

TypeScript sync generator adds references to any dependency project which has a tsconfig (where composite is true), including implicit dependencies where these references are unnecessary and can potentially cause build failures.

See example repo.

Expected Behavior

Only explicit dependencies should be referenced in tsconfigs.

Related Issue(s)

Fixes #28997

…cies in sync generator

This change omits references to implicit dependency tsconfigs for typescript projects in the sync
generator, since given that they are not referenced directly in code there is no need for project
references.

Fixes nrwl#28997
@cogwirrel cogwirrel requested a review from a team as a code owner November 19, 2024 23:12
@cogwirrel cogwirrel requested a review from Coly010 November 19, 2024 23:12
Copy link

vercel bot commented Nov 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Jan 7, 2025 8:57am

Copy link

nx-cloud bot commented Nov 19, 2024

View your CI Pipeline Execution ↗ for commit 2bdf541.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 40m 29s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m 4s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx format:check --base=68b29... ✅ Succeeded 19s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 18s View ↗
nx documentation --no-dte ✅ Succeeded 41s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-07 09:35:14 UTC

@adrian-operatorai
Copy link

@Coly010 @leosvelperez - Any updates on this one? I am currently blocked on upgrading NX due to this :(

…itly referenced in code

Co-authored-by: Leosvel Pérez Espinosa <[email protected]>
@cogwirrel cogwirrel force-pushed the fix/sync-generator-implicit-deps branch from 7f7a544 to 0f4c0bb Compare December 16, 2024 13:45
Copy link

nx-cloud bot commented Dec 18, 2024

Your CI Pipeline Execution ↗ for commit a830aee is in progress ⏳

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ❌ Failed 38m 44s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded <1s View ↗
nx-cloud record -- nx format:check --base=73735... ✅ Succeeded 22s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 20s View ↗
nx documentation --no-dte ✅ Succeeded 45s View ↗

☁️ Nx Cloud last updated this comment at 2024-12-18 10:28:32 UTC

@leosvelperez leosvelperez requested review from a team as code owners December 20, 2024 13:40
Copy link
Member

@leosvelperez leosvelperez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@leosvelperez leosvelperez merged commit 9e78142 into nrwl:master Jan 7, 2025
6 checks passed
FrozenPandaz pushed a commit that referenced this pull request Jan 7, 2025
…cies in sync generator (#28998)

This change omits references to implicit dependency tsconfigs for
typescript projects in the sync generator, since given that they are not
referenced directly in code there is no need for project references.

## Current Behavior
TypeScript sync generator adds references to any dependency project
which has a tsconfig (where composite is true), including implicit
dependencies where these references are unnecessary and can potentially
cause build failures.

See [example
repo](https://github.com/cogwirrel/nx-sync-generator-implicit-deps-example).

## Expected Behavior
Only explicit dependencies should be referenced in tsconfigs.

## Related Issue(s)
Fixes #28997

---------

Co-authored-by: Leosvel Pérez Espinosa <[email protected]>
(cherry picked from commit 9e78142)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sync] typescript-sync generator adds project references for implicit dependencies
4 participants