Repository navigation
chore(deps): take serde-saphyr 2.0.0 and yamled 0.0.7 - #136
Conversation
ReviewFull · 1 open
SummaryThis PR upgrades ctl-core to serde-saphyr 2.0.0 for YAML reading and yamled 0.0.7 for YAML editing. It also simplifies how errors inside aliased values are reported. Dependency changes
Alias error reportingIn serde-saphyr 1.3.0, an alias error arrived as pre-rendered English text with positions baked in. ctl-core had to parse those positions back out of strings like serde-saphyr 2.0 keeps the inner error structured, so
The TestsA new integration test,
Files
Open
History
|
serde-saphyr 2.0 keeps the error an aliased value raised as a structured inner error instead of English text with positions baked in. ctl-core now renders that inner error and takes its location, so the parser that pulled positions out of the alias text goes. The comments feature keeps the comment limits in Limits, and the localizer's alias_used_at suffix is dropped, because Problem already carries the file's line and column. yamled 0.0.7 moves to the same serde-saphyr and granit-parser majors, so the graph holds one copy of each.
9c8035c to
94a13a8
Compare
## ctl-core 0.6.23 - ctl-core reads YAML with serde-saphyr 2.0.0 and edits it with yamled 0.0.7. `Limits::budget()` now returns serde-saphyr 2.0's `Budget`; a caller that passes it to serde-saphyr 1.x must move to 2.0 with it. The `comments` feature is on, so the comment limits in `Limits` still apply. An error raised inside an aliased value keeps serde-saphyr's own wording and points at that value, followed by where the anchor is defined. ctl-core no longer parses positions out of the rendered alias text ([#136](#136)).
This moves ctl-core to serde-saphyr 2.0.0 and yamled 0.0.7. yamled 0.0.7 uses the same serde-saphyr and granit-parser majors, so
Cargo.lockholds one copy of each: granit-parser 1.3.0 → 2.0.0, serde-saphyr 1.3.0 → 2.0.0, yamled 0.0.5 → 0.0.7.Changes
Error::AliasErrorcarries the error the aliased value raised as a structurederror: Box<Error>. Before, it held an Englishmsgwith positions written into the text.Input::messagewalks through nestedAliasErrorandWithSnippetto the failing error.location(). When that location isLocation::UNKNOWN, it falls back to the anchor's.baked_positionsandtrailing_positionare removed; they parsed positions out of the 1.x text.Unplacedoverrides the newLocalizer::alias_used_atto return nothing, becauseProblemalready carries the file's line and column.commentsfeature is enabled. It gatesBudget::max_total_comment_bytes,max_buffered_comment_eventsandBudgetBreach::CommentBytes, whichLimitssets and reports.Document::parse,locate_nearest,Path::root/key/indexandLocation { line, column }, all unchanged in 0.0.7.Compatibility
Limits::budget()now returns serde-saphyr 2.0'sBudget. A caller that passes it to serde-saphyr 1.x must move to 2.0 too. The patch changeset says so. On an earlier build of this change, cargo-semver-checks 0.51.0 reported "no semver update required"; CI's semver step checks again here.Verification
CI verifies this branch. An earlier build of the same code change passed
mise run verifyandmise run semver, with yamled 0.0.5 standing in for 0.0.7. Since then the branch was rebased onto 0.6.22 and took yamled 0.0.7, so CI is the proof for this head.