-
Notifications
You must be signed in to change notification settings - Fork 90
Cleanup executables from old releases #273
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
Comments
Had not found this when opening #346 (which refers to Windows, the folder content is slightly different). |
|
I've changed the title to Automatic deleting files is a delicate operation that can fail due to multiple reasons, even if the user has permissions to do it. We should ask users before doing it and handle the possible error. What about warn about the existence of older versions in |
I think many people would be annoyed if it warned them about older versions every time they installed a new version. It would make them feel like they did something wrong. How about this: Give an option to clean up old versions. But instead of automatically cleaning up all old versions or all versions not used by open workspaces, show a dialog box with a list of all the old versions found. Each row should clearly indicate what GHC and HLS versions are involved. It would be sorted in reverse order first by GHC version, then by HLS version. Each would have a check box to indicate that it should be purged. There would also be a checkbox to "delete all old versions" that would automatically check all the other boxes. Then there would be a button "Delete Selected Versions" to commit the operation. Also it occurred to me that probably nobody wants to keep around two versions that are different versions of HLS for the same version of GHC. The focus is on keeping around versions for older GHCs that you might still be using. So if you have two binaries that are for different versions of HLS but the same version of GHC, you should probably just keep the newest one. |
I would also suggest to simply delete older HLS versions. Optionally, one could add a config option "keep n old versions". |
It worths to note that due to deprecation of ghc support in haskell-language-server, new versions of the server might not support some ghc versions. Keep old versions of hls with support for those deprecated ghc's could help to neing able to load actual projects. |
I would say, when vscode-haskell downloads a new HLS version for GHC xyz, then it can delete the old HLS version for GHC xyz. You can then add an Extension command to open the folder for manual cleaning, or something similar. |
Last version of the extension has support for download/use older version of hls it they supports the ghc required for the project loaded. That is a nice feature but if makes more complex an eventuak automatic cleaning. It will download again the appropiate hls though. |
Old executables can now be cleaned up by using ghcup. No further actions required here. |
The current output of
ls -lh
on theglobalStoragePath
directory produces for meAs can be seen, old releases of
haskell-language-server
, that will never be required again, are just taking up a decent amount of diskspace (~240MB), that will only get worse over time. There should be a policy to remove any older versions of the wrapper, perhaps when downloading a newer one.The text was updated successfully, but these errors were encountered: