-
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
@nx/js:tsc executor is required for implicitDependencies in batch mode #28839
Comments
cogwirrel
added a commit
to cogwirrel/nx
that referenced
this issue
Nov 8, 2024
Implicit dependencies are not referenced in code and therefore TSC incremental builds are not applicable closed nrwl#28839
cogwirrel
added a commit
to cogwirrel/nx
that referenced
this issue
Nov 8, 2024
Implicit dependencies are not referenced in code and therefore TSC incremental builds are not applicable closed nrwl#28839
cogwirrel
added a commit
to cogwirrel/nx
that referenced
this issue
Nov 8, 2024
Implicit dependencies are not referenced in code and therefore TSC incremental builds are not applicable closed nrwl#28839
cogwirrel
added a commit
to cogwirrel/nx
that referenced
this issue
Nov 8, 2024
Implicit dependencies are not referenced in code and therefore TSC incremental builds are not applicable closed nrwl#28839
cogwirrel
added a commit
to cogwirrel/nx
that referenced
this issue
Nov 14, 2024
Implicit dependencies are not referenced in code and therefore TSC incremental builds are not applicable closed nrwl#28839
leosvelperez
pushed a commit
that referenced
this issue
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
FrozenPandaz
pushed a commit
that referenced
this issue
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)
4 tasks
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Current Behavior
When I create a workspace with both a TypeScript and Python project, with the TypeScript project having an implicit dependency on the Python one, the TypeScript project fails to compile in batch mode with the error:
Expected Behavior
The
@nx/js:tsc
executor should not attempt to incrementally build implicit dependencies, since this indicates there isn't an explicit reference in code, and therefore incremental builds withtsc
aren't applicable.GitHub Repo
https://github.com/cogwirrel/nx-tsc-batch-implicit-deps-example
Steps to Reproduce
pnpm install
pnpm nx run-many --target build --batch --all --verbose
Alternatively set up from scratch:
pnpm dlx create-nx-workspace --preset=ts --ci=skip
pnpm exec nx generate @nx/js:library --directory=packages/my-js-lib --bundler=tsc --linter=none --name=my-js-lib --unitTestRunner=none --no-interactive
packages/my-js-lib/project.json
Nx Report
Failure Logs
Package Manager Version
pnpm 9.12.3
Operating System
Additional Information
I believe it should work as expected if the following filters out tasks for projects which are implicit dependencies:
nx/packages/js/src/executors/tsc/lib/get-tsconfig.ts
Lines 101 to 109 in 6882ad1
The text was updated successfully, but these errors were encountered: