Cabal 1.8 ignores bounds in test-suite sections?

I have a cabal file with two test suites https://github.com/tomjaguarpaw/haskell-opaleye/blob/master/opaleye.cabal If I change the dependency in "test-suite tutorial", say, from `profunctors` to `profunctors >= 0.6` then the bound is completely ignored and cabal will attempt to compile and run the test suite even without a suitable version present. Is this expected behaviour? Tom

Do you mean "1.18" instead of "1.8"? On Tue Dec 09 2014 at 2:48:29 PM Tom Ellis < tom-lists-haskell-cafe-2013@jaguarpaw.co.uk> wrote:
I have a cabal file with two test suites
https://github.com/tomjaguarpaw/haskell-opaleye/ blob/master/opaleye.cabal
If I change the dependency in "test-suite tutorial", say, from `profunctors` to `profunctors >= 0.6` then the bound is completely ignored and cabal will attempt to compile and run the test suite even without a suitable version present.
Is this expected behaviour?
Tom _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Sorry, that was misleading. What I meant was "when specifying 'cabal-version: >= 1.8' in the cabal file", but still the same happens if I specify 'cabal-version >= 1.18'. On Tue, Dec 09, 2014 at 12:50:59PM +0000, Michael Snoyman wrote:
Do you mean "1.18" instead of "1.8"?
On Tue Dec 09 2014 at 2:48:29 PM Tom Ellis < tom-lists-haskell-cafe-2013@jaguarpaw.co.uk> wrote:
I have a cabal file with two test suites
https://github.com/tomjaguarpaw/haskell-opaleye/ blob/master/opaleye.cabal
If I change the dependency in "test-suite tutorial", say, from `profunctors` to `profunctors >= 0.6` then the bound is completely ignored and cabal will attempt to compile and run the test suite even without a suitable version present.
Is this expected behaviour?
Tom _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Tue, Dec 09, 2014 at 12:48:17PM +0000, Tom Ellis wrote:
I have a cabal file with two test suites
https://github.com/tomjaguarpaw/haskell-opaleye/blob/master/opaleye.cabal
If I change the dependency in "test-suite tutorial", say, from `profunctors` to `profunctors >= 0.6` then the bound is completely ignored and cabal will attempt to compile and run the test suite even without a suitable version present.
For precision I should say I meant `product-profunctors >= 0.6`. But in any case the exact example irrelevant since it doesn't matter if I specify `product-profunctors >= 100` or `base >= 1000000` in a test-suite section. It's ignored.

I find this unintuitive. Are you configuring with `--enable-tests`? On Tue, Dec 9, 2014 at 2:09 PM, Tom Ellis < tom-lists-haskell-cafe-2013@jaguarpaw.co.uk> wrote:
On Tue, Dec 09, 2014 at 12:48:17PM +0000, Tom Ellis wrote:
I have a cabal file with two test suites
https://github.com/tomjaguarpaw/haskell-opaleye/blob/master/opaleye.cabal
If I change the dependency in "test-suite tutorial", say, from
`profunctors`
to `profunctors >= 0.6` then the bound is completely ignored and cabal will attempt to compile and run the test suite even without a suitable version present.
For precision I should say I meant `product-profunctors >= 0.6`.
But in any case the exact example irrelevant since it doesn't matter if I specify `product-profunctors >= 100` or `base >= 1000000` in a test-suite section. It's ignored. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Ah, thank you, that does the trick. So the situation is that you can 1. `cabal configure --enable-tests` 2. change the `test-suite` section 3. still run `cabal test`, and it just uses the old settings This does indeed give me the warning ./opaleye.cabal has been changed. Re-configuring with most recently used options. If this fails, please run configure manually but I still find the behaviour a bit odd. Anyway, I now understand what is going on! Tom On Tue, Dec 09, 2014 at 06:30:41PM +0100, Adam Bergmark wrote:
I find this unintuitive. Are you configuring with `--enable-tests`?
On Tue, Dec 9, 2014 at 2:09 PM, Tom Ellis < tom-lists-haskell-cafe-2013@jaguarpaw.co.uk> wrote:
On Tue, Dec 09, 2014 at 12:48:17PM +0000, Tom Ellis wrote:
I have a cabal file with two test suites
https://github.com/tomjaguarpaw/haskell-opaleye/blob/master/opaleye.cabal
If I change the dependency in "test-suite tutorial", say, from
`profunctors`
to `profunctors >= 0.6` then the bound is completely ignored and cabal will attempt to compile and run the test suite even without a suitable version present.
For precision I should say I meant `product-profunctors >= 0.6`.
But in any case the exact example irrelevant since it doesn't matter if I specify `product-profunctors >= 100` or `base >= 1000000` in a test-suite section. It's ignored.
participants (3)
-
Adam Bergmark
-
Michael Snoyman
-
Tom Ellis