Skip to content

Avoid invalidation while deduplicating imports - #187

Open
ParadaCarleton wants to merge 1 commit into
JuliaTesting:mainfrom
ParadaCarleton:fix-invalidation-import-deduplication
Open

ParadaCarleton wants to merge 1 commit into
JuliaTesting:mainfrom
ParadaCarleton:fix-invalidation-import-deduplication

Conversation

@ParadaCarleton

Copy link
Copy Markdown

Summary

Use a concrete named-tuple key and a typed set when filtering duplicate explicit imports.
The previous abstract set reached union! and iterate(::KeySet) through Base._unique!.
DataStructures' SwissDict iterator method invalidated that path.
The vendored JuliaSyntax copy also contains the leaf_string inference issue addressed separately upstream.

Evidence

  • The key inference test failed with the original key expression and passes after the fix.
  • Pkg.test() passes on Julia 1.13, including a duplicate-import regression check.
  • A fresh-process DataStructures probe recorded five _unique! entries before the fix and zero after it.
  • The probe built SnoopCompile.invalidation_trees from the captured invalidations.
  • One analysis instance remains invalidated through vendored JuliaSyntax's parser and DataStructures' merge method.

https://claude.ai/code/session_0195j23jCF4CmnJZ6Li1p2uk

@codecov

codecov Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.14%. Comparing base (2ea249f) to head (dcc843b).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #187       +/-   ##
===========================================
+ Coverage   66.49%   95.14%   +28.65%     
===========================================
  Files          31       11       -20     
  Lines        6127     1587     -4540     
===========================================
- Hits         4074     1510     -2564     
+ Misses       2053       77     -1976     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant