chore(release): stamp 0.4.1
Some checks failed
rules-freshness / rules (push) Failing after 14s

The byte order mark fix, with its release notes. macOS and Linux
696 tests each; WASM and Windows not run, as the notes say.
This commit is contained in:
Mihaela Mihaljevic 2026-11-16 00:25:16 +01:00
parent bdb2ed646e
commit fbc0ca269b
4 changed files with 37 additions and 9 deletions

View File

@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.4.1] - 2026-11-16
### 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. 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.

View File

@ -22,7 +22,7 @@ C-backed parsers. The package is intentionally strict about portability:
## Status
The current release is 0.4.0. It includes block mappings, block sequences,
The current release is 0.4.1. It includes block mappings, block sequences,
ordered mappings, common scalars, quoted strings, comments, flow collections,
literal and folded block scalars, anchors, aliases, YAML directives, document
markers, explicit built-in scalar tags, merge-key expansion, complex mapping keys,

View File

@ -1,8 +1,8 @@
# Release Process
PureYAML versioning is driven by Git tags. The current release is 0.4.0.
PureYAML versioning is driven by Git tags. The current release is 0.4.1.
## 0.4.0 Release
## 0.4.1 Release
- Swift tools version: 6.1
- Products: `PureYAML`, `PureYAMLJSON`
@ -10,7 +10,7 @@ PureYAML versioning is driven by Git tags. The current release is 0.4.0.
- Source targets: Swift only, no C targets and no generated parser targets
- Hosted CI matrix: macOS build and test, Linux build and test, Windows build
and test, WASM build
- Release notes file: `docs/releases/pureyaml-0-4-0.md`
- Release notes file: `docs/releases/pureyaml-0-4-1.md`
## Local Verification
@ -59,17 +59,17 @@ Only run these commands after the local gates pass and hosted CI passes.
```sh
git status --short --branch
git tag -a 0.4.0 -m "PureYAML 0.4.0"
git push origin main 0.4.0
git tag -a 0.4.1 -m "PureYAML 0.4.1"
git push origin main 0.4.1
tea releases create --login aleahim --repo NodetteHQ/PureYAML \
--tag 0.4.0 --title "PureYAML 0.4.0" \
--note "$(cat docs/releases/pureyaml-0-4-0.md)"
--tag 0.4.1 --title "PureYAML 0.4.1" \
--note "$(cat docs/releases/pureyaml-0-4-1.md)"
```
After publishing, verify the release exists:
```sh
git ls-remote --tags origin 0.4.0
git ls-remote --tags origin 0.4.1
tea releases list --login aleahim --repo NodetteHQ/PureYAML | head
```

View File

@ -0,0 +1,26 @@
# 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 was NOT built for this release: the `swift-6.3.2-RELEASE_wasm` SDK is not installed on the machine the gate ran on.
- 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.