sandbox hashcode in dist directory

Mikhail Glushenkov the.dead.shall.rise at gmail.com
Mon Nov 11 00:26:58 UTC 2013


Hi,

On Sun, Nov 10, 2013 at 11:26 PM, Tim Docker <tim at dockerz.net> wrote:
>
> However since starting to use cabal sandboxes, the generated code ends up in
> a directory like this:
>
>     dist/dist-sandbox-c4c8b1d4/build/autogen/
>
> What is this hashcode for? Is it always generated when using a sandbox? If I
> have code (like ghc-mod) that needs to access the
> build directory, how do I work out the value of the hashcode?

So that you can use the same add-source dependency with several
different sandboxes and also build it standalone. See discussion in
https://github.com/haskell/cabal/issues/1281

As to how generate the hash code yourself, the relevant part of the
source code is https://github.com/haskell/cabal/blob/master/cabal-install/Distribution/Client/Sandbox.hs#L129
That function takes the absolute path to the current sandbox
('/path/to/.cabal-sandbox') as input.


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


More information about the cabal-devel mailing list