-
Notifications
You must be signed in to change notification settings - Fork 408
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
Keep the temp init scripts on disk #2249
Conversation
- The temp files will not be deleted on JVM exist, since it will cause buildship fail when get Eclipse project instance after the server restarts. - Cache the temp files for each session, to make sure there will not be too many temp files generated when reloading projects. Signed-off-by: Sheng Chen <[email protected]>
test this please |
test this please |
@rgrunber Not sure why the test case is failing. Could we include this change in this release? It makes sure the gradle project reloading will not fail due to file not exists. |
test this please |
A different approach I was thinking of is that we could create a fixed temporary file for an identical scriptPath. For example, you could calculate the md5 value of the scriptPath and create a file in the tmp directory using md5 as the filename. This way you avoid creating many temporary files for the init scripts, and you don't need to delete them as well. |
I think it makes sense to accept this PR as-is to at least improve the situation prior to releasing. From there we can further improve this. doing a checksum on the content of the init script(s) would definitely avoid creating duplicates. |
Sounds good. I can do a checksum for the file content, then it will only generate new files when the content of the script is changed. Meanwhile, checksum can be used to check the integrity of the script for security concern |
related with redhat-developer/vscode-java#2692
Signed-off-by: Sheng Chen [email protected]