Skip to content
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

Build failure using Swift 4.2 from Xcode 10 Beta #92

Closed
wlisac opened this issue Jul 18, 2018 · 4 comments · Fixed by #93
Closed

Build failure using Swift 4.2 from Xcode 10 Beta #92

wlisac opened this issue Jul 18, 2018 · 4 comments · Fixed by #93

Comments

@wlisac
Copy link

wlisac commented Jul 18, 2018

I'm running into an issue building StencilSwiftKit with SPM using Swift 4.2.

/.build/checkouts/StencilSwiftKit.git-5443537928707802040/Sources/SwiftIdentifier.swift:16:55: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
private let headRanges: [CountableClosedRange<Int>] = [

It looks like the same issue was detected by the Swift source compatibility suite: https://bugs.swift.org/browse/SR-8046

Has anyone else seen this / know of a work around?

@TimeDelta
Copy link

I ran into this as well when trying to build Sourcery: krzysztofzablocki/Sourcery#649

@AliSoftware
Copy link
Contributor

I understand the error and can see that this array of CountableRanges is big, but I'm not sure how to make that easier to parse for the Swift compiler and type checker…

Any idea how to annotate that better to help the type checker and fix this?

@AliSoftware
Copy link
Contributor

I've created a PR to fix this.

I've tested it locally with Xcode 10b3 (I haven't had time downloading b4 yet) and this seems to fix it in the meantime, by adding hints all over the place for the type checker.

Unfortunately, we haven't configured CircleCI to test under Xcode 10 just yet (currently it still tests under Xcode 9.2). Might be interesting to do a PR so that Circle checks both on Xcode 9.4 and 10 in the future

@ferologics
Copy link

Can we release this? Builds are failing for beta Xcode users in the dependent projects.

@djbe djbe added this to the 2.6.0 milestone Oct 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants