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): skip tsc batch builds for implicit dependencies #28840

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

cogwirrel
Copy link
Contributor

Implicit dependencies are not referenced in code and therefore TSC incremental builds are not applicable.

Current Behavior

A project using the @nx/js:tsc executor will fail to build if it has implicit dependencies on projects which do not use the @nx/js:tsc executor.

To reproduce:

Expected Behavior

  • Implicit dependencies that do not use the @nx/js:tsc executor are permitted. For example, a TypeScript project may implicitly depend on a Python project, but the TypeScript project should still be buildable in batch mode.
  • Projects using the @nx/js:tsc executor will still fail to build if they have explicit dependencies on projects which do not use the @nx/js:tsc executor.

Tested by publishing to the local registry, upgrading the example repo to use my local version, and built successfully in batch mode.

Related Issue(s)

Fixes #28839

Copy link

vercel bot commented Nov 8, 2024

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

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Nov 14, 2024 1:10am

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.

Thanks for the contribution!

It looks good to me in general. I just left a comment with a grammar change. Please remember to run pnpm documentation to re-generate the docs.

packages/js/docs/tsc-examples.md Outdated Show resolved Hide resolved
docs/shared/recipes/enable-tsc-batch-mode.md Outdated Show resolved Hide resolved
Implicit dependencies are not referenced in code and therefore TSC incremental builds are not
applicable

closed nrwl#28839
@cogwirrel
Copy link
Contributor Author

Thanks for the contribution!

It looks good to me in general. I just left a comment with a grammar change. Please remember to run pnpm documentation to re-generate the docs.

Thanks so much for the review! I've updated the wording in the docs :)

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 enabled auto-merge (squash) November 14, 2024 07:22
@leosvelperez leosvelperez merged commit e32079c into nrwl:master Nov 14, 2024
6 checks passed
FrozenPandaz pushed a commit that referenced this pull request Nov 14, 2024
Implicit dependencies are not referenced in code and therefore TSC
incremental builds are not applicable.

## Current Behavior
A project using the `@nx/js:tsc` executor will fail to build if it has
implicit dependencies on projects which do not use the `@nx/js:tsc`
executor.

To reproduce:
* Clone https://github.com/cogwirrel/nx-tsc-batch-implicit-deps-example
* `pnpm i && pnpm nx run-many --target build --batch --all`

## Expected Behavior
- Implicit dependencies that do not use the `@nx/js:tsc` executor are
permitted. For example, a TypeScript project may implicitly depend on a
Python project, but the TypeScript project should still be buildable in
batch mode.
- Projects using the `@nx/js:tsc` executor will still fail to build if
they have explicit dependencies on projects which do not use the
`@nx/js:tsc` executor.

Tested by publishing to the local registry, upgrading the [example
repo](https://github.com/cogwirrel/nx-tsc-batch-implicit-deps-example)
to use my local version, and built successfully in batch mode.

## Related Issue(s)
Fixes #28839

(cherry picked from commit e32079c)
@cogwirrel cogwirrel deleted the fix/tsc-batch-implicit-deps branch November 18, 2024 00:21
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.

@nx/js:tsc executor is required for implicitDependencies in batch mode
2 participants