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
[SR-4478] Library compiles in 3.0 without optimizations; needs WMO turned on to compile in 3.1 #47055
Comments
Cross-file protocol conformance checking problem. @huonw, @DougGregor, does this sound familiar? |
Comment by Adam Newton (JIRA) We were very intrigued by `_IndexableBase`. Is it trying to check for an internal protocol? (Just a curiosity) |
Yeah, but only as part of checking Collection conformance. _IndexableBase isn't particularly secret. |
Comment by Matt Yohe (JIRA) Is this similar to the boilerplate generation issue that came up during development of 3.1 that was corrected here: https://github.com/apple/swift/pull/7136/files#diff-6290705036ea8e99c92cd1a8afc9494bR800 ? It does look like extending `Route` with `RangeReplaceableCollection` and providing a typealias for `SubSequence` and an implementation for subsequence that gyb would provide does get the test project to compile. #if swift(>=3.1)
extension Route: RangeReplaceableCollection {
public typealias SubSequence = RangeReplaceableRandomAccessSlice<Route>
public subscript(slice: Range<Route.Index>) -> SubSequence {
return SubSequence(base: self, bounds: slice)
}
}
#endif |
Comment by Carmelo Gallo (JIRA) I guess is the same compiler problem I had in SR-4432 |
Comment by Adam Newton (JIRA) Just wanted to check in to see if this would possibly make it into Swift 4. cc/ @belkadan |
@swift-ci create |
This is fixed in the 6/12 snapshot for the 4.0 branch. |
Attachment: Download
Environment
OS X 10.12.4 (16E195)
Xcode 8.3 (8E162)
Additional Detail from JIRA
md5: f1f4fe5206120e47742721e942af9a11
Issue Description:
I have a small library that compiles fine in Xcode 8.2 Swift 3.0, but has issues in Xcode 8.3 Swift 3.1.
Xcode 8.2
-Onone
: CompilesXcode 8.2
-Owholemodule
: CompilesXcode 8.3
-Onone
: Fails to compileXcode 8.3
-Owholemodule
: CompilesThe errors are around the collections API:
I am having a hard time getting a repro case together that is smaller than the library itself, as deleting code from certain areas causes errors to come or go, in some cases making it where it does not compile even with whole module optimization.
The text was updated successfully, but these errors were encountered: