summaryrefslogtreecommitdiffstats
path: root/ARCH_REVIEW.md
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-21 11:06:01 +0000
committeraur-build <aur-build@localhost>2026-11-21 11:06:01 +0000
commit7f5d3dc2ae540b7d4faf5e8c854e638fe70b9fd3 (patch)
treef5e71b0e80e430bc0ec0b3956968bbdc38af40b6 /ARCH_REVIEW.md
parent7ccfb9a8f96b6f3000f36bdf76d95a4f6afd2826 (diff)
downloadaur-build-7f5d3dc2ae540b7d4faf5e8c854e638fe70b9fd3.tar.gz
aur-build-7f5d3dc2ae540b7d4faf5e8c854e638fe70b9fd3.zip
tools: a re-export is not a call, and an alias is not a stranger
The auditor's `open_reviews_for` was invisible for one reason: the cross-module mention index counted `pub use` lines as production use, so the item was discarded before it could become a row. The tool's own docstring already said "a re-export is not a call" — the rule was simply applied to the in-module loop and never to the cross-module one. Two implementations of one idea, one of them ignored. Fixing that exposed the next layer, because once re-exports stop counting, the calls that remain are mostly made through a name the declaring module did not choose: - `ap::approve(..)` from `use crate::review::{approve as ap, ..}` - `sources::recipe_hash(..)` from `use crate::watch::sources;` - `crate::db::model::BUILD_STEPS` — a path is not just its last token - `candidates::mark_viewed(..)` — an item declared in `db`, re-exported by `review`, and called through `review` So the mention resolver now resolves import prefixes, walks the whole qualified path, and follows re-export edges (collected from the entire `use` statement, not just its first line — the names live on the continuation lines, which is how `mark_viewed` hid too). It also learned the opposite lesson. `Vec::new()`, `v.parse::<u64>()` and `stop.load(..)` are not mentions of `db::new`, `pkgver::parse` or `pipeline::load`. Treating every unresolvable receiver as ambiguous buried the real rows, so a qualified mention must now name a crate module or an imported prefix to count as anything, and a method name declared in exactly one module is credited on a value receiver — `cfg.validate()` is `config::validate`, because nothing else in the crate could mean it. With that, the ambiguous column is empty instead of full of noise. `use_block_lines`, `gated_declarations`, `line_context` and `use_prefixes` each re-read their file on every call — 15,280 reads of the same dozen files, two and a half minutes per run. Memoised: 20.7s, same output.
Diffstat (limited to 'ARCH_REVIEW.md')
0 files changed, 0 insertions, 0 deletions