Reconcile upstream through 5530676f with native resolver ports
Rust Self:: calls, C/C++ header lookups and Objective-C declarations now include the upstream fixes through 5530676f while retaining the fork's native resolver.
This reconciles eight upstream commits after 65d73423. It ports Rust foreign trait-implementation and Self:: dispatch rules into the kernel. C++ lookup recognizes listed declarators and follows transitive adjacent headers. Objective-C extraction includes globals, Foundation enums and implementation documentation. Rust files under src/build are indexed.
The owner-selection controls cover duplicate Rust type names across modules, inline modules and incremental removal. Unique owners still support implementations split across files. Objective-C header globals require import visibility, including C-only headers.
Validation:
- Optimized kernel and TypeScript/viewer builds passed; agent-doc and kernel-rule guards passed.
- Full suite passed 802 files, 9,677 tests, with 40 skipped. Focused integration cases also passed, including the owner-disambiguation regression controls.
- Golden dump regeneration passed 8/8; the only dump change adds an Objective-C global and its containment edge.
- Pinned json precision controls held, 11/11 absent and 7/7 present. jq has no declared precision cases; its 5,307 call edges are unchanged. Reviewed json graph changes remove unrelated-name links and add member/header links. No registered Rust precision corpus exists, so Rust coverage uses the integration cases.
README rows checked: upstream merge point and extraction/resolution coverage updated, with matching site documentation. Historical benchmark rows and their pinned comparison remain unchanged. No new performance measurement or claim.
Independent Astra review identified a duplicate-owner defect, reproduced and repaired with regression controls. The distinct Muse second read passed with no findings on the repaired state.
Merge with a merge commit to preserve upstream ancestry.
Summary by cubic
Reconciles the fork with the latest upstream merge, porting eight upstream fixes into the native resolver while keeping the fork's resolution approach.
Rust resolution
Self::calls now resolve to the enclosing impl's or trait's type, preferring inherent methods and leaving ambiguous trait impls unresolved.- Project trait impls on standard-library types (
String,Vec,Arc) are reached only with argument-type evidence or an in-scope project trait. - A private item now stays in its own module, so Rust files under
src/buildare indexed.
C++ and Objective-C extraction
- C++ declarations type every listed declarator (
ByteBuffer symbols_found, strings_found;), and a source implements a same-stem header it reaches through transitive includes. - Objective-C indexes Foundation enum macros (
NS_ENUM,NS_OPTIONS,CF_ENUM), file-scope globals and constants including inside@implementation, and doc comments above@implementationitems. Header globals require import visibility.
Merge with a merge commit to preserve upstream ancestry.
Summary by CodeRabbit
-
New Features
- Improved C/C++ navigation from declarations to definitions across transitive includes.
- Added support for Foundation/CoreFoundation enum macros and values, including Swift references.
- Added extraction of Objective-C implementation documentation and file-scope constants and globals.
- Rust files in
src/builddirectories are now indexed. - Improved Rust
Self::call resolution and trait-implementation matching. - Improved C++ method resolution for comma-separated variable declarations.
-
Bug Fixes
- Reduced incorrect Rust matches against unrelated standard-library or project implementations.
- Prevented Objective-C globals from incorrectly matching block parameters or same-named source-local symbols.