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

nodejs_test does not collect the JSNamedModuleInfo from deps with 2.0.0-rc.0 #1998

Closed
lukasholzer opened this issue Jul 3, 2020 · 0 comments

Comments

@lukasholzer
Copy link
Collaborator

🐞 bug report

Affected Rule

nodejs_test Rule is affected

Description

If I have a dependency to a ng_module rule from the @angular/bazel repository (as in the examples/angular_view_engine) and I'm using the nodejs_test rule to run my jest tests with it previously went smoothly with version 1.6.0 it symlinked all the compiled output to the test.sh.runfiles folder. With the new version, it does only link the Typings as they are in the declaration provider and the JSModuleInfo provider. To be backwards compatible I would suggest collecting still the JSNamedModuleInfo provider for nodejs_test dependencies.

Otherwise, I have to write a rule that collects the JSNamedModuleInfo from my dependencies and passes them with a DefaultInfo provider to the nodejs_test which is quite cumbersome.

🔬 Minimal Reproduction

Go to the examples/angular_view_engine/src/app/hello-world/BUILD.bazel and add a nodejs_test rule that is consuming the ng_module from the bazel package. (The karma_web_test_suite still collects the JSNamedModuleInfo from the dependencies). packages/karma/karma_web_test.bzl#L217

🌍 Your Environment

Operating System:

MacOsX

Output of bazel version:

3.2.0

Rules_nodejs version:

2.0.0-rc.0

lukasholzer pushed a commit to lukasholzer/rules_nodejs that referenced this issue Jul 3, 2020
To be backwards compatible with earlier versions still support the `JSNamedModuleInfo` provider for nodejs_binary dependencies along with the new `JSModuleInfo`.

This should help dependencies to transition to the new provider without having to patch it.

Fixes bazel-contrib#1998
lukasholzer pushed a commit to lukasholzer/rules_nodejs that referenced this issue Jul 3, 2020
To be backwards compatible with earlier versions still support the `JSNamedModuleInfo` provider for nodejs_binary dependencies along with the new `JSModuleInfo`.

This should help dependencies to transition to the new provider without having to patch it.

Fixes bazel-contrib#1998
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

No branches or pull requests

1 participant