Skip to content

feat(deps): cy-yrz — rowan 0.16 + patch.crates-io to phall1/rowan SB fixes; drop cy-eu2 miri gates#43

Merged
phall1 merged 3 commits into
mainfrom
feat/cy-yrz
May 11, 2026
Merged

feat(deps): cy-yrz — rowan 0.16 + patch.crates-io to phall1/rowan SB fixes; drop cy-eu2 miri gates#43
phall1 merged 3 commits into
mainfrom
feat/cy-yrz

Conversation

@phall1
Copy link
Copy Markdown
Owner

@phall1 phall1 commented May 11, 2026

bumps cyrs to rowan 0.16 + wires [patch.crates-io] at our fork branch (phall1/rowan:fix/sb-node-cache-rehash) which carries upstream PRs #211 (avrabe, GreenNodeData→DST + Arc raw-ptr refcounts) + our #212 (GreenTokenData→DST). drops the cfg(not(miri)) gates we added to the cy-eu2 fmt fixpoint tests since the rehash UB they were dodging is fixed by the stack.

what changes

  • root Cargo.toml: rowan = "0.15""0.16"; new [patch.crates-io] rowan = { git = "https://github.com/phall1/rowan", branch = "fix/sb-node-cache-rehash" }
  • 0.15 → 0.16 was a literal zero-break upgrade. nothing in cyrs needed an API tweak.
  • crates/cyrs-fmt/src/lib.rs: removed cfg(not(miri)) gates on idempotent_around_fmt_off_directive and fixpoint_on_assorted_fixtures. both now run under miri and pass.
  • crates/cyrs-plan/src/lower.rs: cy-863 test (lower_statement_no_panic_on_unresolved_inside_patternpredicate_text) stays gated — removing it surfaced cy-208, a third upstream rowan SB violation in cursor::free (Box::from_raw(NodeData) races a SyntaxNodeChildren iterator's SharedReadOnly retag). distinct from the rehash bug, not covered by #211/#212. gate comment now points at cy-208.

validation

  • `cargo check --workspace --all-features` ✅
  • `cargo build` ✅
  • `cargo clippy --workspace --all-targets --all-features -- -D warnings` ✅
  • `cargo fmt --check` ✅
  • `cargo test --workspace` ✅
  • `cargo +nightly miri test -p cyrs-fmt -- idempotent_around_fmt_off_directive fixpoint_on_assorted_fixtures` ✅ (smoking gun — rowan SB rehash bug is dead with the patched fork)

next

once rust-analyzer/rowan merges #211 + #212 + cuts a 0.16.x release, this PR's `[patch.crates-io]` line gets removed and we go straight to crates.io rowan. cy-208 follow-up (cursor::free fix → upstream PR → drop the cy-863 gate) tracked separately.

refs: cy-yrz, cy-pom, cy-934, cy-208, cy-eu2, cy-863, rust-analyzer/rowan#211, rust-analyzer/rowan#212

Patrick Hall and others added 3 commits May 10, 2026 20:01
bumps rowan 0.15 -> 0.16 (zero API breaks observed) and wires
[patch.crates-io] at phall1/rowan branch fix/sb-node-cache-rehash
(stacks rust-analyzer/rowan#211 + our #212; branch is already on
0.16.2, no rebase needed).

removed the cfg(not(miri)) gates on:
- cyrs-fmt::tests::idempotent_around_fmt_off_directive (cy-eu2)
- cyrs-fmt::tests::fixpoint_on_assorted_fixtures (cy-eu2)
both pass under `cargo +nightly miri test -p cyrs-fmt` with the
patched rowan in place. the NodeCache rehash UB those tests were
exposing is fixed by the #211+#212 stack.

removed the cfg(not(miri)) gate on:
- cyrs-plan::lower::tests::lower_statement_no_panic_on_unresolved_inside_patternpredicate_text (cy-863)
this one still fails under miri — but with a *different* SB
violation. not the NodeCache rehash bug; this is in
`rowan::cursor::free` -> `Box::<NodeData>::from_raw` while a
sibling SyntaxNodeChildren iterator still holds a SharedReadOnly
retag of the same allocation. Strongly-protected. Reproduces on
the patched fork; #211+#212 don't touch cursor.rs so this was
never going to fix it.

per cy-yrz instructions: bailing rather than re-adding the gate as
a bandaid. WIP committed for inspection. Need a follow-up bead to
diagnose the cursor::free SB issue (likely needs a third PR
upstream, or a refactor of how cursor refcounts NodeData).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Removing the gate exposes a third distinct upstream rowan SB violation
in cursor::free (Box::from_raw races a SyntaxNodeChildren iterator's
retag). Filed cy-208; gate stays until the upstream fix lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…en .snap files

With the rowan SB rehash bug now fixed via the patched fork (this PR),
miri progresses past the SB block and hits the next failure: insta
opens .snap files at runtime, which miri's default isolation rejects.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
phall1 pushed a commit that referenced this pull request May 11, 2026
…-02r (gate-drop follow-up)

cy-208: fork patch shipped to phall1/rowan:fix/sb-node-cache-rehash
(commit 9e7abd1). Replaced Box::from_raw with drop_in_place+dealloc
in cursor::free + restructured to_next_sibling*/to_next_sibling_or_token
to scope &mut NodeData borrow before the free path. Per maintainer
ChayimFriedman2's "we're rewriting rowan anyway" comment, fork-only —
no upstream PR.

cy-02r (P3): tiny follow-up to drop the cy-863 cfg(not(miri)) gate
once cy-yrz (PR #43) merges and cyrs picks up the patched fork.
~3-line cyrs PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@phall1 phall1 merged commit c87dce6 into main May 11, 2026
73 of 84 checks passed
@phall1 phall1 deleted the feat/cy-yrz branch May 11, 2026 00:28
phall1 pushed a commit that referenced this pull request May 11, 2026
…e prep merged

cy-yrz (PR #43): rowan 0.15→0.16, [patch.crates-io] to phall1/rowan,
dropped cy-eu2 fmt cfg(not(miri)) gates. SB rehash bug confirmed dead
in CI logs.

cy-y1k (PR #44): workspace 0.1.0, manifest fields, CHANGELOG.md,
docs/release-playbook.md enumerates 19 publishable crates in dep
order. cargo publish + tag + binary builds remain manual user steps.

cy-02r is open (PR #45) — drops the cy-863 miri gate now that
cy-208's cursor::free fix is on the fork branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant