NorfairKing / validity

Validity and validity-based testing
https://www.youtube.com/watch?v=eIs9qNh17SM
MIT License
156 stars 31 forks source link

genvalidity-hspec >= 0.7.0.1 requires genvalidity-property >=0.5 #69

Closed juhp closed 4 years ago

juhp commented 5 years ago

While building for Stackage LTS 14:

--  While building package genvalidity-hspec-0.7.0.2 using:
      /var/stackage/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_6
4-linux/Cabal-2.4.0.1 build lib:genvalidity-hspec test:genvalidity-hspec-doctests test:genvalidity-hspec-test --ghc-options ""
    Process exited with code: ExitFailure 1
    Logs have been written to: /var/stackage/work/unpack-dir/.stack-work/logs/genvalidity-hspec-0.7.0.2.log

    Preprocessing library for genvalidity-hspec-0.7.0.2..
    Building library for genvalidity-hspec-0.7.0.2..
    [ 9 of 15] Compiling Test.Validity.GenValidity

    /var/stackage/work/unpack-dir/unpacked/genvalidity-hspec-0.7.0.2-a8dbf7e5b1b4f82d68e0d88817729944ea1485be6426b70ecde659f6e11f
99d9/src/Test/Validity/GenValidity.hs:99:26: error:
        • Couldn't match expected type ‘Property’
                      with actual type ‘(a -> [a]) -> Property’
        • Probable cause: ‘genGeneratesValid’ is applied to too few arguments
          In the expression: genGeneratesValid @a genValid
          In an equation for ‘genValidGeneratesValid’:
              genValidGeneratesValid = genGeneratesValid @a genValid
       |
    99 | genValidGeneratesValid = genGeneratesValid @a genValid
       |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    /var/stackage/work/unpack-dir/unpacked/genvalidity-hspec-0.7.0.2-a8dbf7e5b1b4f82d68e0d88817729944ea1485be6426b70ecde659f6e11f
99d9/src/Test/Validity/GenValidity.hs:110:30: error:
        • Couldn't match expected type ‘Property’
                      with actual type ‘(a -> [a]) -> Property’
        • Probable cause: ‘genGeneratesInvalid’ is applied to too few arguments
          In the expression: genGeneratesInvalid @a genInvalid
          In an equation for ‘genInvalidGeneratesInvalid’:
              genInvalidGeneratesInvalid = genGeneratesInvalid @a genInvalid
        |
    110 | genInvalidGeneratesInvalid = genGeneratesInvalid @a genInvalid
        |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Same for 0.7.0.1

NorfairKing commented 5 years ago

I don't find this failure when I compile from the source. Are you building with genvalidity-property >=0.5?

NorfairKing commented 5 years ago

My bounds are not perfect, it seems, but let's figure out what they should be before I go around making more releases frantically.

juhp commented 5 years ago

https://www.stackage.org/lts-14.8/package/genvalidity-property-0.4.0.0

NorfairKing commented 5 years ago

If you're going to use a new version of genvalidity-hspec, then you might as well use the newest version of genvalidity-property, no? Why are you not using >=0.5?

juhp commented 5 years ago

Because we started Stackage LTS 14 with genvalidity-property 0.4 and we generally don't allow major version bumps in LTS. Anyway I added a constraint on genvalidity-hspec for now.

NorfairKing commented 5 years ago

Aha! How should I go about preventing stuff like this from happening? Is there anything I should do now?

juhp commented 5 years ago

You could revise your .cabal file on Hackage to stricten the lowerbound.

NorfairKing commented 4 years ago

genvalidity-hspec-0.7.0.3 has fixed this.