app: factor inspect lib_exports' import grouping into a pure function and pin it with unit tests #471
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/471"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T21:40:44Z.
What this changes
Refs #470. One change:
apps/victory/src/inspect.rs'slib_exportsgrouped a library file's imports by DLL inline while printing; that grouping is now a pureimports_by_dll(&[LibImport]) -> BTreeMap<String, Vec<String>>, pinned by unit tests. No change to the printed output.Pinned rules: DLL names lowercased (so
KERNEL32.dllandkernel32.DLLare one group), DLLs in name order (BTreeMap), each DLL's exports in file order, an ordinal export rendered as#Nregardless of import kind, empty input groups to nothing.How it was tested
cargo test -p victory— 15 lib tests pass, including the 2 newinspect::tests(arm64 host, toolchain 1.98.1)cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings— passcargo xtask policy— pass (398 files ok)Checklist
VICTORY_*variable and documented — n/a, none addedImported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-28T01:35:01Z.
Review: DISMISSED
Check report (helping the maintainer clear the queue):
checkandmacos-scriptsgreen on the current head.imports_by_dllis factored out oflib_exportsunchanged and pinned by two tests (it carries #467's commits, merged just before).226645f9) merged with this PR and the other test/docs/tools PRs we're landing in this batch (#397 #399 #422 #467 #471 #475 #479 #481 #486 #489 #494 #498 #505 #511). On it, thevictory-gpu(arm64),victory-shader,victory-backend,victory-metalandvictorytests pass, as do the macOS script tests (rustup-path.sh,run-summary-compare.sh,run-summary.sh --self-test), Windows clippy (-D warnings) andcargo xtask policy. Onevictory-gpurun in four failed main's ownmulti_mip_array_and_placed_depth_twins_preserve_all_subresources_and_remirror_immediately. That test also flakes on main alone, so it isn't from this batch.Thanks @AnastasisKon!
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-28T01:37:40Z.
Review: DISMISSED
Re-approving: my approval above was dismissed automatically when #467, whose commits this branch carries, merged. The head is unchanged (
c377c42c), so the check report above still applies.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-28T01:58:24Z.
Review: CHANGES_REQUESTED
Sorry for the back and forth, @AnastasisKon. My approval above still stands for the code (head
c377c42c), but GitHub kept this PR blocked as "review required" after #467 merged, and I couldn't merge it. Meanwhile #503 merged, and it adds its own#[cfg(test)] mod testsat the end ofapps/victory/src/inspect.rs, so this branch now conflicts there.Could you merge current
maininto the branch and fold the two test modules into one (imports_by_dll's tests next todll_flags's, with both imports)? The new push should also clear the stuck review state. Once CI is green on the new head, we'll merge it.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T10:18:28Z.
Merged current main into the branch and resolved the conflict keeping both sides, as requested. CI is green on the new head and the PR shows mergeable. Ready for re-review.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:31:50Z.
Re-requesting review: conflicts with current main are resolved, CI is green on the latest head, and the earlier approval was noted as still standing. Ready to merge when you are.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T15:27:21Z.
The branch is now based on the current public
main(26817285), which already contains the #467/#494/#503 merges, and GitHub showsmergeable=true(the earlier conflict was against the newer private main). The requested shape is in place: one `#[cfg(test)] mod tests` in `apps/victory/src/inspect.rs` with both import sets (`imports_by_dll` next to `dll_flags`). Could you re-review when you get a chance?Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T18:16:44Z.
Pushed a new head (
b347a47b, an empty commit on top of3a1fbacf) to clear the stuck review state, as suggested. No code change: the branch already merges publicmain26817285, which carries both #467 and #503, andgit merge-treeshows zero conflicts against it. CI is re-running on the new head. Ready to merge when you are.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.