Fix import path boundaries and reuse absolute resolutions - #62
Open
TristanKruse wants to merge 2 commits into
Open
TristanKruse wants to merge 2 commits into
TristanKruse wants to merge 2 commits into
Conversation
This branch has not been deployed
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.
Summary
.../app, a resolved sibling under.../app2must be external. Previouslystartswith(project_root)classified it as internal, and the graph could drop the dependency entirely.clear_graph_cache()andCheckOptions(clear_cache=True)invalidate the session and its resolution cache.This PR is stacked on #61. It does not change the parser or the public rule API.
Correctness
git diff --checkpass.Performance (paired runs on one Windows host)
os.path.isfileprobes from 3,747 to 2,499.These measurements do not establish that ArchUnitPython is the fastest tool. In a separate same-session five-round end-to-end comparison on the same corpus, ArchUnitPython via pytest was 1.269 s, Tach 1.053 s, and Import Linter 0.789 s. That comparison is local diagnostic evidence, not a CI threshold.
The resolution cache assumes a stable project snapshot during a session, like the existing graph and file-inventory caches. Callers changing files should clear the cache before rechecking.