Problem
Tests/Support/_Lock Test Process/main.swift's Windows branch (#else at the bottom of the file) constructs the lock descriptor as:
descriptor: Kernel.Descriptor(rawValue: handle),
where handle is the HANDLE returned by CreateFileW. On Windows, Kernel.Descriptor resolves (via swift-kernel's Kernel = Windows.Kernel typealias → swift-windows's Windows.Kernel.Descriptor typealias) to Windows.\32`.Kernel.Descriptorinswift-microsoft/swift-windows-32`. That type's only public constructor is:
public init(_rawValue: UInt)
— label _rawValue, not rawValue, and it takes UInt, not HANDLE. This is a call-site defect against an existing, stable L2 API — not a capability gap — so it belongs here rather than on the Windows owner. The POSIX branch of the same file (line 253) already calls the equivalent correctly: Kernel.Descriptor(_rawValue: rawFd).
This is a second, independent compile-time defect in the same helper file's Windows branch, distinct from the Kernel.Lock.Kind / .Range / .Token / extended-.Error capability gap tracked at swift-microsoft/swift-windows-32#9. It surfaces once that gap is closed and the Windows branch compiles far enough to reach this call.
Observable outcome
The Windows branch's descriptor construction becomes:
descriptor: Kernel.Descriptor(_rawValue: UInt(bitPattern: handle)),
(or the ecosystem's canonical HANDLE → UInt bit-pattern conversion, if composition/swift skill guidance names a different owner for that conversion — worth a quick check before landing, since a bespoke UInt(bitPattern:) at a call site is exactly the kind of reach-through the composition skill flags). A subsequent full-tier Windows (Swift 6.3, debug) CI run at swift-foundations/swift-kernel gets past this line once swift-microsoft/swift-windows-32#9 has landed and this fix is applied together with it — this issue alone does not turn the Windows leg green, since the Kind/Range/Token/Error gap still blocks compilation upstream of this line.
Scope note
Institute Work Project admission (i.e., whether this lands as scheduled/prioritized work) is a separate coordinator decision from this issue's filing.
Cross-references
Problem
Tests/Support/_Lock Test Process/main.swift's Windows branch (#elseat the bottom of the file) constructs the lock descriptor as:where
handleis theHANDLEreturned byCreateFileW. On Windows,Kernel.Descriptorresolves (viaswift-kernel'sKernel = Windows.Kerneltypealias →swift-windows'sWindows.Kernel.Descriptortypealias) toWindows.\32`.Kernel.Descriptorinswift-microsoft/swift-windows-32`. That type's only public constructor is:— label
_rawValue, notrawValue, and it takesUInt, notHANDLE. This is a call-site defect against an existing, stable L2 API — not a capability gap — so it belongs here rather than on the Windows owner. The POSIX branch of the same file (line 253) already calls the equivalent correctly:Kernel.Descriptor(_rawValue: rawFd).This is a second, independent compile-time defect in the same helper file's Windows branch, distinct from the
Kernel.Lock.Kind/.Range/.Token/ extended-.Errorcapability gap tracked at swift-microsoft/swift-windows-32#9. It surfaces once that gap is closed and the Windows branch compiles far enough to reach this call.Observable outcome
The Windows branch's descriptor construction becomes:
(or the ecosystem's canonical
HANDLE→UIntbit-pattern conversion, ifcomposition/swiftskill guidance names a different owner for that conversion — worth a quick check before landing, since a bespokeUInt(bitPattern:)at a call site is exactly the kind of reach-through thecompositionskill flags). A subsequent full-tier Windows (Swift 6.3, debug) CI run atswift-foundations/swift-kernelgets past this line once swift-microsoft/swift-windows-32#9 has landed and this fix is applied together with it — this issue alone does not turn the Windows leg green, since the Kind/Range/Token/Error gap still blocks compilation upstream of this line.Scope note
Institute Work Project admission (i.e., whether this lands as scheduled/prioritized work) is a separate coordinator decision from this issue's filing.
Cross-references
Tests/Support/_Lock Test Process/main.swiftatmain0ff2900.