PureYAML/docs/releases/pureyaml-0-4-1.md
Mihaela Mihaljevic 3dd92f8645
Some checks failed
rules-freshness / rules (push) Failing after 15s
chore(release): 0.4.1 builds for WASM, from the hosted SDK
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.
2026-11-16 00:31:19 +01:00

2.4 KiB

PureYAML 0.4.1

A fix release: a stream that begins with a byte order mark reads as the same document as without it.

Fixed

  • 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.

Behavior callers can meet

  • Positions on the first line 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 behavior libyaml has.
  • No public name is added, removed or renamed.

Verification

  • ByteOrderMarkTests: 15 single documents and 3 streams, through parse, parseLocated, parseStream and parseStreamLocated, each equal with and without the mark; without the change 25 of those checks fail.
  • macOS: style, namespacing, forbidden patterns, changelog, swiftformat lint, swiftlint strict, build and test: 696 tests in 153 suites, all passed.
  • Linux: build and test through the Linux relay (scripts/check-linux.sh): 696 tests, all passed.
  • A consumer, PureTree, parses its own documents with this tree through parseStreamLocated and parseLocated; PureTree takes the mark off before reading, so it does not depend on this fix.

Known deferred issues

  • 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.