Skip to content
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 regex to match multi-digit versions #1455

Closed
wants to merge 1 commit into from
Closed

gyp: fix regex to match multi-digit versions #1455

wants to merge 1 commit into from

Conversation

jhermsmeier
Copy link
Contributor

Checklist
  • npm install && npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

This fixes the regular expression matching in xcode_emulation
to also handle version numbers with multiple-digit major versions
which would otherwise break under use of XCode 10

Fixes: #1454

This fixes the regular expression matching in `xcode_emulation`
to also handle version numbers with multiple-digit major versions
which would otherwise break under use of XCode 10

Fixes: #1454
@jhermsmeier
Copy link
Contributor Author

There currently aren't any tests for this particular part of the code – should I add some? If so, I think I could do with some guidance on that

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

As to testing, there's no direct way to test this code since it lives inside gyp, not node-gyp, which has its own external test suite.

@jhermsmeier
Copy link
Contributor Author

Oh, I see, of course – not sure where my head was. I guess it would be preferable to land this upstream (if it hasn't been patched there yet)?

@bnoordhuis
Copy link
Member

Ideally, yes, but Google has effectively abandoned gyp so we're in this awkward situation where we're the de facto (but not de jure) upstream.

@Trott
Copy link
Member

Trott commented Jun 7, 2018

I've confirmed that this change along unbreaks things on macOS High Sierra with CLI tools. Can we expedite landing and publishing?

@Trott
Copy link
Member

Trott commented Jun 7, 2018

/ping @nodejs/node-gyp

bnoordhuis pushed a commit that referenced this pull request Jun 8, 2018
This fixes the regular expression matching in `xcode_emulation`
to also handle version numbers with multiple-digit major versions
which would otherwise break under use of XCode 10

Fixes: #1454
PR-URL: #1455
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
bnoordhuis pushed a commit that referenced this pull request Jun 8, 2018
This fixes the regular expression matching in `xcode_emulation`
to also handle version numbers with multiple-digit major versions
which would otherwise break under use of XCode 10

Fixes: #1454
PR-URL: #1455
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@bnoordhuis
Copy link
Member

Merged in 293092c (commit 40f24e4 on the v3.x branch) and released as v3.6.3. Thanks again, Jonas.

@bnoordhuis bnoordhuis closed this Jun 8, 2018
@jhermsmeier jhermsmeier deleted the fix-macos-xcode-emulation branch June 8, 2018 13:07
@jhermsmeier
Copy link
Contributor Author

Sweet, thank you for the swift response!

@questsin
Copy link

still an issue

@nornagon
Copy link

Hm, I'm not sure this has fully addressed the issue. On my system, XcodeVersion() is returning "0101", which causes gyp to assume we want to target i386 (among other poor assertions). It seems like this only fixed the CLTVersion path, not the xcodebuild -version path?

@cclauss
Copy link
Contributor

cclauss commented Jun 27, 2019

@nornagon Would it be possible to add a new Travis CI run which mimics your Mac setup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Builds fail on macOS with XCode 10
6 participants