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

Xcode 13 GM not compiling ByteBuffer-Core #1955

Closed
Andrewangeta opened this issue Sep 14, 2021 · 15 comments · Fixed by #1956
Closed

Xcode 13 GM not compiling ByteBuffer-Core #1955

Andrewangeta opened this issue Sep 14, 2021 · 15 comments · Fixed by #1956

Comments

@Andrewangeta
Copy link
Contributor

Expected behavior

Successful compilation

Actual behavior

Failed compilation.

Steps to reproduce

  1. Download Xcode 13 RC
  2. Try to compile

compile error:
Cannot convert value of type '(UnsafeMutableRawPointer) -> Void' to specified type '@convention(c) (UnsafeMutableRawPointer?) -> Void'
in ByteBuffer-Core.swift

SwiftNIO version/commit hash

version 232.2

Swift & OS version (output of swift --version && uname -a)

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-macosx12.0

@bdkjones
Copy link

bdkjones commented Sep 15, 2021

I am also seeing this, as shown below. Xcode Version 13.0 (13A233).

Screen Shot 2021-09-14 at 22 22 01

Things I've tried:

  1. Rebooting — (Don't laugh; rebooting has fixed Xcode many times over 15 years!)
  2. Clearing package caches and re-downloading
  3. Clean builds

Things That Worked:

  1. Rolling back to Xcode 13.0 beta 5 (13A5212g)

@Lukasa
Copy link
Contributor

Lukasa commented Sep 15, 2021

Thanks folks, can you please file a Feedback Assistant report and write down the number here?

@bdkjones
Copy link

bdkjones commented Sep 15, 2021

Is that....useful?

No offense, but Apple almost never replies to Radars and, when they do, it's 5 years later and the reply is: "We think this is no longer an issue. Please verify with the latest version of [platform] and update your issue if necessary." From the outside, Radar is a blackhole of wasted time and effort.

Since SwiftNIO is an Apple product (I think? It's on Apple's GitHub repo, at any rate) would it not be more efficient to get the Developer Tools team via internal channels?

@Lukasa
Copy link
Contributor

Lukasa commented Sep 15, 2021

Yes, it’s useful.

@bdkjones
Copy link

shrug, okay. Here's the number: FB9626044

@Lukasa
Copy link
Contributor

Lukasa commented Sep 15, 2021

Much appreciated, thank you!

@Lukasa
Copy link
Contributor

Lukasa commented Sep 15, 2021

Also filed as https://bugs.swift.org/browse/SR-15197.

@Joannis
Copy link

Joannis commented Sep 15, 2021

Note: NIO works correctly on iOS

@dweekly
Copy link

dweekly commented Sep 15, 2021

Also seeing this with XCode GM.

Notably, this causes the gRPC-Swift "hello world" experience to fail out-of-the box:

git clone https://github.com/grpc/grpc-swift && cd grpc-swift && swift run HelloWorldServer

@Joannis
Copy link

Joannis commented Sep 15, 2021

Note: NIO works correctly on iOS

not surprising. macOS just doesn't exist to apple, as can be seen by this issue.

While I understand the sentiment, it's quite a bold statement. Apple may not see macOS as a platform on the level of iOS, but can you really blame them? Also, the tools in which this bug appeared are a GM for good reason, it's quite difficult to see all the bugs. And the only reason we're confronted with this bug is due to an explicit definition of the function signature.

I don't think interacting with free in this fashion, where you want to support many platform, is a daily usecase for most people.

@Lukasa
Copy link
Contributor

Lukasa commented Sep 15, 2021

Ok, I think we can work around this nicely enough: see #1956.

@bdkjones
Copy link

@Lukasa that's awesome! Any chance this point release can go out today? It'll be at least a week or two before Xcode gets fixed. Thanks for the quick work!

@Lukasa
Copy link
Contributor

Lukasa commented Sep 15, 2021

At this stage today is probably not practical (the core devs are all UK-based and it's 9pm here, shipping a point release that late is just asking for the gods of irony to cause it to break someone's code in a fun exciting way). However, we had a pre-existing plan to ship a point release tomorrow UK time, so hopefully by the time you wake up tomorrow we'll have a point release out the door.

@Lukasa
Copy link
Contributor

Lukasa commented Sep 16, 2021

To tie a bow on this, the fix is available in SwiftNIO version 2.32.3.

@dweekly
Copy link

dweekly commented Sep 16, 2021

Confirmed fixed for me.

luispadron added a commit to luispadron/soto-core that referenced this issue Sep 19, 2021
Because of an issue with Xcode 13 GM SDK, swift-nio requires a workaround to compile (apple/swift-nio#1955). This has been released in `2.32.3`.
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