Repository navigation
fix: preserve strong references when grouping duplicate imports - #6432
Merged
oneandonlydean merged 1 commit intoOct 17, 2026
Merged
Conversation
Contributor
|
I ran the test this PR adds, on Linux. Setup: head 8f89496 merged into main at 92e5041 (no conflicts; the PR's base is 53 commits behind), Linux, Python 3.14.8, clean environment (
With the change, a strong import is kept whichever order the duplicates come in. This PR and #6113 both edit tools/import_audit.py; I checked that they merge together without conflicts. AI-assisted: yes |
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Duplicate references to the same NID/library currently inherit the last reference's weak flag. A strong reference followed by a weak one is therefore reported as weak, including in the current-stop record. Mark a grouped import weak only when every reference is weak. The regression verifies both mixed-reference orders, all-strong/all-weak cases, reference conservation, and stop consistency.
Tested
macOS 27.0.1 arm64, Python 3.12.14; tooling fixtures only, no title.
The new regression failed on main
ff23657before the fix. This branch was tested independently from that base.The combined local validation checkout containing all ten independent tooling fixes also built with
ANYPS5_RELINKER_ONLY=ON,BUILD_TESTING=ONand passed all 172 CTest tests. Full Windows/Linux runtime and GPU tests were not run.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository