test(fmt): cover baml.spawn paths in type positions - #4415
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe formatter documentation now describes keyword-like path segments in expressions and types. A regression test verifies that ChangesFormatter contextual paths
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to The PR preserves formatting for spawn namespace paths in type positions while keeping existing expression behavior covered; no actionable merge-blocking risk remains beyond normal checks. Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
⏭️ Performance benchmarks were skippedPerf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to To run them on this PR, do any of the following, then push a commit (or re-run CI):
|
Binary size checks passed✅ 7 passed
Generated by |
|
Closing as redundant: the reported formatter behavior was already fixed by #4341 ( |
Summary
baml.spawn.CancelTokenin parameter, return, class-field, and generic-argument type positionsRoot cause
spawnis lexed asKW_SPAWNeven when it appears as a namespace segment. The formatter previously expected a plainWORDin type paths. The shared contextual-keyword handling now accepts this valid parser output, but type-position coverage was missing.Impact
Files with signatures such as
tok: baml.spawn.CancelTokenremain formatable and formatter behavior stays aligned with the parser across all reported type positions.Validation
cargo test -p baml_fmt --lib(125 passed)cargo fmt --all -- --checkgit diff --checkLinear: B-1509
Summary by CodeRabbit
Bug Fixes
baml.spawn.CancelToken.Tests