Skip to content

XcodeVersion interprets version 10.0 as version 1.0 #1459

Closed
@codeWonderland

Description

@codeWonderland

Platform: MacOS Mojave
Compiler: Apple LLVM version 10.0.0 (clang-1000.10.25.5)

I was attempting to reinstall node after updating my Mac to the new developer release, and I kept getting an issue that my compiler was out of date. After digging for a while, I began to play around with the functions in gyp, and I noticed that the issue resides in pylib/xcode_emulation.py.

In said file, on line 1273, the script attempts to take the output of xcodebuild -version and translate that into a numerical value that the program can use. To test my theory, I printed the version of before and after that statement. The output was as follows:

>>> import gyp.xcode_emulation
>>> gyp.xcode_emulation.XcodeVersion()
Xcode 10.0
100
('0100', '10L176w')

As you can see, the system is interpreting version 10.0 the same as it would version 1.0, causing anything that is based off of this to think that the system is out of date.

The line currently exists as version = version.split()[-1].replace('.', '') I can rewrite this and make a pull request on this repo. I just wanted to make sure there was an issue in place before I make any changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions