linter
linter copied to clipboard
`depend_on_referenced_packages`: cache available dependencies
It looks like a simple cache of the calculated packages (avoiding needless extra trips to process the pubspec) stand to make depend_on_referenced_packages twice as fast in our benchmarks.
NOTE that I generally think mutable static anything in a lint is an anti-pattern but in this case safe and probably worth it. Very open to discussion!
/cc @bwilkerson @jakemac53
Current run:
Previous run:

Coverage increased (+0.002%) to 95.744% when pulling 4a010cfe268eedebc2db884ff4339dcb14594490 on depend_on_referenced_packages_perf into 765db2153371b1721a8b9cd407233bd3c1580709 on main.
SGTM
Good to land, @pq?
Hmmmm. I seem to recall an issue with this one. I'm inclined to just close it for now and re-open if/when someone can investigate.