Skip to content

Import graph: dart conditional imports, symlinked headers, kotlin extension properties, solidity basename guess #3660

Closed

Description

@squid-protocol

Part of #3641. Found by import_graph_accuracy.py --ledger, and validated by reading source; the shapes are in docs/self_scan/graph_comparison_ledger.json.

lang shape n layer what happens
dart fn:capture-missed 35 capture Conditional imports: import 'client_stub.dart' if (dart.library.js_interop) 'browser_client.dart' if (dart.library.io) 'io_client.dart'; (http/lib/src/client.dart:14). Only the first URI is captured, and the alternatives are real, platform-selected imports. These are exactly the repo's 35 if (dart.…) alternatives.
objective-c fn:truth-names-several-files 18 resolution #import "SDWebImageCompat.h": SDWebImage/include/SDWebImage/SDWebImageCompat.h is a symlink to Core/SDWebImageCompat.h. The resolver counts the symlink as a second candidate, finds the import "ambiguous", and draws no edge. Resolve by real path, so one file is one candidate.
kotlin fn:declaration-unresolved 17 resolution import com.squareup.kotlinpoet.metadata.isPrimary names an extension property (internal val KmConstructor.isPrimary, metadata/util.kt). Declared-name resolution (#3596) indexes functions and classes but not properties, so the import can't be matched.
solidity fp:truth-sees-no-import-in-file 24 resolution The fv/harnesses/*.sol files import ../patched/access/AccessControl.sol, but patched/ is generated at build time and isn't in the repo. The engine links the import to the same-named contracts/access/AccessControl.sol, a file the import doesn't name. A relative path that resolves to nothing should draw no edge rather than fall back to a basename search.

Measure: import_graph_accuracy.py --buckets 3. Dart recall is 95.3% today, objective-c 97.3%, kotlin 95.2%; solidity precision is 97.1%.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcore-engine

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions