diff --git a/build.ps1 b/build.ps1 index f793e9f..aa8f931 100644 --- a/build.ps1 +++ b/build.ps1 @@ -155,8 +155,22 @@ function Build-Protocol([hashtable]$sql) { function Build-Core([hashtable]$sql) { Write-Step 'core: building NucleicCore (full Windows manifest)' Write-Note 'Expected to fail until the ยง12 item 7-9 shims land โ€” the errors ARE the M0 gap list.' - if ($Test) { return Invoke-Swift @('test', '--filter', 'NucleicCarbonTests') $sql } - return Invoke-Swift @('build', '--target', 'NucleicCore') $sql + # NucleicCore only EXISTS when NUCLEIC_WINDOWS_PROTOCOL_ONLY is absent: with it set, + # Package.swift narrows the manifest to [NucleicProtocol, NucleicProtocolTests] and this + # fails with "no target named 'NucleicCore'". CI never sets it for this job, but a local + # shell that ran the protocol leg by hand keeps it โ€” so clear it just for this build and + # hand it back afterwards. + $inherited = $env:NUCLEIC_WINDOWS_PROTOCOL_ONLY + if ($inherited) { + Write-Note 'Ignoring inherited NUCLEIC_WINDOWS_PROTOCOL_ONLY โ€” core needs the full manifest.' + Remove-Item Env:\NUCLEIC_WINDOWS_PROTOCOL_ONLY + } + try { + if ($Test) { return Invoke-Swift @('test', '--filter', 'NucleicCarbonTests') $sql } + return Invoke-Swift @('build', '--target', 'NucleicCore') $sql + } finally { + if ($inherited) { $env:NUCLEIC_WINDOWS_PROTOCOL_ONLY = $inherited } + } } function Build-Broker {