yesodweb / cabal-meta

avoid cabal dependency hell by installing all your cabal dependencies at the same time
Other
36 stars 10 forks source link

support ./vendor/foo/bar in sources.txt #21

Open kowey opened 11 years ago

kowey commented 11 years ago

Unfortunately, in my toy examples, this appears to work. But I know in a real world setting I have trouble with sources.txt files that refer to things that are subdirectories of vendor packages, eg:

darcs:http://code.haskell.org/GenI
./vendor/GenI/genireport
./vendor/GenI/geniserver
./vendor/GenI/geni-test

This sort of things is useful for cases where a single repository hosts sub-packages that we also want to build. It's fine once we've successfully created the vendor/pkg directory (for example by commenting out the vendor lines), but it's a little bit sad that this doesn't just magically work.

gregwebs commented 11 years ago

I don't know why this wouldn't work. If you give the error output from your real world usage maybe we can figure it out.

cabal-meta will recurse looking for sources.txt files. So one thing you can try is changing sources.txt to just ./vendor/GenI and putting a srouces.txt in ./vendor/GenI that has ./genireport, ./geniserver, etc

kowey commented 11 years ago

I think this partly runs into issue 11

kowey commented 11 years ago

In any case, it's still a legitimate use case IMHO for the external package to want to control which subpackages it installs. I have a hard time reproducing it. There is a chance this is down to something silly like an old cabal-meta version lying around… it's just one of these things that always works for me but not when I'm trying to use it in anger. Will report back if I spot it again