-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 'yarn setup' on M1 Macs (#11887)
There are a few issues encountered when running `yarn setup` on new Apple Silicon (aka M1, aka arm64) Macs: * The script halts when attempting to run the install step for the `chromedriver` package with the message "Only Mac 64 bits supported". This is somewhat misleading as it seems to indicate that chromedriver can only be installed on a 64-bit Mac. However, what I think is happening is that the installation script for `chromedriver` is not able to detect that an arm64 CPU *is* a 64-bit CPU. After looking through the `chromedriver` repo, it appears that 87.0.1 is the first version that adds a proper check ([1]). Note that upgrading chromedriver caused the Chrome-specific tests to fail intermittently on CI. I was not able to 100% work out the reason for this, but ensuring that X (which provides a way for Chrome to run in a GUI setting from the command line) is available seems to fix these issues. * The script also halts when attempting to run the install step for the `electron` package. This happens because for the version of `electron` we are using (9.4.2), there is no available binary for arm64. It appears that Electron 11.x was the first version to support arm64 Macs ([2]). This is a bit trickier to resolve because we don't explicitly rely on `electron` — that's brought in by `react-devtools`. The first version of `react-devtools` that relies on `electron` 11.x is 4.11.0 ([3]). [1]: giggio/node-chromedriver@469dd0a [2]: https://www.electronjs.org/blog/apple-silicon [3]: https://github.com/facebook/react/blob/main/packages/react-devtools/CHANGELOG.md#4110-april-9-2021
- Loading branch information
Showing
9 changed files
with
124 additions
and
64 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const { runCommand } = require('../../development/lib/run-command'); | ||
const { retry } = require('../../development/lib/retry'); | ||
|
||
function ensureXServerIsRunning() { | ||
return retry( | ||
{ | ||
retries: 3, | ||
delay: 2000, | ||
rejectionMessage: 'X server does not seem to be running?!', | ||
}, | ||
() => { | ||
return runCommand('xset', ['q']); | ||
}, | ||
); | ||
} | ||
|
||
module.exports = { ensureXServerIsRunning }; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3765,6 +3765,11 @@ | |
dependencies: | ||
defer-to-connect "^1.0.1" | ||
|
||
"@testim/chrome-version@^1.0.7": | ||
version "1.0.7" | ||
resolved "https://registry.yarnpkg.com/@testim/chrome-version/-/chrome-version-1.0.7.tgz#0cd915785ec4190f08a3a6acc9b61fc38fb5f1a9" | ||
integrity sha512-8UT/J+xqCYfn3fKtOznAibsHpiuDshCb0fwgWxRazTT19Igp9ovoXMPhXyLD6m3CKQGTMHgqoxaFfMWaL40Rnw== | ||
|
||
"@testing-library/dom@^7.17.1": | ||
version "7.22.2" | ||
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.22.2.tgz#6deaa828500993cc94bdd62875c251b5b5b70d69" | ||
|
@@ -4313,6 +4318,13 @@ | |
dependencies: | ||
"@types/yargs-parser" "*" | ||
|
||
"@types/yauzl@^2.9.1": | ||
version "2.9.2" | ||
resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.2.tgz#c48e5d56aff1444409e39fa164b0b4d4552a7b7a" | ||
integrity sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA== | ||
dependencies: | ||
"@types/node" "*" | ||
|
||
"@typescript-eslint/experimental-utils@^4.0.1": | ||
version "4.21.0" | ||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.21.0.tgz#0b0bb7c15d379140a660c003bdbafa71ae9134b6" | ||
|
@@ -7956,15 +7968,18 @@ chrome-trace-event@^1.0.2: | |
dependencies: | ||
tslib "^1.9.0" | ||
|
||
chromedriver@^79.0.0: | ||
version "79.0.0" | ||
resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-79.0.0.tgz#1660ac29924dfcd847911025593d6b6746aeea35" | ||
integrity sha512-DO29C7ntJfzu6q1vuoWwCON8E9x5xzopt7Q41A7Dr7hBKcdNpGw1l9DTt9b+l1qviOWiJLGsD+jHw21ptEHubA== | ||
chromedriver@^87.0.1: | ||
version "87.0.7" | ||
resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-87.0.7.tgz#74041e02ff7f633e91b98eb707e2476f713dc4ca" | ||
integrity sha512-7J7iN2rJuSDsKb9BUUMewJt07PuTlZYd809D10dUCT1rjMD3i2jUw7dum9RxdC1xO3aFwMd8TwZ5NR82T+S+Dg== | ||
dependencies: | ||
del "^4.1.1" | ||
extract-zip "^1.6.7" | ||
mkdirp "^0.5.1" | ||
request "^2.88.0" | ||
"@testim/chrome-version" "^1.0.7" | ||
axios "^0.21.1" | ||
del "^6.0.0" | ||
extract-zip "^2.0.1" | ||
https-proxy-agent "^5.0.0" | ||
mkdirp "^1.0.4" | ||
proxy-from-env "^1.1.0" | ||
tcp-port-used "^1.0.1" | ||
|
||
ci-info@^1.5.0: | ||
|
@@ -9471,18 +9486,19 @@ del@^3.0.0: | |
pify "^3.0.0" | ||
rimraf "^2.2.8" | ||
|
||
del@^4.1.1: | ||
version "4.1.1" | ||
resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" | ||
integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== | ||
del@^6.0.0: | ||
version "6.0.0" | ||
resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" | ||
integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ== | ||
dependencies: | ||
"@types/glob" "^7.1.1" | ||
globby "^6.1.0" | ||
is-path-cwd "^2.0.0" | ||
is-path-in-cwd "^2.0.0" | ||
p-map "^2.0.0" | ||
pify "^4.0.1" | ||
rimraf "^2.6.3" | ||
globby "^11.0.1" | ||
graceful-fs "^4.2.4" | ||
is-glob "^4.0.1" | ||
is-path-cwd "^2.2.0" | ||
is-path-inside "^3.0.2" | ||
p-map "^4.0.0" | ||
rimraf "^3.0.2" | ||
slash "^3.0.0" | ||
|
||
delayed-stream@~1.0.0: | ||
version "1.0.0" | ||
|
@@ -10047,10 +10063,10 @@ electron-to-chromium@^1.3.378, electron-to-chromium@^1.3.47, electron-to-chromiu | |
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.610.tgz#1254eb394acd220a836ea1f203f8cded4e487052" | ||
integrity sha512-eFDC+yVQpEhtlapk4CYDPfV9ajF9cEof5TBcO49L1ETO+aYogrKWDmYpZyxBScMNe8Bo/gJamH4amQ4yyvXg4g== | ||
|
||
electron@^9.1.0: | ||
version "9.4.2" | ||
resolved "https://registry.yarnpkg.com/electron/-/electron-9.4.2.tgz#0c76dfc3d317108adac66844b868a9e2e57d48f5" | ||
integrity sha512-WpnJLDFHtj5eIewAi4hMHxGdbwkzjzmxsMu/BtDFCic3wpruchkskL7EV28Sg/IYTAqo6yN5ISfnFaQcLsIdng== | ||
electron@^11.1.0: | ||
version "11.4.12" | ||
resolved "https://registry.yarnpkg.com/electron/-/electron-11.4.12.tgz#3315ce63a37cea5033125f7abcfdcc2f76864a57" | ||
integrity sha512-Kaf4uNaKcGWlBuZwFJ4OZcIN1cfVe9jlGgjm6pUIAJucUsUU7hCFOtaVdZ1sMJR2zbshIbwbiczq8+S61jLfUA== | ||
dependencies: | ||
"@electron/get" "^1.0.1" | ||
"@types/node" "^12.0.12" | ||
|
@@ -12050,7 +12066,7 @@ extglob@^2.0.4: | |
snapdragon "^0.8.1" | ||
to-regex "^3.0.1" | ||
|
||
extract-zip@^1.0.3, extract-zip@^1.6.7: | ||
extract-zip@^1.0.3: | ||
version "1.7.0" | ||
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927" | ||
integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA== | ||
|
@@ -12060,6 +12076,17 @@ extract-zip@^1.0.3, extract-zip@^1.6.7: | |
mkdirp "^0.5.4" | ||
yauzl "^2.10.0" | ||
|
||
extract-zip@^2.0.1: | ||
version "2.0.1" | ||
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" | ||
integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== | ||
dependencies: | ||
debug "^4.1.1" | ||
get-stream "^5.1.0" | ||
yauzl "^2.10.0" | ||
optionalDependencies: | ||
"@types/yauzl" "^2.9.1" | ||
|
||
[email protected]: | ||
version "1.3.0" | ||
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" | ||
|
@@ -15650,7 +15677,7 @@ is-path-cwd@^1.0.0: | |
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" | ||
integrity sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= | ||
|
||
is-path-cwd@^2.0.0: | ||
is-path-cwd@^2.2.0: | ||
version "2.2.0" | ||
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" | ||
integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== | ||
|
@@ -15662,26 +15689,17 @@ is-path-in-cwd@^1.0.0: | |
dependencies: | ||
is-path-inside "^1.0.0" | ||
|
||
is-path-in-cwd@^2.0.0: | ||
version "2.1.0" | ||
resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb" | ||
integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ== | ||
dependencies: | ||
is-path-inside "^2.1.0" | ||
|
||
is-path-inside@^1.0.0: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" | ||
integrity sha1-jvW33lBDej/cprToZe96pVy0gDY= | ||
dependencies: | ||
path-is-inside "^1.0.1" | ||
|
||
is-path-inside@^2.1.0: | ||
version "2.1.0" | ||
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" | ||
integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== | ||
dependencies: | ||
path-is-inside "^1.0.2" | ||
is-path-inside@^3.0.2: | ||
version "3.0.3" | ||
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" | ||
integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== | ||
|
||
is-plain-obj@^1.0.0, is-plain-obj@^1.1, is-plain-obj@^1.1.0: | ||
version "1.1.0" | ||
|
@@ -22549,24 +22567,24 @@ react-dev-utils@^10.0.0: | |
strip-ansi "6.0.0" | ||
text-table "0.2.0" | ||
|
||
react-devtools-core@4.10.1: | ||
version "4.10.1" | ||
resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.10.1.tgz#6d57db291aeac9cc45ef9fb4636dd2ab97490daf" | ||
integrity sha512-sXbBjGAWcf9HAblTP/zMtFhGHqxAfIR+GPxONZsSGN9FHnF4635dx1s2LdQWG9rJ+Ehr3nWg+BUAB6P78my5PA== | ||
react-devtools-core@4.16.0: | ||
version "4.16.0" | ||
resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.16.0.tgz#c640ab15b98d077bc47f10f84fc8ed3633f537bd" | ||
integrity sha512-fqyVbp+wVVey6O4uVBk5s3J/vTiPludp7lulr6a8asTBm7DIA0vLBbjmAOLCnOlkWcgdy4mjsqOgNCbu8uICWw== | ||
dependencies: | ||
shell-quote "^1.6.1" | ||
ws "^7" | ||
|
||
react-devtools@^4.10.1: | ||
version "4.10.1" | ||
resolved "https://registry.yarnpkg.com/react-devtools/-/react-devtools-4.10.1.tgz#579c14fe0b181e222e262a75fc55c2e2e17abc7a" | ||
integrity sha512-gGOu0tcpCdm2+LZNrFgyimImtkYDoi6z5aKMRxxfuRM0VrJpmZakxAwaLs0BMRA9+UUF22Emzku366+m5eBtIQ== | ||
react-devtools@^4.11.0: | ||
version "4.16.0" | ||
resolved "https://registry.yarnpkg.com/react-devtools/-/react-devtools-4.16.0.tgz#89440dfb27b5f57ca8c098e91c9039308ace6395" | ||
integrity sha512-K+EUWY0kWIwhBJSQotn9BnbXsGXM6S55bhZV7MMWQBop8dc/jVBWKklr6vM4jOTg3kxpXiVj7KJDv45hceiSZw== | ||
dependencies: | ||
cross-spawn "^5.0.1" | ||
electron "^9.1.0" | ||
electron "^11.1.0" | ||
ip "^1.1.4" | ||
minimist "^1.2.3" | ||
react-devtools-core "4.10.1" | ||
react-devtools-core "4.16.0" | ||
update-notifier "^2.1.0" | ||
|
||
react-dnd-html5-backend@^7.4.4: | ||
|
@@ -23579,7 +23597,7 @@ request-promise-native@^1.0.9: | |
stealthy-require "^1.1.1" | ||
tough-cookie "^2.3.3" | ||
|
||
request@^2.79.0, request@^2.83.0, request@^2.85.0, request@^2.88.0, request@^2.88.2, request@~2.88.0: | ||
request@^2.79.0, request@^2.83.0, request@^2.85.0, request@^2.88.2, request@~2.88.0: | ||
version "2.88.2" | ||
resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" | ||
integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== | ||
|