-
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
Fix TypeError in XcodeVersion() #1939
Fix TypeError in XcodeVersion() #1939
Conversation
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.
Not really a macOS person but the changes look to be an improvement over what is already there. I'd question the returned format (does it mean the minor and micro bits of the version string cannot be more than a single digit?) but it looks like it's used to populate Info.plist
:
node-gyp/gyp/pylib/gyp/xcode_emulation.py
Lines 1092 to 1093 in e610838
cache['DTXcode'] = xcode | |
cache['DTXcodeBuild'] = xcode_build |
I haven't been able to find an authoritive reference for those keys with a quick web search.
I'm not sure that this is a solution to the issue I posted: If XcodeVersion returns a tuple, and gets used in a comparison function, like these:
Then surely it will error, like it did for me. By comparison, if you look at the others uses of it, where I believe its used properly. They properly deconstruct the tuple for use in comparisons.
These previews are rendered from your commit. |
@Lavoaster You are correct. Thanks for this very precise review. I have made appropriate changes. |
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.
This looks reasonable to me.
@gengjiawen these commits needed metadata before merging, |
sorry, there's two commits at fault here, one is from #1937 and this one got squashed (thanks), but they're both missing subsystem, in this case |
PR-URL: #1939 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Sorry for this trouble. Is https://github.com/nodejs/node-core-utils/blob/master/docs/git-node.md#git-node-metadata can generate the meta info ? |
that's the metadata we need but I don't know if it'll work on this repo, I just do it manually, but keeping to nodejs/node conventions is the aim (also no merge commits) |
Hate merge commits too :) |
original commit: nodejs/node-gyp@ec4d403 Refs: nodejs/node-gyp#1939 Co-Authored-By: Christian Clauss <cclauss@me.com>
PR-URL: #1939 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Fixes: #1917
Recent changes have resulted in improper encoding of versions in the
XcodeVersion()
function.This PR is meant to streamline the logic and properly encode versions that have single digit as well as double digit major versions.
Checklist
npm install && npm test
passesDescription of change