Repository navigation
fix: restore E0007 for member access on unknown receivers - #4466
Conversation
⏭️ 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 (5)
💤 Files with no reviewable changes (1)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 6 remain after this review. 📝 WalkthroughWalkthroughThis change restores unresolved-member diagnostics for ChangesReflection diagnostics
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR restores the intended runtime-class reflection surface and reports successful targeted and broad validation; no actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Binary size checks passed✅ 7 passed
Generated by |
|
Applied the requested one-round SHIP-WITH-FIXES follow-up in d7c8724.
Validation:
|
|
Scope change per Antonio: this PR's revert half was split out to #4469, which merges on its own. This PR now carries ONLY the replacement value-side API ( |
…L#4469) ## Summary Byte-perfect revert of BoundaryML#4464's \`baml.Unknown\` companion: \`unknown\` returns to having no member surface, and runtime field reads return to the free-function spelling \`reflect.class.get_field<T>(obj, name)\`. Split out of BoundaryML#4466 at Antonio's direction: this revert half merges now; the replacement value-side API (\`reflect.class.instance_from\`) stays on BoundaryML#4466 for explicit human sign-off. ## Verification - \`git diff 15ea8c9 <this branch>\` is **empty** — the tree is byte-identical to pre-BoundaryML#4464 canary (\`15ea8c91c\`), which was CI-green as canary tip. - The single commit is the same revert commit that passed the full pinned five-package gate (3,750 tests) as the base of BoundaryML#4466's branch. ## Notes - BoundaryML#4464's completion/describe/keyword-docs additions and snapshots are all restored to their pre-BoundaryML#4464 state by construction (byte-identical tree). - The E0007 behavioral pin for \`unknown\` member access lands with BoundaryML#4466's replacement surface, not here — this PR is a pure revert. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Breaking Changes** - Removed the `Unknown` built-in type and its instance-based field access method. - Unknown values no longer provide instance-method completions for dynamic field access. - **Changes** - Runtime class field access now uses the reflective access API. - Updated diagnostics and documentation to reflect the supported field-access behavior. - Removed obsolete completion and regression coverage for the retired API. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
d7c8724 to
6b94f74
Compare
6b94f74 to
25d0afb
Compare
|
Force-pushed the human-ratified stripped scope in
The previous do-not-merge design hold no longer applies. This ready PR is back in the normal coordinator review/queue pipeline. |
Summary
The
reflect.class.Instance/reflect.class.instance_fromdesign was superseded and has been completely removed from this branch. This PR now retains only two independent fixes discovered during that work:unknownreceivers, preventing invalid calls such asunknown_value.get_field<T>("x")from reaching emission and failing inside the VMreflect.class.get_fieldnon-instance E0001 through the shared runtime diagnostic factory without changing its text or behaviorThere is no replacement reflection API in this PR. The separately ratified
reflect.AnyClassdirection is out of scope.Commits
fix: restore unknown member diagnosticsrefactor: share class reflection mismatch diagnosticValidation
CARGO_BUILD_JOBS=8 CARGO_INCREMENTAL=0 rustup run 1.93.0 cargo insta test --test-runner nextest -p baml_tests -p baml_cli -p baml_lsp2_actions -p baml_lsp2_actions_tests -p baml_surface --all-features --unreferenced=reject— 3,753 passed, 24 skipped; doctests clean; no unreferenced or pending snapshotsSuperseded-design cleanup verification
All commands were run after the final commits. Empty results are shown explicitly.
The final diff is limited to five files: the inference guard, its regression and changelog entry, the shared diagnostic factory, and the existing
reflect.class.get_fieldimplementation. There are no stdlib declarations, generated files, docs, completions, snapshots, or codegen changes.Summary by CodeRabbit
Bug Fixes
unknownvalues.Documentation