You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cabal should not store any data in %AppData% #4597
On Windows, cabal seems to put it's data in %AppData%, which is not the right place for such data.
Instead it should use %LOCALAPPDATA%.
%AppData% on machines which are domain joined with roaming profiles will be synced back and forth to the domain controller on login/logout. They also eat away at your profile quota while the information isn't very useful on another machine.
Also since the folder contains binaries it may be subjected to virus scans further slowing syncing.
👍 . Unfortunately, if we want people to not upgrade Cabal and suddenly discover everything is missing, some fiddly transition code will need to be written. Maybe writing the transition code is not worth it.
We don't have to strictly migrate the data, if the old data is left as is, and cabal just uses the new directory, then we could just emit a warning and instruct the users to move the folder. Even if they don't the packages are still registered with ghc-pkg so they'll continue to work.
cabal's resolvers won't know of them but that'll only mean some packages will get re-installed. But unless I'm mistaken, nothing will strictly break will it?
We've traditionally used getAppUserDataDirectory from the directory package; how would we go about changing this? Does this need changes to directory or would we stop using getAppUserDataDirectory?
Somewhat related, a related change for other operating systems would be #680 (XDG compliance)
(This issue mentioned cabal's data; does that mean general "data" including the binary? It sounds like it, but just want to be sure. If so, then I will submit the HP issue to track.)
@randen Yes, I think it covers installed executables. I think the biggest problem with unceremoniously changing the install location is when people try to cabal install fooexe and the new executable doesn't show up in their path. Though, I suppose we do have a warning for this case...
@hvr I think directory should get patched, or at the least a separate function added to it for this. ghc-pkg has the same problem. though since that only writes small text based metadata I can live with that.
@randen yes, I'm not worried at all about the actual package metadata, it's more the binaries. Remember that especially on Windows these are statically linked behemoths. And with split-sections your static archives get bigger too since you now have the hear overhead for all the different sections.
@ezyang yes, the paths would be a slight issue. I think we can communicate the change loudly enough though.
Activity
23Skidoo commentedon Jul 8, 2017
If we do this change, we should communicate it to HP maintainers, because they'll need to fix
PATH-updating code in the Windows installer./cc @randen
ezyang commentedon Jul 9, 2017
👍 . Unfortunately, if we want people to not upgrade Cabal and suddenly discover everything is missing, some fiddly transition code will need to be written. Maybe writing the transition code is not worth it.
Mistuke commentedon Jul 9, 2017
We don't have to strictly migrate the data, if the old data is left as is, and cabal just uses the new directory, then we could just emit a warning and instruct the users to move the folder. Even if they don't the packages are still registered with
ghc-pkgso they'll continue to work.cabal's resolvers won't know of them but that'll only mean some packages will get re-installed. But unless I'm mistaken, nothing will strictly break will it?
hvr commentedon Jul 9, 2017
We've traditionally used
getAppUserDataDirectoryfrom thedirectorypackage; how would we go about changing this? Does this need changes todirectoryor would we stop usinggetAppUserDataDirectory?Somewhat related, a related change for other operating systems would be #680 (XDG compliance)
randen commentedon Jul 10, 2017
(This issue mentioned cabal's data; does that mean general "data" including the binary? It sounds like it, but just want to be sure. If so, then I will submit the HP issue to track.)
ezyang commentedon Jul 10, 2017
@randen Yes, I think it covers installed executables. I think the biggest problem with unceremoniously changing the install location is when people try to
cabal install fooexeand the new executable doesn't show up in their path. Though, I suppose we do have a warning for this case...Mistuke commentedon Jul 10, 2017
@hvr I think
directoryshould get patched, or at the least a separate function added to it for this. ghc-pkg has the same problem. though since that only writes small text based metadata I can live with that.@randen yes, I'm not worried at all about the actual package metadata, it's more the binaries. Remember that especially on Windows these are statically linked behemoths. And with
split-sectionsyour static archives get bigger too since you now have the hear overhead for all the different sections.@ezyang yes, the paths would be a slight issue. I think we can communicate the change loudly enough though.
Mikolaj commentedon Jun 25, 2021
Duplicate of #1857
.cabal/config: support xdg home variables #1857Mikolaj commentedon Jun 25, 2021
Also, this is related to #680 that is now being worked on, so I'm taking the liberty to close it to focus the discussion in two places instead of ten.