Files
wehub-resource-sync a06f331eb8
CI / benchmark (push) Has been skipped
install-script / posix-syntax (push) Successful in 6m1s
CI / build-onnx (push) Failing after 6m43s
init-smoke / dry-run (push) Failing after 15m57s
security / govulncheck (push) Has been cancelled
security / trivy-fs (push) Has been cancelled
CI / test (1.26, ubuntu-latest) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
CI / test (1.26, macos-latest) (push) Has been cancelled
CI / build-windows (push) Has been cancelled
CI / lint (push) Has been cancelled
install-script / powershell-syntax (push) Has been cancelled
install-script / install (macos-14) (push) Has been cancelled
install-script / install (ubuntu-latest) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:33:42 +08:00

22 lines
1.3 KiB
Go

// Package resolver lands cross-reference, import, and framework-dispatch edges
// the per-file extractors leave on `unresolved::` placeholders.
//
// Caching strategy. The batch resolver deliberately does NOT use a
// fixed-capacity LRU for its hot lookups. Each pass (relative-import binding,
// Rust/Lua/Razor module resolution, framework synthesis, cross-repo joins)
// builds its index maps once from the graph, uses them for that pass, and lets
// them fall out of scope when the pass returns. This per-pass-clear strategy is
// strictly better than an LRU here: it incurs no eviction bookkeeping, can
// never serve a stale cross-pass entry, and is bounded by the actual pass work
// set rather than a guessed capacity. There is therefore no
// resolver-cache-size knob — the maps are not user-tunable because they are not
// retained.
//
// The one resolver-adjacent cache that IS long-lived is the compile-DB
// include-dir set built for C/C++ include resolution: it is keyed by repo root
// and survives across reindexes, so it is bounded by a memory budget
// (GORTEX_RESOLVER_CACHE_MAX_MB; unset = unbounded) via a small LRU in the
// indexer package. That budget exists purely to cap a long-lived per-repo cache
// and has no effect on hot resolution.
package resolver