apple / apple/swift-openapi-generator

Xcode 26 beta 1 - Compiler crash (fixed in beta 2)

Open
#781 26 comments 8 reactions 0 assignees View on GitHub
kind/bug status/triage
Dominant language
Swift
Stars
2k
Forks
182
Avg merge
13h 28m
Merged PRs (30d)
5

Description

### Description

When I build my package that uses OpenAPIGenerator with Xcode 26 beta, I see the compiler crash when it compiles `_OpenAPIGeneratorCore/Translator/TypeAssignment/TypeMatcher.swift`.

```
1. Apple Swift version 6.2 (swiftlang-6.2.0.9.909 clang-1700.3.9.907)
2. Compiling with effective version 5.10
3. While evaluating request ExecuteSILPipelineRequest(Run pipelines { Mandatory Diagnostic Passes + Enabling Optimization Passes } on SIL for _OpenAPIGeneratorCore)
4. While running pass #403 SILFunctionTransform "SendNonSendable" on SILFunction "@$s21_OpenAPIGeneratorCore11TypeMatcherV14isKeyValuePair_14referenceStack10componentsSb0A6APIKit10JSONSchemaV_AA09ReferenceK0VzAG0A3APIO10ComponentsVtKF".
for 'isKeyValuePair(_:referenceStack:components:)' (at XXX/Library/Developer/Xcode/DerivedData/XXX/SourcePackages/checkouts/swift-openapi-generator/Sources/_OpenAPIGeneratorCore/Translator/TypeAssignment/TypeMatcher.swift:177:5)

Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 swift-frontend 0x0000000108ea3cb0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1 swift-frontend 0x0000000108ea1640 llvm::sys::RunSignalHandlers() + 112
2 swift-frontend 0x0000000108ea42dc SignalHandler(int, __siginfo*, void*) + 344
3 libsystem_platform.dylib 0x00000001883af624 _sigtramp + 56
4 libsystem_pthread.dylib 0x000000018837588c pthread_kill + 296
5 libsystem_c.dylib 0x000000018827ec60 abort + 124
6 swift-frontend 0x0000000103c46d7c swift::Partition::assignElement(swift::PartitionPrimitives::Element, swift::PartitionPrimitives::Element, bool) + 96
7 swift-frontend 0x00000001037a1dac swift::RegionAnalysisFunctionInfo::runDataflow() + 5876
8 swift-frontend 0x00000001037a5878 swift::RegionAnalysis::newFunctionAnalysis(swift::SILFunction*) + 1668
9 swift-frontend 0x0000000103a06ed4 (anonymous namespace)::SendNonSendable::run() + 280
10 swift-frontend 0x0000000103a466cc swift::SILPassManager::runFunctionPasses(unsigned int, unsigned int) + 3332
11 swift-frontend 0x0000000103a42740 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 11988
12 swift-frontend 0x0000000103a653d4 swift::SimpleRequest (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 52
13 swift-frontend 0x0000000103a49190 swift::ExecuteSILPipelineRequest::OutputType swift::Evaluator::getResultUncached(swift::Evaluator&, swift::ExecuteSILPipelineRequest)::'lambda'()>(swift::ExecuteSILPipelineRequest const&, swift::ExecuteSILPipelineRequest::OutputType swift::evaluateOrFatal(swift::Evaluator&, swift::ExecuteSILPipelineRequest)::'lambda'()) + 412
14 swift-frontend 0x0000000103a4b76c swift::runSILDiagnosticPasses(swift::SILModule&) + 416
15 swift-frontend 0x0000000102efce4c swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 656
16 swift-frontend 0x0000000102b18ad0 performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr>, llvm::PointerUnion, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 1360
17 swift-frontend 0x0000000102b17dbc swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1032
18 swift-frontend 0x0000000102b1b0e0 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1764
19 swift-frontend 0x0000000102b19cfc swift::performFrontend(llvm::ArrayRef, char const*, void*, swift::FrontendObserver*) + 3580
20 swift-frontend 0x0000000102a9b390 swift::mainEntry(int, char const**) + 5412
21 dyld 0x0000000187fd6b4c start + 6000
```

Maybe there exists a workaround in OpenAPIGenerator for this compiler crash?

### Reproduction

n/d

### Package version(s)

Swift OpenAPI Generator 1.8.0

### Expected behavior

No compiler crash

### Environment

Xcode 26.0 beta (17A5241e)

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the reported compilation of Sources/_OpenAPIGeneratorCore/Translator/TypeAssignment/TypeMatcher.swift, especially isKeyValuePair at line 177, using Swift OpenAPI Generator 1.8.0 and Xcode 26 beta 1. Check the same build with Xcode 26 beta 2, where the title reports the compiler crash is fixed. Done means confirming whether a project-side workaround is still needed and documenting the result.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.