Minimal Swift packages reproducing toolchain and compiler bugs encountered while developing the Swift Institute ecosystem — the institute's own defect records: each entry carries the reduced reproducer, evidence captures, duplicate differentiation against upstream reports, and the verified workaround the ecosystem ships.
Each swift-issue-*/ subdirectory holds one minimum reproducer of a
single Swift toolchain or compiler bug. Reproducers are reduced to the
minimum trigger: no package-internal types, no transitive dependencies,
no special swiftSettings beyond what the bug requires.
When a bug catalog entry says "this code miscompiles on Linux release,"
the issue reproducer proves it — runnable from swift test (or directly
via the standalone executable) and verified by CI on every supported
platform.
The companion research repository is at swift-institute/Research. The companion experiments repository is at swift-institute/Experiments.
Every swift-issue-*/ subdirectory follows this steady-state layout.
The convention was established by
swift-issue-pointer-arithmetic-linux-miscompile/ and applies to every
subsequent issue.
swift-issue-<topic>/
├── README.md — bug summary, trigger characterization, workaround
├── INVESTIGATION-ARC.md — (optional) multi-round convergence record
├── ISSUE-<NNNN>-COMMENT.md — (optional, historical) extended characterization notes from earlier entries
├── Tests/
│ └── Reproducer.swift — Swift Testing harness, withKnownIssue flip semantics
├── Sources/
│ └── Reproducer/
│ └── main.swift — standalone exit-code reproducer
└── evidence/ — (optional) bisection artifacts from investigation
├── README.md
└── …
Each issue declares exactly two SwiftPM targets in the root
Package.swift:
.testTarget(
name: "swift-issue-<topic>-Tests",
path: "swift-issue-<topic>/Tests"
),
.executableTarget(
name: "swift-issue-<topic>-Repro",
path: "swift-issue-<topic>/Sources/Reproducer"
),Target names match the issue directory so swift test --filter <issue-dir-underscored> selects exactly this issue's tests via substring
match on the module-name prefix (SwiftPM converts hyphenated target
names to underscored module identifiers).
Tests/Reproducer.swift— Swift Testing. Wraps the bug's minimum trigger inwithKnownIssue("swiftlang/swift#NNNN", when: { <platform-precondition> }). Green while the bug fires on the configured platforms (current toolchain state); flips red the moment the upstream fix lands and the bug stops firing. The red flip IS the fix-detection signal — captured by the weekly nightly CI cron.Sources/Reproducer/main.swift— standalone executable.exit(0)on no-bug-fired,exit(1)on bug-fired. Covers codegen surfaces that the SwiftPM test runner may mask on some toolchains. Useful for ad-hoc probing against a specific toolchain image (e.g.,docker run --rm swift:6.3 swift run swift-issue-<topic>-Repro).
.disabled(if: …) is silent when upstream lands a fix — no
signal, no PR-trigger, no detection. withKnownIssue flips red the
moment the bug stops firing on the configured platform, which IS the
upstream-fix detection mechanism. Skipping via .disabled alone is a
regression of detection capability and is forbidden per the per-issue
convention.
- Create
swift-issue-<topic>/at the repo root. - Write the bug
README.md+ (optional)INVESTIGATION-ARC.md. - Author
Tests/Reproducer.swiftandSources/Reproducer/main.swift. - Add the two targets to the root
Package.swift. - Push. CI auto-includes the new issue via
enumerate-issues'sls -d swift-issue-*/— zero CI maintenance.
Each issue is a target in this repo's root Package.swift. Clone and
test from the repo root:
git clone https://github.com/swift-institute/Issues.git
cd Issues
swift test # all issues
swift test --filter swift_issue_<topic> # one issue
swift run swift-issue-<topic>-Repro # standalone executableRequires Swift 6.3 or newer.
Continuous integration is per-issue × per-platform.
- A single
enumerate-issuesjob emits theswift-issue-*/directory list as a JSON array. - A
per-issuematrix job consumes that list and calls the centralizedswift-institute/.githubreusable workflow once per issue withtest-filter: <issue-dir>— one full reusable invocation (macOS / Linux release / Linux nightly / Windows + format + lint + advisory linters) per issue. Each(issue × reusable-job)leg is its own status check. fail-fast: false— one issue's red leg never cancels sibling issues' legs.- Weekly cron at Monday 06:00 UTC re-runs the matrix. The reusable's
linux-nightlyleg (swiftlang/swift:nightly-main-jammy) is wherewithKnownIssueflips red on upstream-fix-landing. - No
ci-okaggregator-gating. The Issues repo's branch protection doesn't referenceci-ok; per-issue test legs are the actionable signals; one red issue does not block merges.
For an issue reproducer, a permanently-red Linux release leg is the
bug's running evidence. When the upstream fix lands and the
withKnownIssue block stops firing on nightly-main-jammy, that's the
signal to close the issue and either remove the reproducer or relocate
it as a regression fixture.
Each issue subdirectory documents its bug in README.md. Current
issues:
swift-issue-conditional-extension-typealias-name-capture/— conditional-extension membertypealiasnamed after an enclosing type's generic parameter captures declaring-context references; bogus rejects-validdoes not conformdiagnostic at-typecheck(swiftlang/swift#89684); present 6.3.2 → 6.5-dev, unfixed.swift-issue-borrowing-actor-closure/—MoveOnlyTypeEliminatorcrashes when an actor method captures aborrowingclass parameter in a non-escaping closure (swift-institute/Issues#3); verified on Swift 6.2.3.swift-issue-emit-module-noncopyable-sequence/— module emission rejects a valid~CopyableSequenceconformance (Issues#4); source evidence retained.swift-issue-embedded-typed-throws-crash/— Embedded Swift typed-throws protocol conformances crash compilation (Issues#5); source evidence retained.swift-issue-copypropagation-nonescapable-mark-dependence/— CopyPropagation~Escapablecoroutine-yield crash (Issues#6); fixed in Swift 6.3 (Xcode 26.4).swift-issue-inlinearray-deinit-value-generic/— a value-genericInlineArrayskips cross-module~Copyabledeinitialization (Issues#7); source evidence retained.swift-issue-irgen-async-typed-throws-noncopyable/— async typed throws with a nested generic error crashes IRGen (Issues#8); source evidence retained.swift-issue-irgen-typed-throws-nested-error-generic/— a typed-throws closure using a nested generic error crashes IRGen (Issues#9); source evidence retained.swift-issue-nested-generic-subscript-performance/— nested value-generic subscript access has debug-build overhead (Issues#10); benchmark and SIL evidence retained.swift-issue-nested-copyable-extension-bug/— same-file extension of a deeply nested~Copyabletype corrupts name lookup (Issues#11); forensic evidence retained.swift-issue-noncopyable-sequence-conformance/— an associated-type conformance leaksCopyableinto a nested~Copyabletype (Issues#12); source evidence retained.swift-issue-embedded-wasm-mandatory-perf-crash/— Wasm EmbeddedMandatoryPerformanceOptimizationsSIL crash on cross-module use of theTagged<Tag, Ordinal> + Tagged<Tag, Cardinal>operator; verified on Swift 6.3.2 Wasm SDK Embedded. Terminal record — not filed. (investigation-arc + standalone repro only; nowithKnownIssuetest harness yet)swift-issue-extension-table-uint16-datalength-overflow/— the serialized extension-lookup-tabledataLengthis written and read asuint16_t, so it overflows once one type's extensions exceed 65535 bytes of table data (EmitKeyDataLength,Serialization.cpp:239): crash (signal 6) on +assertions toolchains, silent module truncation on release (valid member references then fail ashas no member 'Artikel N'). Present 6.3.3 (silent) → 6.5-dev (asserts), unfixed. Natural trigger: a statute-book namespace with ~700 per-articleextensions (the real package overflows at 736). FILED — swiftlang/swift#90319 (2026-07-01). Upstream fix: widen the on-disk width touint32/VBR, or at minimum diagnose instead of silently truncating on release.swift-issue-functionsignatureopts-generic-typed-throws-error/—FunctionSignatureOpts!type.hasTypeParameter()assertion (SILArgument.cpp:40) at-Oon a generic function whose typed-throws error type carries its own generic parameter (swiftlang/swift#89617); present 6.2 → 6.5-dev, unfixed.swift-issue-noncopyable-extension-member-mangling-collision/— a member of awhere Element: Copyableextension and the same-signature member in the primary body of a type nested inextension P where Element: ~Copyablemangle to one symbol (the defaulted requirement is never mangled;ASTManglerthen treats the extension as unconstrained) — Sema-valid constraint-split twins die at IRGen withmultiple definitions of symbol; generalizes to~Escapable, any member kind, depth-2 nesting; present 6.2 → 6.5-dev, unfixed. Terminal record — STAGED, not filed (standing policy). Workarounds: member-levelwhereclause (SE-0267) or both twins extension-homed.swift-issue-noncopyable-rawlayout-trailing-field-miscompile/—~Copyablevalue-witness IRGen SSA dominance violation (LLVM "Instruction does not dominate all uses", signal 6 at-O) when a generic@_rawLayout(likeArrayOf:count:)buffer precedes a trailing scalar field in a type with adeinit. Swift 6.3.1 → 6.5-dev, macOS arm64 + Linux aarch64. Workaround: field reorder. Related toswiftlang/swift#86652. Terminal record — not filed.swift-issue-noncopyable-sametype-conditional-conformance/— the runtime cannot verify a conditional conformance whose same-type requirement RHS is a~Copyabletype: null-metadata SIGSEGV at-OnoneAND silent wrongisresults at any optimization level (catalog §A15; traced toProtocolConformance.cpp:1843); broken on every compiler × runtime combination tested, 6.2 → 6.5-dev, unfixed. Terminal record — STAGED, not filed (standing policy). Verified workaround recorded in-dossier; the shipped mitigation is theMemory.Poolingcapability seam.swift-issue-parameterized-typealias-opaque-return-ice/— parameterized-typealias × parameterized-protocol opaque-return ICE ("failed to produce diagnostic"); fixed upstream on Swift 6.4-dev nightly-main.swift-issue-pointer-arithmetic-linux-miscompile/— pointer-arithmetic release-mode miscompile (swiftlang/swift#77558); fixed on 6.4-dev nightly-main.swift-issue-rawlayout-noncopyable-deinit/—@_rawLayoutelement-destruction LLVM IR domination crash (swiftlang/swift#86652).swift-issue-rawlayout-noncopyable-extension-rejection/— unconditional protocol-conformance extension leaksCopyableback to the primary declaration of a~Copyable-generic nested type; workaroundwhere Element: ~Copyable. Terminal record — not filed.swift-issue-spm-identity-conflict-path-enumeration-hang/— SwiftPM graph-load hang: one package identity reachable under two canonical locations (e.g..gitvs bare spelling across an exact-string mirror table) enterscreateResolvedPackages' conflicting-identity branch, whosefindAllTransitiveDependencies(PR #8390) enumerates ALL paths with no visited set — exponential on dense DAGs, effectively non-terminating at institute scale. Present Swift 6.2 → 6.3.2 →main, unfixed. Workaround: dual-spelling mirror coverage + uniform.gitmanifest spellings; verify withswift build, nevershow-dependencies(its tree dumper is independently exponential). Terminal record — not filed. (topology reproducer viaevidence/gen-synthetic.sh; nowithKnownIssueharness — same deferral as the spm-planning-build-stall entry)swift-issue-spm-planning-build-stall/— SwiftPM planning-build stall at heavy consumers. Terminal record — not filed.swift-issue-tagged-noncopyable-atomic-metadata-crash/—Atomic<Tagged<Tag, Ordinal>>.advance(within:)runtime metadata SIGSEGV on Apple Swift 6.3.x (demangle-time lookup of a cross-module conditionalAtomicRepresentableconformance with~CopyableTag suppression); fixed on Swift 6.4-dev nightly2026-03-16-aand later. Terminal record — not filed.swift-issue-property-view-tag-constraint-cross-module/— cross-module constrainedProperty.Viewextensions are incorrectly diagnosed as redeclarations (Issues#13); exact multi-module evidence retained.swift-issue-rawlayout-deinit-cross-package/—@_rawLayoutelement deinitialization is skipped across package boundaries (Issues#14); exact package evidence retained.swift-issue-sil-verifier-read-escapable-lifetime/—_readyielding a~Escapablelifetime-dependent value fails SIL ownership verification (Issues#15).swift-issue-silgen-pack-expansion-cross-module/— a cross-module parameter-pack expansion call crashes SILGen (Issues#16).swift-issue-silgen-property-wrapper-noncopyable/— cross-module property-wrapper access on a~Copyabletype crashes SILGen (Issues#17).swift-issue-testing-suite-discovery-generic-specialization/— Swift Testing omits suites declared in generic-specialization extensions (Issues#18).swift-issue-testing-xcode-nested-suite-filter/— Xcode gutter actions report zero tests for deeply nested Swift Testing suites (Issues#19).swift-issue-typed-throws-autoclosure-inference/—@autoclosurepreventsNeverinference for typed throws (Issues#20).swift-issue-windows-existential-crash/— Windows debug-info mangling crashes for a cross-package existential type (Issues#21); both source identities are retained in one dossier.swift-issue-spm-repository-url-identity/— parent record for SwiftPM repository-URL identity and redirect behavior (Issues#22); the three remote fixtures remain active test infrastructure.