Add inferred throws inlay hints - #4595
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
⏭️ 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):
|
|
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 (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe IDE now emits inferred ChangesInferred throws hints
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change adds declaration-site hints for inferred non-never throws clauses while suppressing explicit and synthetic cases; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant UserDefinedFunction
participant AnnotationBuilder
participant LSPDispatcher
participant LSPClient
UserDefinedFunction->>AnnotationBuilder: provide inferred throws contract
AnnotationBuilder->>LSPDispatcher: emit Throws annotation
LSPDispatcher->>LSPClient: return TYPE inlay hint
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 |
Binary size checks failed❌ 2 violations · ✅ 5 passed
Details & how to fixViolations:
Add/update baselines:
[artifacts.baml-cli]
file_bytes = 82832384
stripped_bytes = 82832384
gzip_bytes = 27814411
[artifacts.packed-program]
file_bytes = 30711093
gzip_bytes = 10670634Generated by |
Changes
throwsclauses.callable_throwsand source-aware type rendering, with no compiler changes.Testing
cargo test -p baml_ide -p baml_lspcargo clippy -p baml_ide -p baml_lsp --all-targets -- -D warningsRUSTDOCFLAGS='-D warnings' cargo doc -p baml_ide -p baml_lsp --no-depsScreenshots
Not applicable.
PR Checklist
Summary by CodeRabbit
New Features
throwsclauses for functions that may raise user-defined errors.throwsor cannot throw.Tests