Skip to content
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

improvement: don't run compileAndLookForNewReferences #6429

Merged
merged 7 commits into from
Jun 4, 2024

Conversation

kasiaMarek
Copy link
Contributor

@kasiaMarek kasiaMarek commented May 23, 2024

Previously we would run recompile for inverse build targets after go to references to find if there are no new references. This would cause a lot of recompilations in presence of compilation errors. Since now we use pc as fallback for finding references we can use it always for files that have stale semanticdb.

resolves: #6348

Since now a lot more tests use pc for references this showed a few issues with that. The fixes probably have to also be migrated to Scala 3 pc.

@kasiaMarek kasiaMarek marked this pull request as draft May 23, 2024 14:53
@kasiaMarek kasiaMarek force-pushed the i6348 branch 2 times, most recently from 886e95d to 52debb7 Compare May 27, 2024 09:24
@kasiaMarek kasiaMarek marked this pull request as ready for review May 27, 2024 10:41
@kasiaMarek kasiaMarek requested a review from tgodzik May 27, 2024 10:41
@@ -82,7 +87,8 @@ final class ReferenceProvider(
0.01,
)

val entry = IdentifierIndex.IndexEntry(id, bloom)
val entry =
IdentifierIndex.IndexEntryWithStaleInfo(id, bloom, isStale = false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just IndexEntry? IndexEntryWithStaleInfo sounds like it actually always is stale.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just don't need that field in identifierIndex. The naming is quite unfortunate, so I'm open to suggestions. Should I just have this useless field be in identifierIndex too?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MaybeStaleIndexEntry ? Not perfect either


try toSymbols(pkg, names)
val (toNames, rest) =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic here seems duplicated with WorkspaceSymbolSearch

@kasiaMarek kasiaMarek force-pushed the i6348 branch 2 times, most recently from f0d5843 to 9ed940e Compare May 29, 2024 09:17
@kasiaMarek kasiaMarek requested a review from tgodzik May 29, 2024 10:15
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Let's just make sure the LSP tests are passing, I rerun them for you.

@kasiaMarek kasiaMarek merged commit 06b75bb into scalameta:main Jun 4, 2024
24 checks passed
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.

Find reference triggers project recompilation under certain conditions
2 participants