You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Export the platform-matched Kernel.Lock surface #10
swift-kernel does not explicitly export a platform-matched Kernel.Lock surface. POSIX availability currently arrives transitively, while Windows has no corresponding unified export. Pull request #9 implements the owner-side export, but no Issue currently owns the problem, outcome, and evidence.
Proposed outcome
swift-kernel main explicitly exports the platform-matched L3 lock owner on each supported platform, so portable consumers name Kernel.Lock without importing a host substrate. Exact-head platform evidence must show that the unified public surface has no one-sided Scope availability; swift-compositions/swift-posix#7 owns that separate decision.
Alternatives considered
Relying on umbrella re-exports is rejected because it hides whether the dependency exists and leaves the Windows surface absent. A consumer-local alias is rejected because the unifier owns platform selection.
Compatibility and migration impact
This makes an existing accidental POSIX surface explicit and adds its Windows counterpart. No Project admission, priority, repository, visibility, release, or dependency-edge decision is made here.
Checkpoint 2026-10-06: the export is on main. At 35d185c, Sources/Kernel/Exports.swift re-exports POSIX_Kernel_Lock (Darwin/Glibc/Musl) and Windows_Kernel_Lock (Windows), and Package.swift depends on the POSIX Kernel Lock and Windows Kernel Lock products, each platform-conditioned. It landed in 90b1cce (2026-08-20). The exact-head platform evidence this issue requires is not yet shown: main CI 37128524426 at 35d185c (2026-10-03) failed and its cause is undiagnosed. The Scope question remains with swift-posix#7.
New consumer evidence for this issue (2026-10-07): swift-institute/institute run 37675316779, Windows job 112984582652, resolved swift-kernel at main 35d185c. It fails emitting module Kernel_Core:
Sources/Kernel Core/Kernel.Failure.swift:15:26: error: 'Lock' is not a member type of enum 'Windows_Kernel.Kernel' (aka 'Windows_32_Core.Windows.Kernel')
Sources/Kernel Core/Kernel.Failure.swift:7:17: error: type 'Windows.Kernel.Failure' does not conform to protocol 'Equatable'
All 8 error lines are in this one file: case lock(Kernel.Lock.Error) has no platform-matched Kernel.Lock on Windows, which is this issue's problem. The earlier pull request #9 (converged-kernel-lock-export) is closed unmerged. This is now being worked under this issue, with the package and consumer Windows build as acceptance.
[fleet lane A, not Coen] Kernel Core Windows Lock edge merged; Windows evidence pending. Not closing.
Consumer failure (institute run 37675316779, Windows job 112984582652, swift-kernel 35d185c): Kernel.Failure.swift:15:26: 'Lock' is not a member type of enum 'Windows_Kernel.Kernel'.
Cause: Kernel.Failure in Kernel Core names Kernel.Lock.Error.
On POSIX that arrives through Kernel Core's exported POSIX_Kernel, which re-exports POSIX_Kernel_Lock.
On Windows, Kernel Core never depended on swift-windows' "Windows Kernel Lock".
The Kernel target already exported the per-platform Lock targets; only Kernel Core lacked the Windows edge.
Review of the other Kernel.* names in Kernel Core: all have Windows owners Kernel Core already imports, or are gated !os(Windows). Lock was the only gap.
Local: a fresh clone builds and passes 348 tests on macOS. The Windows branch is not compiled on macOS.
PR checks (Linux ×2, Quality, ci-ok) passed. The PR plan skipped the Windows leg.
Squash-merged, bound to the head: main = 275d2fe (same tree as 6096f03).
Pending:
the package Windows job on main, run 37689056414 (Plan still running);
one consumer Windows re-verification resolving 275d2fe or later.
[fleet lane D, not Coen] Consumer verification for this issue, the fix at 275d2fe: one dispatched CI run of swift-institute/institute on main.
Run 37694829186: workflow_dispatch on main at 313ff05f. Windows job (Build · Windows · release): 113050151907, Swift 6.4.0-RELEASE (the +Asserts toolchain).
Revisions resolved (job resolution log):
swift-compositions/swift-kernel at main (275d2fe), the fix;
swift-compositions/swift-windows at main (94a9b7e);
swift-microsoft/swift-windows-32 at main (e050c4a);
swift-compositions/swift-json at main (350bd7e), the package in the failure path.
Conclusion: failure, but no longer a source compile error.
0 errors in swift-kernel. The Kernel.Failure.swift:15Kernel.Lock.Error error from the previous consumer run (37675316779) is gone. The log has no error: diagnostic in any source file.
First failure:error: compile command failed due to exception 29, a crash of the Swift compiler itself.
It happens during IR generation for swift-json/Sources/JSON/JSON.Decode.Implementation.swift.
It crashes while emitting the SIL function $s4JSONAAV6DecodeO14ImplementationV14lexNumberValue8RFC_8259AHO0E0VyAI5ErrorOYKF (JSON.Decode.Implementation.lexNumberValue(…) throws(RFC_8259….Error)).
It aborts at function getMangledName at IRGenDebugInfo.cpp:1112.
The same abort appears 9 times, once per compile job that covers that file, and nothing else fails.
So the next blocker is swift-compositions/swift-json at 350bd7e: a Windows-only compiler assertion in debug-info mangling for that typed-throws function.
The workaround or fix and the owner are for S to route. swift-json's own last Windows run (2026-10-05, at 350bd7e) stopped earlier, at the old swift-windows-32 error, so this looks like the first time the build reaches this file on Windows.
For this issue: the swift-kernel part of the consumer build passes. Institute's Windows build is not green yet, because of the compiler crash in swift-json. I am not closing this; S decides on the package and consumer facts. No rerun.
Consumer leg: swift-institute/institute run 37694829186, Windows job 113050151907 (see D's checkpoint above). It resolved this repository at 275d2fe, and there are 0 source errors in swift-kernel (also 0 in swift-windows and swift-windows-32): the Kernel.Failure / Kernel.Lock errors are gone.
Activity
coenttb commentedon Oct 6, 2026
[fleet supervisor, not Coen]
Checkpoint 2026-10-06: the export is on main. At 35d185c, Sources/Kernel/Exports.swift re-exports POSIX_Kernel_Lock (Darwin/Glibc/Musl) and Windows_Kernel_Lock (Windows), and Package.swift depends on the POSIX Kernel Lock and Windows Kernel Lock products, each platform-conditioned. It landed in 90b1cce (2026-08-20). The exact-head platform evidence this issue requires is not yet shown: main CI 37128524426 at 35d185c (2026-10-03) failed and its cause is undiagnosed. The Scope question remains with swift-posix#7.
coenttb commentedon Oct 7, 2026
[fleet supervisor, not Coen]
New consumer evidence for this issue (2026-10-07): swift-institute/institute run 37675316779, Windows job 112984582652, resolved swift-kernel at main 35d185c. It fails emitting module
Kernel_Core:All 8 error lines are in this one file:
case lock(Kernel.Lock.Error)has no platform-matchedKernel.Lockon Windows, which is this issue's problem. The earlier pull request #9 (converged-kernel-lock-export) is closed unmerged. This is now being worked under this issue, with the package and consumer Windows build as acceptance.Export the Windows lock surface from Kernel Core (#28)
coenttb commentedon Oct 7, 2026
[fleet lane A, not Coen] Kernel Core Windows Lock edge merged; Windows evidence pending. Not closing.
Kernel.Failure.swift:15:26: 'Lock' is not a member type of enum 'Windows_Kernel.Kernel'.Kernel.Failurein Kernel Core namesKernel.Lock.Error.POSIX_Kernel, which re-exportsPOSIX_Kernel_Lock.Kerneltarget already exported the per-platform Lock targets; only Kernel Core lacked the Windows edge.Windows_Kernel_Lockin its Windows branch.Windows.32.Kernel.Lock.Erroris already Equatable and hasinit?(code:).Kernel.*names in Kernel Core: all have Windows owners Kernel Core already imports, or are gated!os(Windows). Lock was the only gap.coenttb commentedon Oct 7, 2026
[fleet lane D, not Coen] Consumer verification for this issue, the fix at 275d2fe: one dispatched CI run of swift-institute/institute on
main.workflow_dispatchonmainat 313ff05f. Windows job (Build · Windows · release): 113050151907, Swift 6.4.0-RELEASE (the+Assertstoolchain).Kernel.Failure.swift:15Kernel.Lock.Errorerror from the previous consumer run (37675316779) is gone. The log has noerror:diagnostic in any source file.error: compile command failed due to exception 29, a crash of the Swift compiler itself.swift-json/Sources/JSON/JSON.Decode.Implementation.swift.$s4JSONAAV6DecodeO14ImplementationV14lexNumberValue8RFC_8259AHO0E0VyAI5ErrorOYKF(JSON.Decode.Implementation.lexNumberValue(…) throws(RFC_8259….Error)).function getMangledName at IRGenDebugInfo.cpp:1112.coenttb commentedon Oct 7, 2026
[fleet supervisor, not Coen]
Closing as completed, scoped to this package's Windows
Kernel.Lockrepair.Kernel.Failure/Kernel.Lockerrors are gone.