-
Notifications
You must be signed in to change notification settings - Fork 522
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
enable linker with nodejs_binary #1382
Comments
Making nodejs_binary use the linkerProblemCurrently nodejs_binary makes use of a node_modules within Unfortunately this strategy does not always work as expected in practice. Many libraries are written with the expectation of a directory layout that mirrors the node module resolution algorithm. Even Angular's own SolutionRather than making custom patches or PRs for every library which has such an expectation, we instead would rather just provide the directory structure that programs expect to ensure maximum compatibility with execution under bazel Hooking up the linkerTaking First and foremost we need to do something similar to what
So assuming we extract the module manifest creation logic to a helper function and call it directly, we then need to add its location to our generated The current strategy for adding file locations to our runner script is via the use of If the templated variable is populated, we need only to set Setting the right executableHooking up the linker is not sufficient however. We need to ensure that the binary we are executing is the one that is linked to
Hopefully I'm not missing something, but I think that should be all the steps! |
Maybe we can change the behavior with a flag, and set that flag from all the generated binaries and tests that generate_build_files produces for npm bin - that could still make 1.0 in theory |
- nodejs_binary and nodejs_test will always produce a modules manifest needed by the linker - if the program isn't run with a user-specific linker manifest, we use the static one as a default - always pass the flag to opt-out of custom module resolver for generated rules Fixes bazel-contrib#1382
- nodejs_binary and nodejs_test will always produce a modules manifest needed by the linker - if the program isn't run with a user-specific linker manifest, we use the static one as a default - always pass the flag to opt-out of custom module resolver for generated rules Fixes bazel-contrib#1382
- nodejs_binary and nodejs_test will always produce a modules manifest needed by the linker - if the program isn't run with a user-specific linker manifest, we use the static one as a default - always pass the flag to opt-out of custom module resolver for generated rules Fixes bazel-contrib#1382
- nodejs_binary and nodejs_test will always produce a modules manifest needed by the linker - if the program isn't run with a user-specific linker manifest, we use the static one as a default - always pass the flag to opt-out of custom module resolver for generated rules Fixes bazel-contrib#1382
- nodejs_binary and nodejs_test will always produce a modules manifest needed by the linker - if the program isn't run with a user-specific linker manifest, we use the static one as a default - always pass the flag to opt-out of custom module resolver for generated rules Fixes bazel-contrib#1382
🚀 feature request
Tracking enabling the linker with
nodejs_binary
The text was updated successfully, but these errors were encountered: