swifter: Compilation in Xcode 12 beta fails with version 1.4.7 from SPM

Hi, when I try to compile for iOS Simulator a project where I use Swifter 1.4.7 (via SPM) with Xcode 12, I get the following error:
/Path/To/Project/SourcePackages/checkouts/swifter/XCode/Sources/Socket+File.swift:26:61: Generic parameter 'Element' could not be inferred

image

The version from stable works without issues.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 28 (15 by maintainers)

Commits related to this issue

Most upvoted comments

@jlcvp Sure, we should have 1.5.0 published on Monday!

As a workaround you can replace: let writeResult = write(target, &buffer + writeCounter, readResult - writeCounter) to let writeResult = write(target, (&buffer + writeCounter) as UnsafeRawPointer, readResult - writeCounter)

Hey, thank you all for your reports regarding Xcode 12 🙏. Now with Xcode 12 beta 4 released this week, I’ll try to start a branch with all your feedback to be ready before its release.

@ChristianSteffens Yes definitely, I’ll be creating a beta release in the following days. I was waiting to have confirmation from the community about the build. So stay tuned.

FYI to specify branches in your:

Podfile

pod 'swifter', :git => 'https://github.com/httpswift/swifter.git', :branch => 'xcode12-swift5'

Cartfile

github "httpswift/swifter" "xcode12-swift5"

SPM

.package(url: "https://github.com/httpswift/swifter.git'", .branch("xcode12-swift5"))

Thank you for all your support and testing. 1.5.0 has been released officially 🚀.

Doing preliminary testing with Xcode 12 beta 5 all it’s working fine without any necessary update, it seems Apple fixed the error found in previous versions. I’ll be creating a branch for testing today and I’ll let you know.

@ChristianSteffens @knellr The Podspecs has been updated. The tag is now 1.5.0-rc.1. You should be able to point to 1.5.0-rc.1 now in your Podfile like this:

pod 'Swifter', '1.5.0-rc.1'

And be sure to run pod install --repo-update.

@ChristianSteffens That would be my fault 😞. I need to update the Podspec, I’ll do later today. Sorry for the inconvenience.

The above branch worked well for me via CocoaPods

@lecksfrawen Thanks for reporting the issue, please leave it open to help us to track the issue with Xcode 12. It will be closed when the fix is made.

The xcode12-swift5 branch is working fine for me with the GM & CocoaPods, should we expect a release imminently?

Can you please point your Podfile, Cartfile, or Package.swift to the branch xcode12-swift5 and let me know if any issue appears? Thanks

Xcode 12 beta 5 released, how is going please