-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Support Xcode betas with xcode-locator #7371
Conversation
Here is the example output in the previous case:
As you can see there isn't a single version you can pass to make sure you get beta 1 or beta 2. I also assume this differs based on what the OS returns from Here's the new output in this case:
There are some downsides to this representation.
|
I like this change, it improves xcode locator's functionality quite a lot. looping in @aragos and @c-parsons for input from the bazel POV. |
Right, In general I'd be ok with this change but shorter/more descriptive version names would be nice. I don't think parsing a second file would be a problem (this is cached, right?) but @c-parsons may disagree. :) |
Do we know if it's possible for this version to ever start with a letter? I've been maintaining this since Xcode 8.3 and every version since then including betas start with a number https://github.com/keith/Xcode.app-strings/commits/master but the problem is actually the case where they end with a letter. Here's the exception that I hit when I tried that originally:
(note I lowercased it locally because the regex is case sensitive) It looks DottedVersion is very tied to there only being a single alpha group in each component, otherwise it looks like it would break sorting |
I'd be fine with modifying DottedVersion to be more permissive if you feel like that's required to represent Apple's naming scheme. Both upper casing and more letters should be ok. |
I'm not sure that changing DottedVersion is viable. The implementation of it is very tied to its internal |
I talked to Sergio about this more offline and am taking a stab at updating DottedVersion |
3d61f58
to
4bb3618
Compare
Previously if you had 2 builds of the same version of Xcode, for example 10.2.0 beta 1 and 10.2.0 beta 2, there was no way to disambiguate them. This change appends the `ProductBuildVersion` of each Xcode version to allow you to specify that if desired.
4bb3618
to
e944070
Compare
if ([versionArg rangeOfCharacterFromSet:versSet.invertedSet].length | ||
!= 0) { | ||
versionArg = nil; | ||
} |
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.
In theory we could add all uppercase and lowercase letters here, but I don't think this validation added a lot of value anyways, so it's probably fine to remove it entirely
@aragos I updated DottedVersion to support this use case so this is ready for another pass! |
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.
Thanks for the changes! Looks good to me but it would be great to also get an approval from @sergiocampama.
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.
Looks good to me.
Awesome thanks! |
*** Reason for rollback *** Partial rollback because we need to migrate some folks before we can get the new functionality live. *** Original change description *** Support Xcode betas with xcode-locator Previously if you had 2 builds of the same version of Xcode, for example 10.2.0 beta 1 and 10.2.0 beta 2, there was no way to disambiguate them. This change appends the `ProductBuildVersion` of each Xcode version to allow you to specify that if desired. Closes #7371. PiperOrigin-RevId: 234900481
…ing on the old version. *** Original change description *** Support Xcode betas with xcode-locator Previously if you had 2 builds of the same version of Xcode, for example 10.2.0 beta 1 and 10.2.0 beta 2, there was no way to disambiguate them. This change appends the `ProductBuildVersion` of each Xcode version to allow you to specify that if desired. Closes #7371. PiperOrigin-RevId: 235823433
It's worth noting that even with this change Bazel may not select the proper Xcode beta if you don't specify the |
+1 that's a good callout, my expectation was generally just that if you're not setting that you're not super worried about what Xcode version people are using in general, so it would probably be ok |
Homebrew's CI is breaking on 10.12 (Sierra), for Bazel 0.24+ due to the signature used for NSDictionary:initWithContentsOfURL introduced in the fix for #7371. This signature with an error parameter is only available on 10.13+ (High Sierra). Here's Apple's documentation: https://developer.apple.com/documentation/foundation/nsdictionary/1416069-initwithcontentsofurl?language=objc The Homebrew issue: Homebrew/homebrew-core#38651 Closes #8068. PiperOrigin-RevId: 244357959
Homebrew's CI is breaking on 10.12 (Sierra), for Bazel 0.24+ due to the signature used for NSDictionary:initWithContentsOfURL introduced in the fix for #7371. This signature with an error parameter is only available on 10.13+ (High Sierra). Here's Apple's documentation: https://developer.apple.com/documentation/foundation/nsdictionary/1416069-initwithcontentsofurl?language=objc The Homebrew issue: Homebrew/homebrew-core#38651 Closes #8068. PiperOrigin-RevId: 244357959
Homebrew's CI is breaking on 10.12 (Sierra), for Bazel 0.24+ due to the signature used for NSDictionary:initWithContentsOfURL introduced in the fix for #7371. This signature with an error parameter is only available on 10.13+ (High Sierra). Here's Apple's documentation: https://developer.apple.com/documentation/foundation/nsdictionary/1416069-initwithcontentsofurl?language=objc The Homebrew issue: Homebrew/homebrew-core#38651 Closes #8068. PiperOrigin-RevId: 244357959
Homebrew's CI is breaking on 10.12 (Sierra), for Bazel 0.24+ due to the signature used for NSDictionary:initWithContentsOfURL introduced in the fix for #7371. This signature with an error parameter is only available on 10.13+ (High Sierra). Here's Apple's documentation: https://developer.apple.com/documentation/foundation/nsdictionary/1416069-initwithcontentsofurl?language=objc The Homebrew issue: Homebrew/homebrew-core#38651 Closes #8068. PiperOrigin-RevId: 244357959
Homebrew's CI is breaking on 10.12 (Sierra), for Bazel 0.24+ due to the signature used for NSDictionary:initWithContentsOfURL introduced in the fix for #7371. This signature with an error parameter is only available on 10.13+ (High Sierra). Here's Apple's documentation: https://developer.apple.com/documentation/foundation/nsdictionary/1416069-initwithcontentsofurl?language=objc The Homebrew issue: Homebrew/homebrew-core#38651 Closes #8068. PiperOrigin-RevId: 244357959
Previously if you had 2 builds of the same version of Xcode, for example
10.2.0 beta 1 and 10.2.0 beta 2, there was no way to disambiguate them.
This change appends the
ProductBuildVersion
of each Xcode version toallow you to specify that if desired.