fix: route runfiles of js_library/JsInfo 1p linked dep through npm_package_store and npm_link_package_store #2027
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solves the following case: jfirebaugh/rules_ts@d0e8522.
Failure in that minimal repro is:
The fix is to pipe runfiles through
npm_package_store
andnpm_link_package_store
so they make it down the chain ofjs_library
->npm_package_store
->npm_link_package_store
to binaries depending on thenpm_link_package_store
(the:node_modules/foo
target).For reference, the rules in the minimal repro look like this:
//examples/js_lib_pkg/b:node_modules/js_lib_pkg_a
is anpm_link_package_store
who'ssrc
is//examples:.aspect_rules_js/node_modules/js_lib_pkg_a@0.0.0
://examples:.aspect_rules_js/node_modules/js_lib_pkg_a@0.0.0
is annpm_link_package_store
who's src is//examples/js_lib_pkg/a:pkg
:and finally
//examples/js_lib_pkg/a:pkg
is thejs_library
being linked tonode_modules/js_lib_pkg_a
: