-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: switch Node.js toolchain to derive version from .nvmrc. [main] #32575
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
Merged
+27
−14
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we updating the
pnpmversion as well? If we just use the default, it still runs the version we define in our package.json anyway and then we don't have to maintain another location and keep them in sync.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it? The default is
pnpmversion 8 is rules node.js and is not auto inferred from the engines field.https://github.com/angular/components/pull/32575/changes#diff-ae888452fd6b0b69f2f29dd1e29430c0f3f59f8b68b313f120b62b855c5f9fe0L418
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did automate the syncing part:
https://github.com/angular/dev-infra/pull/3340/changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are going to start inferring the
nodeversion from.nvmrcwhy not inferpnpmfrompackageManagerinpackage.json?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two problems with that.
1: rules_js doesn’t have a full list of pnpm versions (currently the latest available is 10.21.0)
2. Whenever we cut a release we need to also update the bazel lock file, because the hash of the contents of the package.json that is in the bazel lock file will be invalidated.
Same problems/approach we use the TS versions.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is true for node version as well, and I think it might be a limitation we can accept.
If this is happening in multiple places now, maybe we should just update the bazel lock file during release. It seems more straightforward to do this one update than us having to set up of multiple pieces of tooling to update and monitor the versions.
What do you think?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will still not be enough, since rules_ts/rules_js doesn’t check available version of “pnpm” and “typescript”, on NPM but against an internal list. The integrity value needs to be passed explicitly.
https://github.com/aspect-build/rules_js/blob/main/npm/private/versions.bzl
https://github.com/aspect-build/rules_ts/blob/main/ts/private/versions.bzl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to drop the last commit if you want to discuss this more after the break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we merge this as it is and we can have this discussion within the tooling pull request in dev-infra where the management of the versions would actually be handled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM