Skip to content

Cache only when the context corresponds to prefix #22982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Apr 11, 2025

Caching a lookup of c in a.b.c is ok at a.b.
A lookup from a.p should not see the cached value.

Fixes #22971

@som-snytt som-snytt force-pushed the issue/22971-import-implicit-object branch from 5e5d2c9 to 44976dc Compare April 11, 2025 22:55
@som-snytt
Copy link
Contributor Author

Flaky cats test.

@som-snytt som-snytt force-pushed the issue/22971-import-implicit-object branch from 44976dc to 9802dd6 Compare April 14, 2025 20:50
Caching a lookup of c in a.b.c is ok at a.b.
A lookup from a.p should not see the cached value.
@som-snytt som-snytt force-pushed the issue/22971-import-implicit-object branch from 9802dd6 to dfc67f5 Compare April 17, 2025 17:26
@som-snytt som-snytt marked this pull request as ready for review April 25, 2025 20:22
@som-snytt
Copy link
Contributor Author

This deals with the second-hardest problem after naming, but also the performance of the lint requires review, since this is an example of premature caching without benchmarking.

It might be preferable to ignore caching (for the sake of correctness) and only then do a review of performance. That also entails a review of architecture and whether mini-phase really serves the use case.

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.

False positive warning: unused import with certain combination of generics
1 participant