Fix TypeError in XcodeVersion()#1939
Conversation
richardlau
left a comment
There was a problem hiding this comment.
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
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. |
sam-github
left a comment
There was a problem hiding this comment.
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 testpassesDescription of change