Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Uninstall of Windows Haskell Platform leaves "%PlatformFiles%/Haskell Platform" #156

Open
Dangthrimble opened this issue Oct 31, 2014 · 4 comments
Labels

Comments

@Dangthrimble
Copy link

When uninstalling Haskell Platform from Windows after having run cabal install cabal-install the folder %PlatformFiles%/Haskell Platform is not removed, leaving %ProgramFiles%\Haskell Platform\2014.2.0.0\lib\package.conf.d\Cabal-1.20.0.2-a 16388bcb008734a1fcd511e545a5444.conf behind. I believe this may have contributed to the fun I have had trying to successfully install cabal (see haskell/cabal#2193).

@randen
Copy link
Contributor

randen commented Oct 31, 2014

Sorry for the trouble this caused you. There are a few issues like this with how GHC, cabal, and the HP work, which the end user ideally should not have to care about, but unfortunately sometimes must at present.

One could imagine that if the haskell package system (cabal, etc.) supported uninstall, that uninstalling the HP could trigger an uninstall of all packages as well. We're don't really have that functionality at this point, though.

Upon uninstalling the HP, we could warn if something was left over, but what is the end user supposed to do with that info? It might just leave them with (more) confusion, but that might be one action we could take on this.

If nothing else, an action we could take would be to document the confusion, e.g. "Uninstalling the HP does not uninstall packages which were installed later. This may interfere with subsequent re-installations of those left-over packages".

To this specific behavior you encountered: when using the Haskell Platform (with the way GHC and cabal finds things based on where GHC is and the hierarchy used for finding package.conf info, etc.), if a package is cabal installed with --global, the package.conf entry is made in the location you note (%ProgramFiles%\Haskell Platform\2014.2.0.0\lib\package.conf.d). Upon uninstall, Haskell Platform only removes the exact (well, by full path name) files and folders only which were included in the install (most Windows installers do the same, so as not to remove any user data, which dates back to the bad-old-days when such user data would be written to the %ProgramFiles% location, e.g., game save data, etc.). If a folder isn't empty, it isn't removed during uninstall.

For this particular issue, I think we could make the issue's subject line a bit more specific, as "Uninstall of Windows Haskell Platform leaves "%PlatformFiles%/Haskell Platform" is not true generally but is true if packages are subsequently installed globally with cabal. As a user, you shouldn't have to care about those distinctions, though.

@Dangthrimble
Copy link
Author

I have been experimenting on both a 32-bit Windows Vista laptop (where most of experimentation has taken place) and a 64-bit Windows 8.1 PC. Have just uninstalled HP from the PC and nothing was left of the HP directory. Clearly it was down to my various experiments on the laptop that a file was left behind. It is a tricky one.

Would it make sense, when using HP's version of cabal, for a global cabal install cabal-install to install to its own subdirectory of %ProgramFiles%? Presumably the cabal binary that can be downloaded installs to a directory other than %ProgramFiles%\Haskell Platform. At least the two would be consistent then.

@Dangthrimble
Copy link
Author

Strike that, I've finally managed to install a global version of cabal and it is in another directory: %ProgramFiles%\Haskell\bin. It must have been just the conf file that was causing the problem. Would it normally go in %ProgramFiles%\Haskell Platform\... with a download of the cabal binary and, if not, does it have to remain there when running cabal from HP?

I believe another fundamental problem I was having was trying a global install from the command prompt but without admin privileges. Amazing what a few privileges can do!

I must admit I have found this whole process instructive but confusing. Maybe I just didn't read the manual on how to get this far on a Windows platform, though I don't remember seeing specific instructions. I am keeping notes of what I am doing. Might they be helpful for inclusion somewhere?

@23Skidoo
Copy link
Member

23Skidoo commented Nov 1, 2014

Uninstaller could prompt the user whether she wants the directory to be deleted.

@randen randen added the Windows label Jan 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants