Skip to content

v0.1.31 — same-class preference across files

Choose a tag to compare

@fiveapplesonthetable fiveapplesonthetable released this 17 May 01:16
· 158 commits to master since this release

Generalizes the C++ same-namespace narrowing rule in `cmd_build_resolutions::resolve_one` to all languages, after the same-file preference but before language-specific package narrowing.

Behavior

  • ref scope `[Outer, Inner]` + cand scope `[Outer, Inner]` → same class, prefer
  • ref scope `[Outer, Inner]` + cand scope `[Outer]` → implicit-this from inner class to parent, prefer
  • ref scope `[Foo]` + cand scope `[Bar]` → no match
  • Multiple candidates qualify → fall through (still truthful-unresolved for method calls)

Why this matters

Same-file preference (v0.1.27) catches self-calls within one file but misses partial classes, generated code, and inner-class implicit-this calls across files. Same-class preference closes that gap.

Live AOSP+Linux measurement (after build-resolutions rebuild)

Metric v0.1.28 v0.1.31
Refs resolved 23.7M 24.2M
Narrowed via Java context 7.5M 8.0M
`callers startActivity --def-in Activity.java` resolved 25 151 (6×)

Upgrading

Run `scry build-resolutions --index DIR` to rewrite the resolutions sidecar (~3 min on AOSP+Linux). No symbols/refs rebuild needed.