The version of the compiler that produced it may have used features that aren’t supported by this compiler

my macos CI builds recently started failing with the following error message:

/Users/runner/work/png/png: error: manifest parse error(s):
<unknown>:0: error: invalid Darwin version number: macos11.0
<unknown>:0: error: invalid version number in '-target x86_64-apple-macos11.0'
/Applications/Xcode_12_beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface:1:1: error: failed to build module 'Combine' from its module interface; the compiler that produced it, 'Apple Swift version 5.3 (swiftlang-1200.2.26.4 clang-1200.0.29.4)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3-dev (LLVM 84c026a1b9, Swift 6bda828a7e)'
// swift-interface-format-version: 1.0
^
<unknown>:0: error: invalid Darwin version number: macos11.0
<unknown>:0: error: invalid version number in '-target x86_64-apple-macos11.0'
/Users/runner/work/png/png/Package.swift:2:8: error: failed to build module 'PackageDescription' from its module interface; it may have been damaged or it may have triggered a bug in the Swift compiler when it was produced
import PackageDescription
       ^
##[error]Process completed with exit code 1.

i already tried reverting my swiftenv version to DEVELOPMENT-SNAPSHOT-2020-05-26-a (which was the last one that was working), as well as resetting Package.swift to // swift-tools-version:5.2 but the builds are still failing on macos. (the linux builds are fine.)

anyone know what’s going on here?

the github action looks like this:

  build-macos:
    runs-on: macos-latest
    steps:
    - uses: actions/checkout@v2
    - uses: YOCKOW/Action-setup-swift@master
  ...

I think you need a compiler that understands macOS 11.0, which seems like you'll need at least a recent 5.3 snapshot.

1 Like

the more recent snapshots are unusable for me (from a ci perspective) because of this issue here. i tried downgrading the macos version in the github action to 10.15.6, but for some reason, swift still thinks it’s running on macos 11.0.

It's not that it thinks it's running on macOS 11.0, it's that the interface in the SDK was built with a macOS 11.0 deployment target. Your best bet is to probably move back to Xcode 11 for the time being.

1 Like

that fixed it, thanks!

Terms of Service

Privacy Policy

Cookie Policy