Open mattmassicotte opened 2 months ago
This problem looks like it has evolved with (at least) the 8/14 snapshot. I still cannot build any package, but the crash has changed.
1. Apple Swift version 6.0-dev (LLVM 3751470251df3e4, Swift 026ffddec66fd08)
2. Compiling with effective version 5.10
3. While evaluating request ExecuteSILPipelineRequest(Run pipelines { Mandatory Diagnostic Passes + Enabling Optimization Passes } on SIL for Darwin)
4. While running pass #2548 SILModuleTransform "MandatorySILLinker".
5. While deserializing SIL function "lgammaf_r"
6. *** DESERIALIZATION FAILURE ***
The package I'm testing with remains unchanged and has no statements other than the imports.
The resulting crash has changed again with the 8/21 snapshot. I can now make a brand new package from the built-in template and compile successfully. If I then add import Foundation
I can reproduce the failure when trying to build with Xcode 16.
Building from the command line works
1. Apple Swift version 6.0-dev (LLVM c3efe9282719c35, Swift e26305bb70cce53)
2. Compiling with effective version 5.10
3. While evaluating request ExecuteSILPipelineRequest(Run pipelines { Mandatory Diagnostic Passes + Enabling Optimization Passes } on SIL for Darwin)
4. While running pass #2548 SILModuleTransform "MandatorySILLinker".
5. While deserializing SIL function "$s6Darwin14POSIXErrorCodeO8rawValueACSgs5Int32V_tcfC"
6. *** DESERIALIZATION FAILURE ***
*** If any module named here was modified in the SDK, please delete the ***
*** new swiftmodule files from the SDK and keep only swiftinterfaces. ***
module '_errno', builder version '6.0(6.0)/Apple Swift version 6.0-dev (LLVM c3efe9282719c35, Swift e26305bb70cce53)', built from swiftinterface, resilient, loaded from '/Users/matt/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/_errno-3SWK1TRCCNCB5.swiftmodule'
SILFunction type mismatch for '$s6Darwin14POSIXErrorCodeO8rawValueACSgs5Int32V_tcfC': '$@convention(method) (Int32, @thin POSIXErrorCode.Type) -> Optional<POSIXErrorCode>' != '$@convention(method) (Int32, @thin POSIXErrorCode.Type) -> Optional<POSIXErrorCode>'
Description
Both the 8/6 and 8/7 6.0 release snapshots are unable to build any package on my machine when used as a custom toolchain within Xcode. As part of debugging this, I removed all code from one of them. It contained only 3 source files, all of which were:
import Foundation
Crash still reproduces.
Reproduction
I can compile individiual sources from the commandline. Something about it being a package + Xcode. This crash does not reproduce with CLI builds.
Stack dump
Expected behavior
The 8/2 snapshot works fine for all of these.
Environment
Apple Swift version 6.0-dev (LLVM 31f0cdc6d5ff8a6, Swift aa0786cc7b3190c) Target: arm64-apple-macosx14.0
Additional information
No response