-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(builtin): look in the execroot for nodejs_binary source entry_poi…
…nts (#1816) In a6e29c2 we added support for generated entry_point by adding a secondary lookup. In 863c7de we reversed the order of the lookups to make rollup work in a certain use case. Neither of these was principled, because we know ahead of time whether the entry_point is generated. We can use a single lookup. However that depends on running the linker on all generated bin rules, which is a breaking change, so for now we just defer the FS check until after the linker runs. This also makes sure that programs run in the location where the linker will put them (note that the logic in question runs before the linker has created the node_modules directory in the execroot.) This is why #1787 observes that some node programs were broken - we were running the entry point as bazel-out/host/bin/external/npm/@graphql-codegen/cli/bin/graphql-codegen.sh.runfiles/npm/node_modules/@graphql-codegen/cli/bin.js when it should have been node_modules/@graphql-codegen/cli/bin.js Fixes #1787
- Loading branch information
Showing
2 changed files
with
17 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters