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

lemminx logfile: fallback to global storage #814

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

mkhl
Copy link
Contributor

@mkhl mkhl commented Nov 18, 2022

when opening an xml file outside of a workspace, this extension always create a folder ~/.lemminx to store the language server log file (even when the xml.server.workDir preference is set to some other directory)

since it uses the workspace storage in the context of a workspace, it seems more sensible to fallback to the global storage instead.
(i also consider creating random folders in users' homes bad form but that's just preference)

@rgrunber
Copy link
Member

@datho7561 , let me know if you see any downsides to this. I think it makes sense to avoid placing things in the user's home folder if possible.

Also xml.server.workDir seems like a really weird property name for cached schema storage. I wonder if it makes sense to have that also default to the plugin's global storage location.

@datho7561 datho7561 self-requested a review November 18, 2022 15:16
@datho7561
Copy link
Contributor

I'll take a look at it. The default cache directory for lemminx can't be in the VS Code global workspace (because it might not be running in VS Code), but I think it makes sense to set the cache directory to be in the global workspace when running from VS Code.

@datho7561
Copy link
Contributor

@mkhl it looks good, and I think this is the right approach. There are some linting and compile errors. When you get a chance, could you please address them?

@mkhl
Copy link
Contributor Author

mkhl commented Nov 18, 2022

@mkhl it looks good, and I think this is the right approach. There are some linting and compile errors. When you get a chance, could you please address them?

done. i just had to find the "Fix package-lock.json" ci step to get it working 😅

Copy link
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks @mkhl !

@datho7561 datho7561 added this to the 0.23.0 milestone Nov 21, 2022
@datho7561 datho7561 added the enhancement New feature or request label Nov 21, 2022
@datho7561 datho7561 merged commit 8f8688c into redhat-developer:main Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants