-
Notifications
You must be signed in to change notification settings - Fork 511
Share indexes among workspaces #2811
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
Conversation
|
If it makes sense, this should probably close out #2723 . |
src/javaServerStarter.ts
Outdated
| function resolveIndexCache(context: ExtensionContext) { | ||
| let sharedIndexLocation: string = getJavaConfiguration().get("sharedIndexes.location"); | ||
| if (sharedIndexLocation === "$DEFAULT_CACHE") { | ||
| sharedIndexLocation = path.resolve(context.globalStoragePath, "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.
globalStoragePath is deprecated. Maybe consider using globalStorageUri and get the path only when the scheme is file?
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.
this is outdated. we have changed it to some OS specific cache directory.
|
Comments:
|
|
I've seen general pushback to using the user home directory to store cache data. Instead, look into using OS specific cache directories, eg. ~/Library/Caches on MacOS |
f42c86b to
00a7403
Compare
| export function getSharedIndexCache(): string { | ||
| let location: string = getJavaConfiguration().get("sharedIndexes.location"); | ||
| if (!location) { | ||
| switch (process.platform) { |
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.
Is there a reason you abandoned the use of context.globalStorageUri ?
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.
In our last sync-up meeting, one comment is to save the index into the OS specific cache directory, some place like what Gradle does. That's why I changed the cache from the global storage location to some OS specific directory.
…n shared indexes Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
96b9d5e to
f8ac050
Compare
Signed-off-by: Jinbo Wang <[email protected]>
Requires eclipse-jdtls/eclipse.jdt.ls#2341
Provide a setting to control the shared index location, by default, it uses the global extension cache as the common index location.