-
Notifications
You must be signed in to change notification settings - Fork 413
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
Share indexes among workspaces #2341
Merged
testforstephen
merged 7 commits into
eclipse-jdtls:master
from
testforstephen:jinbo_index
Jan 16, 2023
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
301f48a
Share indexes among workspaces
testforstephen 3a08be5
Ask a read lock before copying local index
testforstephen e4906fd
Wait for index ready before copy & Cleanup unused local indexes
testforstephen e57ff86
Wait for index ready before copy
testforstephen b9dcb1e
trigger reindex when the external library contents has changed
testforstephen 425fe2b
Add unit test
testforstephen 1a0a3d4
Update TP to I20221215-1800 build
testforstephen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Ask a read lock before copying local index
- Loading branch information
commit 3a08be5af43bc6db5c597830da52f6854b073d5c
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might happen that after project imported, the index manager has not setup the index locations, then we skip a lot of local index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the job to write out the indices is done in the background, so you can definitely have a case where for large libraries, they are still being written to disk after import. This is one of the reasons why in Eclipse (and likely VS Code) you can try to search after the project is imported and not get any results.
Would something like https://github.com/eclipse/eclipse.jdt.ls/blob/250ac4ff3d169ad56bf68bf6cb7bb48ef181be1f/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/JobHelpers.java#L242 help ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waitUntilIndexesReady
seems to work quite well. It can ensure all indexes are generated before copying.