Revert Cargo.toml union-merge driver — it mangles [[example]] blocks#236
Conversation
The `Cargo.toml merge=union` .gitattributes (added while resolving the chained
example-PR conflict cascade) is the wrong tool for structured TOML. `union`
keeps both sides of a conflict hunk line-by-line, so when two branches add an
`[[example]]` block at the same anchor it interleaves them into a single block
with two `name =` keys:
[[example]]
name = "gridlake_field_tile"
name = "subpel_tap_tile" # <- duplicate key → `cargo` refuses to parse
required-features = ["std"]
That is worse than a normal conflict (which at least shows clear markers). CI
catches it, but only after a broken merge. For an append-only list of
multi-line blocks the right resolution is a plain 3-way merge (resolve markers
by keeping both blocks intact), not a line-union. Removing the driver.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
|
Warning Review limit reached
Next review available in: 25 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What / why
While resolving the chained example-PR conflict cascade, I added a
.gitattributeswithCargo.toml merge=union. That was a mistake —unionis the wrong tool for structured TOML and this PR removes it.unionkeeps both sides of a conflict hunk line-by-line. When two branches add an[[example]]block at the same anchor, it interleaves them into a single block with twonamekeys:That's worse than a normal conflict — a plain 3-way merge shows clear markers you resolve by keeping both blocks intact, whereas union silently produces broken TOML (caught by CI only after the fact). It reproduced exactly this way during the last rebase of #235.
For an append-only list of multi-line blocks, plain 3-way merge is correct. Removing the driver.
Docs/tooling only — no code change.
🤖 Generated with Claude Code
Generated by Claude Code