You can clone with
HTTPS or Subversion.
I am trying to use a custom version of test-framework that supports QuickCheck 2.6.
My sources.txt is:
I have run into two problems running `cabal-meta --dev install:
Exception: vendor/test-framework/sources.txt: openBinaryFile: does not exist (No such file or directory)
cabal: No cabal file found.
I'm very new to haskell, so apologies if I have things all mixed up. (I'm familiar with bundler though, if that helps at all.)
Ah, so if I add the following to sources.txt it looks in the subdirectory:
Is the suggested approach to fork test-framework and add a sources.txt, or can I provide it in my own source tree somehow?
cabal-meta --dev install doesn't seem to install any of the required deps specified in my .cabal file, but then neither does cabal-dev install or cabal install. I'm guessing this isn't the equivalent of bundle install, but then I can't find the right command, nor the right search term to find others with this problem. I can just install the deps by hand and everything works, but that seems kind of stupid. cabal-dev install-deps says everything is already installed.
cabal-meta --dev install
I feel like I'm straying into "not cabal-meta's problem territory"... Any assistance or pointers to docs welcome.
Ok, I have some tests running. My current understanding is that sources.txt is equivalent to a Gemfile, and myapp.cabal is equivalent to myapp.gemspec. The problem is cabal-meta doesn't have a directive equivalent to bundler's gemspec that says "load all deps from myapp.cabal". As such, I've duplicated my dependencies.
Author: Xavier Shay
, QuickCheck == 2.6
I still have to place the test-framework sources file by keeping my own fork.
Now, cabal-dev build and cabal-dev test work as expected.
So in summary the questions I have:
Can you download the latest version of cabal and use the sandbox features and stop using cabal-dev? cabal-meta will probably drop cabal-dev support soon.
In a hurry now, will look at the rest soon.
I should make some of the error messages nicer, but it looks like you figured out how to use cabal-meta :)
Analogies with Bundler are dificult to make. sources.txt only helps enhance/override the .cabal file, it can act like a Gemfile to the extent that you use it to specify more exact (sometimes github) versions, but it does not peg everything the way the Gemfile system does. The .cabal file is a gemspec for a Library section of a .cabal file, and an Executable section can be considered a Gemfile without a Gemfile.lock.
The ./ should effectively source your .cabal file, so you shouldn't need QuickCheck & test-framework-th there.
QuickCheck & test-framework-th
You are using a Test-Suite section, so you need to give --enable-tests to cabal.
cabal-meta --dev install --enable-tests
You can build the tests individually with the latest version of cabal by typing cabal build hunit.
If you find it more convenient you can also use the cabal-sandbox add-source feature rather than cabal-meta, there are trade-offs between the 2 approaches.
cabal build hunit
thanks for the explanation! I'll try out sandbox.
Got sandbox working, I also needed this: cabal install --only-dependencies --enable-test.
cabal install --only-dependencies --enable-test