P6.x: read handler/provider given clauses via IR readers, not raw ast::CapRef - #1204
Open
accuser wants to merge 1 commit into
Open
P6.x: read handler/provider given clauses via IR readers, not raw ast::CapRef#1204accuser wants to merge 1 commit into
accuser wants to merge 1 commit into
Conversation
…::CapRef #1187 slice 1 (of the follow-on plan): add lower_handler_given_ir (sibling of lower_provider_given_ir), and convert every given-consumption site that feeds a deps-type or cross-context decision to read the CapRefIr it produces instead of walking bynk_syntax::ast::CapRef directly — project.rs's plan_agent_given_deps and EmitProjectCtx::agent_method_givens, emitter.rs's agent_given_caps_used/record_agent_call, emitter/emit.rs's effective_given/build_deps_object_ty_with_surface/cap_ref_ty (plus the provider-given call site it shares), and emitter/workers.rs's worker_cross_caps. ast_importers stays at 8 (both files were already counted for other reasons), but the real AST coupling is gone at every one of these sites. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#1187 slice 1 of the follow-on completion plan: add
lower_handler_given_ir(sibling oflower_provider_given_ir,bynk-emit/src/ir/lower.rs) and convert everygiven-consumption site that feeds a deps-type or cross-context decision to read theCapRefIrit produces, instead of walkingbynk_syntax::ast::CapRefdirectly.Converted sites:
project.rs'splan_agent_given_depsandEmitProjectCtx::agent_method_givensemitter.rs'sHandlerShared::agent_given_caps_used/record_agent_call/agent_given_caps_used()accessoremitter/emit.rs'seffective_given,build_deps_object_ty_with_surface,cap_ref_ty(plus the providergiven-to-deps-type call site, which now goes throughlower_provider_given_irtoo)emitter/workers.rs'sworker_cross_capsast_importersstays at 8 — bothemitter.rs/emitter/emit.rs/emitter/workers.rswere already counted for other reasons — but the real AST coupling at every one of these sites is gone.Test plan
cargo build --workspacecargo clippy --workspace --all-targetscargo fmt --all -- --checkBYNK_BLESS=1 cargo test -p bynkc --test e2e bless_positive_fixtures— zero fixture diffcargo test -p bynkc --test tsc_verify— realtsc --strict, all 6 passcargo test --workspace— full suite, includinggreenfield_status_table_is_current🤖 Generated with Claude Code