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_points
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. 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