chore(release): 0.4.1 builds for WASM, from the hosted SDK
Some checks failed
rules-freshness / rules (push) Failing after 15s

check-wasm.sh takes the swift of the toolchain to use. The SDK and the
toolchain are hosted on an external disk; the notes record the build.
This commit is contained in:
Mihaela Mihaljevic 2026-11-16 00:31:19 +01:00
parent fbc0ca269b
commit 3dd92f8645
4 changed files with 23 additions and 2 deletions

View File

@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- A stream that begins with a byte order mark (U+FEFF as text; the bytes EF BB BF) reads as the same document as without it. The mark was skipped but counted as a column, so the first line sat one column to the right of every other line: a block sequence (`- a`, `- b`) failed with `did not find expected <document start>`, and a comment on the first line with `found a comment without a preceding space`; a document of one mapping line happened to parse. The mark that opens the stream no longer advances the column, as in libyaml, whose reader takes it as the byte order of the input before the scanner sees a character. Positions on the first line therefore do not count the mark: a caller that turns a line and column into an offset in a string that starts with the mark adds one. A mark at the start of a later line keeps the behaviour libyaml has. Held by `ByteOrderMarkTests` over 15 single documents and 3 streams, through `parse`, `parseLocated`, `parseStream` and `parseStreamLocated`; without the change 25 of those checks fail.
### Changed
- `scripts/check-wasm.sh` takes `SWIFT_WASM_SWIFT`, the `swift` of the swift.org toolchain to use, which wins over swiftly; with `SWIFT_WASM_SDK_ID` it runs the gate on a machine whose installed SDK is not the script's default (6.3.2). The SDK and toolchain are hosted on an external disk (`docs/RELEASE.md`).
## [0.4.0] - 2026-11-15
### Fixed

View File

@ -39,6 +39,15 @@ bash scripts/check-wasm.sh
The Linux and Windows checks must exercise build and tests. The WASM check must
build the library target with the configured Swift Wasm SDK.
On the machine that hosts the Swift SDKs and the swift.org toolchain on an external disk (`/Volumes/Code2/DeveloperExt/swift`, with a README), name
the installed ones, since the script defaults to 6.3.2:
```sh
SWIFT_WASM_SDK_ID=swift-6.3.3-RELEASE_wasm \
SWIFT_WASM_SWIFT="$HOME/Library/Developer/Toolchains/swift-6.3.3-RELEASE.xctoolchain/usr/bin/swift" \
bash scripts/check-wasm.sh
```
## Hosted Verification
Push `main` and wait for the CI workflow to pass:

View File

@ -20,7 +20,7 @@ A fix release: a stream that begins with a byte order mark reads as the same doc
## Known deferred issues
- WASM was NOT built for this release: the `swift-6.3.2-RELEASE_wasm` SDK is not installed on the machine the gate ran on.
- WASM: built, debug and release, by `scripts/check-wasm.sh` with the swift.org toolchain 6.3.3 and the `swift-6.3.3-RELEASE_wasm` SDK (the script defaults to 6.3.2; `SWIFT_WASM_SDK_ID` and `SWIFT_WASM_SWIFT` select the installed one). The tests were not run on WebAssembly: this is a build.
- Windows build and test were NOT run: there is no runner for it yet. The tree is pure Swift.
- The hosted CI run was not watched: this server's API does not list runs, so the authoritative platform gates are the local ones.
- The reader is still the libyaml port and folds U+0085, U+2028 and U+2029 as line breaks in YAML text, which YAML 1.2 does not. Unchanged.

View File

@ -2,11 +2,19 @@
set -euo pipefail
# The WASM gate needs a swift.org toolchain (Xcode's cannot target WebAssembly) and the Swift SDK for WebAssembly of the same version.
# SWIFT_WASM_SDK_ID the SDK, `swift sdk list` names it (default swift-6.3.2-RELEASE_wasm)
# SWIFT_WASM_SWIFT the `swift` of the swift.org toolchain, when it is not the one swiftly selects; it wins over swiftly
# SWIFT_WASM_SWIFT_SELECTOR the swiftly selector (default +6.3.2)
# On the machine that hosts them (SDK and toolchain kept on an external disk):
# SWIFT_WASM_SDK_ID=swift-6.3.3-RELEASE_wasm SWIFT_WASM_SWIFT=~/Library/Developer/Toolchains/swift-6.3.3-RELEASE.xctoolchain/usr/bin/swift bash scripts/check-wasm.sh
SDK_ID="${SWIFT_WASM_SDK_ID:-swift-6.3.2-RELEASE_wasm}"
SWIFT_SELECTOR="${SWIFT_WASM_SWIFT_SELECTOR:-+6.3.2}"
swift_command() {
if command -v swiftly >/dev/null 2>&1; then
if [ -n "${SWIFT_WASM_SWIFT:-}" ]; then
"$SWIFT_WASM_SWIFT" "$@"
elif command -v swiftly >/dev/null 2>&1; then
swiftly run swift "$@" "$SWIFT_SELECTOR"
else
swift "$@"