-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
gyp: fix XCode CLT version detection on Catalina #2141
Conversation
XCode Command line Tools no longer show up as packages on Catalina, which breaks CLT version detection in gyp/pylib/gyp/xcode_emulation.py. A workaround is to remove the CLT installation directory and reinstall it using `xcode-select --install` which will download and install an older version. But this will eventually be upgraded by Software Update which breaks detection again. This patch adds a fallback mechanism to detect CLT version based on software update history. Refs: nodejs#1927 Refs: nodejs#1861
After every CLT upgrade on 10.15, I have to reinstall Command Line Tools. Please merge and release this, soon. |
Since we vendor in gyp from https://github.com/nodejs/gyp-next this should really land there. |
Can we please delete the code from this repository that we vendor in from some other repository? |
we could use git submodules but they're such a developer-hostile solution that it's usually better to just copy the code I think we just need to improve our documentation and get more pro-active with pointing people over there when they open a PR here. The code's the same so moving the PR shouldn't be too difficult since you can just copy your edited files. |
In times of Github Actions, a bot would help here. If changes are in specific paths, just post a comment about the situation. |
Unfortunately GitHub Actions running on pull requests from forks do not have permissions to post comments. |
Unless you are using a own personal access token. |
Copies @szekelyisz nodejs/node-gyp#2141 to this repo.
* gyp: fix XCode CLT version detection on Catalina Copies @szekelyisz nodejs/node-gyp#2141 to this repo. * Regex loves raw strings * Update pylib/gyp/xcode_emulation.py Co-authored-by: Michaël Zasso <targos@protonmail.com> Co-authored-by: Michaël Zasso <targos@protonmail.com>
Since Catalina XCode Command Line Tools don't show up among installed packages,
which breaks version detection in gyp/pylib/gyp/xcode_emulation.py.
The workaround is to remove the CLT installation directory, and run
xcode-select --install
which reinstalls an older version of CLT. This olderversion will eventually be upgraded by Software Update, which breaks gyp again.
Checklist
Description of change
This patch adds a fallback mechanism to detect newer CLT versions based on
software update history.