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

Reuse caba-dev in a parent folder, if one exists already #66

Open
rodlogic opened this issue Aug 24, 2012 · 2 comments
Open

Reuse caba-dev in a parent folder, if one exists already #66

rodlogic opened this issue Aug 24, 2012 · 2 comments

Comments

@rodlogic
Copy link

It would be great if cabal-dev could reuse an existing caba-dev/ folder found in a parent folder instead of always creating one in the current folder.

The main motivation is to be able to reuse a sandboxed cabal-dev for a number of projects without having to remember to set/unset cabal-dev's -s argument (this is specially the case if you have many of these independent uber projects). When first setting up my dev workspace for a given project, I would create a cabal-dev in the root folder (automatically if my root folder has a .cabal file or manually with something like cabal-dev init otherwise)

For instance, consider the following workspace structure for a given project:

/myprojws
     /cabal-dev
     /subsystem1
     /subsystem2
          /projectA
                /benchmark
                     Benchmark.cabal
    ...
     /subsystemN

I should be able to execute cabal-dev from /myprojws/subsystem2/projectA/benchmark and have caba-dev automatically reuse the /myprojws/cabal-dev/ repo since it is the first cabal-dev up the path chain.

When a conflict arises, cabal-dev could generate a new cabal-dev/ folder in the benchmark project and install there only the dependencies that would conflict with the ones in /myprojws/cabal-dev.

It would be my job (once) to lay out the folder structure so that I get the right repo separation.

@srhb
Copy link

srhb commented Mar 7, 2013

This would also make cabal-dev Just Work (tm) with haskell-mode and friends.

@srhb
Copy link

srhb commented Mar 7, 2013

This would probably also require that the (broken?) behaviour be fixed that launching eg. cabal-dev ghci from a directory that does not have a cabal-dev directory will create it, but still fail.

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

2 participants