cli: throw error if running x64 node on mac arm64 #14288
Merged
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.
https://docs.google.com/document/d/1hEt6q0BlZ1c50UNhm9ejXNKLvcOX8pStspCY6hAKwDI/edit# (can just read the most recent update, pasted below).
This PR fixes (well, at least warns about)
yarn smoke perf-preload
on my machine.For pretty much any CLI invocation – (spawning chrome from my x64 Node install...apparently 14.20 is only distributed as x64 via nvm. arm64 only became a thing sometime in 15.x) – Chrome would get "translated" to some weird hybrid x64->arm64 binary (even tho the Chrome install is already arm64?!). That resulted in ~10x perf regressions all throughout Chrome. Any test that was perf-sensitive ... like
perf-preload
... was bound to fail.Initially I sought to grab the arch from Browser.getVersion, but it isn't exposed there. And what chrome://version uses is not easily exposable to CDP. So let's just detect the case where we know Rosetta would kick in - from an x64 node binary running on mac arm64.