Skip to content
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

There's no way to move setup-exe-cache to another directory #1234

Closed
nagisa opened this issue Mar 11, 2013 · 11 comments
Closed

There's no way to move setup-exe-cache to another directory #1234

nagisa opened this issue Mar 11, 2013 · 11 comments

Comments

@nagisa
Copy link

nagisa commented Mar 11, 2013

According to the #958 (comment) setup-exe-cache is hardcoded to ~/.cabal/setup-exe-cache and there's no way to change it. Looking at the code, path building didn't change and it is still hardcoded.

Making setup-exe-cache movable is a prerequisite for #680

@23Skidoo
Copy link
Member

I'm inclined to close this. Setup exe cache directory is defined relative to defaultCabalDir, and there is nothing specific to setup exe cache about this, defaultInstallDirs etc are also defined similarly. There is already a ticket about adding a $CABAL_HOME environment variable ( #1126 ).

@nagisa
Copy link
Author

nagisa commented Mar 12, 2013

@23Skidoo You can set $CABAL_CONFIG environment variable to put config file anywhere you want. Through the config file you can then set locations of various cabal directories and files, including ones used for installations, making cabal-install related pathes completely configurable.

However I could not find a way to set a directory for setup exe cache, which is the only directory for which ~/.cabal gets recreated every time.

$ ls ~/.cabal/
setup-exe-cache/

I'd like this issue reopened.

@23Skidoo
Copy link
Member

@simukis Instead of adding an explicit setup-exe-cache entry to ~/.cabal/config, I'd prefer to solve this via an explicit $CABAL_HOME environment variable or the solution I've outlined in this comment (since @dcoutts objects to adding $CABAL_HOME). Setup exe cache is an implementation detail, after all.

@dcoutts
Copy link
Contributor

dcoutts commented Mar 15, 2013

See my suggestion in #1126, so we can avoid an explicit setup-exe-cache entry.

@23Skidoo
Copy link
Member

See #1242.

@mietek
Copy link
Contributor

mietek commented Nov 27, 2014

Since #1126 was not merged, and there is no progress on #1242, I would like this issue reopened.

I propose adding a CABAL_SETUP_EXE_CACHE environment variable. Thoughts?

@gibiansky
Copy link

Is there any progress on this? I'm bumping into this right now and don't know how to work around it...

@gibiansky
Copy link

Also, seconding @mietek , I'd like to see this issue reopened. The issue is with the following lines:

    cabalDir <- defaultCabalDir
    let setupCacheDir       = cabalDir </> "setup-exe-cache"

from Distribution.Client.SetupWrapper in cabal-install. The implementation of defaultCabalDir is:

--TODO: misleading, there's no way to override this default
--      either make it possible or rename to simply getCabalDir.
defaultCabalDir :: IO FilePath
defaultCabalDir = getAppUserDataDirectory "cabal"

It seems like this just needs fixing, as per the TODO. I propose doing so by adding a cabal-dir configuration variable, and then you can bass --config-file=config that has a custom cabal-dir.

@mietek
Copy link
Contributor

mietek commented Dec 25, 2014

There has been no progress on this inside cabal-install.

In order to work around valderman/haste-compiler#257, I created an empty Cabal package, populate-setup-exe-cache, which I use in Halcyon.

@gibiansky
Copy link

@mietek Trying to address this via #2303

@Mikolaj
Copy link
Member

Mikolaj commented Jun 25, 2021

This is likely to be solved by #680 and related PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants