Skip to content

RUE-1209: delete the vestigial named-method and destructor projections - #2083

Merged
steveklabnik merged 1 commit into
trunkfrom
claude/rue-1209-method-projection
Jul 29, 2026
Merged

RUE-1209: delete the vestigial named-method and destructor projections#2083
steveklabnik merged 1 commit into
trunkfrom
claude/rue-1209-method-projection

Conversation

@steveklabnik

@steveklabnik steveklabnik commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes RUE-1209. Refs RUE-1204, RUE-1027.

The semantic dependency manifest projected two body-level dependency channels that production never populates. named_method_dependencies and named_destructor_dependencies are extended only inside analyze_function_bodies_lazy, the whole-program body path; compose_queried_bodies — what production runs — records neither. Method and destructor call edges reach invalidation through the query-owned channel instead, as owner-qualified StableFreeFunctionDependency edges built from each reached body transaction's references. This is the same shape RUE-1204 removed for free functions.

Which channels are live

Which phase records a channel is what decides whether it is vestigial, and there are three:

Phase Status Channels
Whole-program body analysis (analyze_function_bodies_lazy) vestigial — production runs compose_queried_bodies free-function (removed by RUE-1204), named-method, named-destructor
Declaration binding (sema/typeck.rs) live — both body paths bind declarations declaration types, named consts
CFG construction live — both body paths build CFGs implicit named destructors

Implicit named destructors are therefore untouched. A probe on a fixture with a method call and a drop fn, run before deleting anything, reports:

methods = 0, destructors = 0, implicit_destructors = 2, free = 5

Zero named-method and zero named-destructor edges against two implicit ones — so only the first two are removable, and the emptiness is measured rather than inferred.

What changes

  • Delete both projections in the manifest translation, their *_events_translated counters, their tuple slots and completeness slots, and the StableNamedMethodDependency / StableNamedMethodDependencyTarget / StableNamedDestructorDependency types that only they constructed.
  • Drop the corresponding SemanticDependencyInputManifest fields and accessors, the CanonicalSemanticOutput accessors that are now unread, and the unstable.rs views over both. The CanonicalSemanticOutput fields themselves stay: they still feed unstable_parity_snapshot, so that snapshot is unchanged.
  • Update the differential oracle's fingerprint format string, which formatted both removed fields.

SemanticDependencySurface::GenericNamedMethodCall stays. Its manifest producer was vestigial, but a second producer is live and independent of the projection: every generic body owner takes a per-owner blocker on that surface. NonGenericNamedMethodCall and NamedDestructorCall lose their only producers and go, along with the now-unreachable DestructorEndpointUnavailable reason.

Behavior

The invalidation plan folded these edges into direct_dependencies and into the reverse-dependency closure. Both folds ran over permanently empty vectors, so removal is behavior-neutral. Confirmed by test rather than by inspection: incremental_invalidation_closes_across_method_and_destructor_bodies edits a leaf called from a method body and asserts the plan still closes over the calling method and its caller (invalidated = ["leaf", "main", "run"]) while an unrelated function stays reusable.

No public surface outside the compiler consumes any of the removed names, and unstable.rs is explicitly outside the supported facade's compatibility policy.

Verification

Each run captured by exit code:

  • scripts/rue quick — pass (debug-assertion policy valid, 92 reviewed; no debug_assert! added or removed, so the per-file counts in scripts/validate-debug-assert-policy.py are unchanged)
  • ./clippy.sh — pass
  • scripts/rue premerge — pass (78 targets, 0 failures)

The semantic dependency manifest projected two body-level dependency
channels that production never populates. `named_method_dependencies` and
`named_destructor_dependencies` are extended only inside
`analyze_function_bodies_lazy`, the whole-program body path;
`compose_queried_bodies` — what production runs — records neither. Method
and destructor call edges reach invalidation through the query-owned
channel instead, as owner-qualified `StableFreeFunctionDependency` edges
built from each reached body transaction's references.

Which phase records a channel is what decides whether it is live, and
there are three. Whole-program body analysis is vestigial for the reason
above. Declaration binding is live, because both body paths bind
declarations. CFG construction is live, which is why implicit named
destructor dependencies stay: a probe on a fixture with a method call and
a `drop fn` reports zero named-method and zero named-destructor edges
against two implicit ones, so only the first two are removable.

Delete both projections, their translation counters, their completeness
slots, and the stable edge types that only they constructed. The
invalidation plan folded these edges into `direct_dependencies` and into
the reverse-dependency closure; both folds ran over permanently empty
vectors, so removal is behavior-neutral.

`SemanticDependencySurface::GenericNamedMethodCall` stays. Its manifest
producer was vestigial, but a second producer is live: every generic body
owner takes a per-owner blocker on that surface, independent of the
projection. `NonGenericNamedMethodCall` and `NamedDestructorCall` lose
their only producers and go, along with the now-unreachable
`DestructorEndpointUnavailable` reason.

The `CanonicalSemanticOutput` fields keep feeding the parity snapshot;
only their accessors, now unread, are removed.
@steveklabnik
steveklabnik force-pushed the claude/rue-1209-method-projection branch from c279afc to 696efa9 Compare July 29, 2026 16:46
@steveklabnik
steveklabnik marked this pull request as ready for review July 29, 2026 17:14
@steveklabnik
steveklabnik added this pull request to the merge queue Jul 29, 2026
Merged via the queue into trunk with commit 6cb462d Jul 29, 2026
22 checks passed
@steveklabnik
steveklabnik deleted the claude/rue-1209-method-projection branch July 29, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants