Giter Club home page Giter Club logo

Comments (12)

ahoppen avatar ahoppen commented on September 15, 2024

Synced to Apple’s issue tracker as rdar://133401576

from swift-syntax.

ahoppen avatar ahoppen commented on September 15, 2024

Are you trying to build swift-syntax with a Swift 5.7 compiler on macOS 12? swift-syntax requires a Swift 5.8 compiler to build since #2742, the swift-tools-version just didn’t get updated.

Couldn’t you build with a newer Swift version and backdeploy to macOS 12?

from swift-syntax.

SimplyDanny avatar SimplyDanny commented on September 15, 2024

Are you trying to build swift-syntax with a Swift 5.7 compiler on macOS 12? swift-syntax requires a Swift 5.8 compiler to build since #2742, the swift-tools-version just didn’t get updated.

SwiftLint specifies // swift-tools-version:5.9. So if a Swift 5.7 compiler was actually used, it'd have refused to start building right from the beginning, wouldn't it?

Couldn’t you build with a newer Swift version and backdeploy to macOS 12?

I think this is not how Homebrew works. Everyone should be able to build things from source given a formula that defines the build steps. Downloading pre-built binaries is just a shortcut as a convenience for the impatient user (99% of users). SwiftLint provides binaries that should be runnable on older macOS versions, but not for Homebrew.

from swift-syntax.

SimplyDanny avatar SimplyDanny commented on September 15, 2024

Seems like while a Swift 5.10 compiler is used, the SDK is still read from the Xcode installation. The outdated standard library would explain the compile errors. I'll report back ...

from swift-syntax.

SimplyDanny avatar SimplyDanny commented on September 15, 2024

Seems like while a Swift 5.10 compiler is used, the SDK is still read from the Xcode installation. The outdated standard library would explain the compile errors. I'll report back ...

As the SDK is shipped with Xcode only and OS-dependent I won't get this to work at all if the new code now calls API the SDK doesn't provide. Right?

What confuses me is that the reference for UnsafeMutableBufferPointer.deinitialize claims "macOS 10.10+". How does that relate?

from swift-syntax.

ahoppen avatar ahoppen commented on September 15, 2024

The relevant variable here should be the SDK installed in the Xcode being used, not the host OS. Which Xcode are you using on macOS 12? Or, alternatively, which Xcode are you using to get a Swift 5.9+ compiler?

from swift-syntax.

SimplyDanny avatar SimplyDanny commented on September 15, 2024

The relevant variable here should be the SDK installed in the Xcode being used, not the host OS. Which Xcode are you using on macOS 12? Or, alternatively, which Xcode are you using to get a Swift 5.9+ compiler?

It's Xcode 14.2 installed on the host. The Swift 5.10 toolchain is installed via Homebrew as well. It was built with Xcode 13.3 as far as I can see.

from swift-syntax.

ahoppen avatar ahoppen commented on September 15, 2024

The Swift 5.10 toolchain is installed via Homebrew as well.

Just to be clear: By Swift 5.10 toolchain, you refer to a Swift open source toolchain from swift.org?

It was built with Xcode 13.3 as far as I can see.

And by this you mean that the 5.10 toolchain from swift.org was built using Xcode 13.3 to your best knowledge?

from swift-syntax.

SimplyDanny avatar SimplyDanny commented on September 15, 2024

I should have made this clearer before. Sorry for that. Homebrew provides an own Swift package. So you can basically install it via brew install swift. It's not an official toolchain from swift.org but a manual build. In their formula, Xcode 13.3 is specified as a build dependency.

from swift-syntax.

SimplyDanny avatar SimplyDanny commented on September 15, 2024

Seems like I got it now. The only requirement is to build the Swift 6 branch with a Swift 5.8+ compiler and a matching standard library.

The toolchain provided by Homebrew apparently misses some components compared to the regular toolchains. However, this needs to be sorted with the Homebrew folks, not here in this thread.

What's somehow missing is an overview about the API provided by the standard library with respect to the Swift versions that support it. Can that be found somewhere? The only documentation for the standard library is provided by Apple. swift.org even links there, but Apple's website only allows to show differences between the latest Xcode releases/betas. No mention of Swift versions at all. This would be a welcome feature.

from swift-syntax.

SimplyDanny avatar SimplyDanny commented on September 15, 2024

I put up #2801 to increase the tool version.

Thank you very much for getting me on the right track with this issue. 🙏

from swift-syntax.

vdhamer avatar vdhamer commented on September 15, 2024

Homebrew download of swift line 0.56..1 for Mac is available.
Thank to both parties that investigated and fixed this.

from swift-syntax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.