-
Notifications
You must be signed in to change notification settings - Fork 697
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
Remove the need to hardcode absolute paths for some entries in .cabal/config
: support xdg home variables
#1857
Comments
I would like this, too. Just the ability to reference |
Would someone with a commit bit mind weighing in on whether a patch would be accepted for this? |
I generally like the idea, but under the condition we do not open up support for arbitrary environment variables. I'd concretely suggest to add support for a couple additional
which I believe should address most use-cases without bringing into scope an unknown set of new variable names, while allowing for reasonably platform independence (thanks to The downside of allowing env-variables to affect the paths in the cabal config is that file-change-monitoring gets slighlty more complicated, but by using an explicitly enumerated set of input variables (i.e. |
.cabal/config
.cabal/config
: support xdg home variables
yeah, I agree w.r.t. a fixed of environment variables. and the one issue is which environment variables are chosen for Windows (which is far as I know, isn't part of the XDG BaseDirs spex). For example, the standard implementations between Haskell and Racket differ (see below). I'd stick with whatever Haskell (
Racket (
https://docs.racket-lang.org/basedir/index.html |
#645 seems to be another duplicate of this ticket. |
Do any of the filepath fields in ~/.cabal/config affect the hash of packages? Or just the file-change-monitoring? |
#4597 is also a duplicate of this. There was a large discussion there about the migration issues. But I think with But the short story is on Windows we shouldn't use |
What's a synced directory on Windows? Synced across all users or backed up in the cloud? |
Synced across active directory. It's a roaming profile folder. So it's synced back to the Ad server on login and logout. The data cabal puts there are often not useful on another machine but the sheer size of this folder makes network user's login and logout very slow as it has to sync and eats away at your profile quota. This affects most corporate environments and universities. In newer versions of Windows this has been made more explicit in the folder resolves to a "Roaming" path to point this out more. |
Thanks, it's clear now. |
This is related to #680 that is now being worked on. |
Would people be opposed to just supporting |
Hi!
I keep all my configuration files on github to have an easily reproducible environment on all my machines. I keep my
.cabal/config
file in there as well, and don't like the fact that some absolute paths have to be hardcoded (e.g.remote-repo-cache
,world-file
andbuild-summary
). This is inconvenient if$HOME
happens to be different on various machines (e.g. work vs home).Some possible solutions (which could be wrong):
~
in paths.$prefix
in all pathsIf one of the above suggestions is worthwhile, I'd be up for implementing it. Just let me know 😄
Thank you!
The text was updated successfully, but these errors were encountered: