-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Fixed #3588 to use darwin-x64 for all node < 16.0.0 #3709
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
Open
Rahulbeniwal26119
wants to merge
1
commit into
nvm-sh:master
Choose a base branch
from
Rahulbeniwal26119:fallback-to-x64-for-darwin-node-versions-less-than-16
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+27
−9
Open
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
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
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.
i'm confused; this means that ^14.17 won't install directly on M* macs anymore.
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.
Hi @ljharb, the above check is used to set the x64 binary for all Macs running versions < 14.17.0, and for versions between 15 and 16. That’s why versions like 14.21.3 weren’t following this logic.
So either we can download the x64 binary for any version < 16, which would include 14.21.3 or, as you suggested here:
#3588 (comment)
I can add logic first to attempt downloading the ARM binary and use the x64 binary as a fallback. However, if we do this, I would also suggest removing the entire condition:
As we discussed for <16, there are no arm64 binaries. Please let me know which way is right.
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.
https://nodejs.org/dist/v14.18.0/ seems to have an arm binary listed?
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.
Sorry, but this condition is for only arm64 + darwin. There is also an inner if condition after this
Let me combine these two so that it will be much more readable.
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.
Installation Logs.
➜ nvm git:(fallback-to-x64-for-darwin-node-versions-less-than-16) source ./nvm.sh && nvm install 16.11.0
Downloading and installing node v16.11.0...
Downloading https://nodejs.org/dist/v16.11.0/node-v16.11.0-darwin-arm64.tar.xz...
######################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v16.11.0 (npm v8.0.0)
➜ nvm git:(fallback-to-x64-for-darwin-node-versions-less-than-16) source ./nvm.sh && nvm install 10.0.0
Downloading and installing node v10.0.0...
Downloading https://nodejs.org/dist/v10.0.0/node-v10.0.0-darwin-x64.tar.xz...
######################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v10.0.0 (npm v5.6.0)
➜ nvm git:(fallback-to-x64-for-darwin-node-versions-less-than-16) source ./nvm.sh && nvm install 14
Downloading and installing node v14.21.3...
Local cache found: ${NVM_DIR}/.cache/bin/node-v14.21.3-darwin-x64/node-v14.21.3-darwin-x64.tar.xz
Checksums match! Using existing downloaded archive ${NVM_DIR}/.cache/bin/node-v14.21.3-darwin-x64/node-v14.21.3-darwin-x64.tar.xz
Now using node v14.21.3 (npm v6.14.18)