-
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
feat: update node toolchain to provide File objects #3736
Conversation
b5deb51
to
af4c47b
Compare
4a920ff
to
5d7875c
Compare
LGTM, but if we are avoiding breaking changes how will other rulesets take advantage of this? Especially if we still want to support the |
rules_js will need to be both backward and forward compatible; preferring the Files in the provider over the paths if they are there. Can't have your cake and eat it too without breaking changes. |
In the future when we drop WORKSPACE support here and in rules_js then all of this is unwound and removed. I'm hoping to be bzlmod only in all of our rule sets after Bazel 8 is released. |
5d7875c
to
a52820d
Compare
a52820d
to
450ea73
Compare
To-date the node toolchain has provided paths (strings) to node and npm. This complicates downstream usage as they need to convert these paths depending on they are used (between execpath and rootpath for example). This change configures the toolchain to also provide File objects for node and the npm entry point script so downsteam uses can choose to get either the
.path
or.short_path
as needed.Deprecates
target_tool
andtarget_tool_path
parameters. Maintains backward compat by setting bothtarget_tool_path
andtool_files
in the provider.PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?