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

Unable to build on Xcode 13 RC #989

Closed
richardneitzke opened this issue Sep 16, 2021 · 5 comments
Closed

Unable to build on Xcode 13 RC #989

richardneitzke opened this issue Sep 16, 2021 · 5 comments

Comments

@richardneitzke
Copy link

I was trying to build the latest release of Sourcery (1.5.0) via SPM on the Xcode 13 RC 1 (13A233) toolchain. Due to an API change in strdup one of Sourcery's dependencies PathKit fails to build:

[10/18] Compiling PathKit PathKit.swift
/private/var/folders/l9/fczt2v494bx7q_48_skjvzqr0000gp/T/mint/github.com_krzysztofzablocki_Sourcery/.build/checkouts/PathKit/Sources/PathKit.swift:583:12: error: value of optional type 'UnsafeMutablePointer<CChar>?' (aka 'Optional<UnsafeMutablePointer<Int8>>') must be unwrapped to a value of type 'UnsafeMutablePointer<CChar>' (aka 'UnsafeMutablePointer<Int8>')
      free(cPattern)
           ^
/private/var/folders/l9/fczt2v494bx7q_48_skjvzqr0000gp/T/mint/github.com_krzysztofzablocki_Sourcery/.build/checkouts/PathKit/Sources/PathKit.swift:583:12: note: coalesce using '??' to provide a default when the optional value contains 'nil'
      free(cPattern)
           ^
                    ?? <#default value#>
/private/var/folders/l9/fczt2v494bx7q_48_skjvzqr0000gp/T/mint/github.com_krzysztofzablocki_Sourcery/.build/checkouts/PathKit/Sources/PathKit.swift:583:12: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
      free(cPattern)
           ^
                   !

A PR fixing the issue has already been opened in the PathKit repo (kylef/PathKit#78). Once PathKit offers a release containing the fix we can update the dependency in order to resolve this.

Swift version:

swift-driver version: 1.26.9 Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)
Target: x86_64-apple-macosx11.0
@richardneitzke
Copy link
Author

Issue we can follow in the PathKit repo: kylef/PathKit#77

@AF-cgi
Copy link

AF-cgi commented Sep 24, 2021

Please merge the open PRs to release a hotfix version. Currently it's not possible to compile Sourcery with Xcode 13. From that reason It's not possible to install it via Mint, if you have only Xcode 13 installed.

@Armenm
Copy link

Armenm commented Sep 24, 2021

It's a blocker for us too!

@mthole
Copy link

mthole commented Sep 24, 2021

Blocker here as well.

@krzysztofzablocki
Copy link
Owner

krzysztofzablocki commented Sep 25, 2021

updated on master, but you'd be better off using binary distribution (or brew once I release it) since using just SPM (what mint does) causes the issue with the dylib linking that you saw wheres if you use binary it doesn't matter which version of Xcode your developers have it will still work consistently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants