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.6.2.1 test suite failure (from hackage tarball) #55

Closed DanBurton closed 5 years ago

DanBurton commented 5 years ago

It looks like some sort of -Wall failure, rather than an actual test failure. Here's what I saw on the stackage build server:

[14 of 14] Compiling Main             ( test/Spec.hs, dist/build/genvalidity-h
spec-test/genvalidity-hspec-test-tmp/Main.o )
Linking dist/build/genvalidity-hspec-test/genvalidity-hspec-test ...
> /tmp/stackage-build13/genvalidity-hspec-0.6.2.1$ dist/build/genvalidity-hspe
c-doctests/genvalidity-hspec-doctests

src/Test/Validity/Utils.hs:80:13: warning: [-Wmissing-fields]
    • Fields of ‘Item’ not initialised: itemIsFocused
    • In the first argument of ‘Leaf’, namely
        ‘Item
           {itemRequirement = s, itemLocation = Nothing,
            itemIsParallelizable = Nothing,
            itemExample = \ _ _ _
                            -> do let ...
                                  ....}’
      In the expression:
        Leaf
          Item
            {itemRequirement = s, itemLocation = Nothing,
             itemIsParallelizable = Nothing,
             itemExample = \ _ _ _
                             -> do let ...
                                   ....}
      In an equation for ‘go’:
          go sp
            = Leaf
                Item
                  {itemRequirement = s, itemLocation = Nothing,
                   itemIsParallelizable = Nothing, itemExample = \ _ _ _ -> do ...}
   |
80 |             Item
   |             ^^^^...

src/Test/Validity/Utils.hs:80:13: warning: [-Wmissing-fields]
    • Fields of ‘Item’ not initialised: itemIsFocused
    • In the first argument of ‘Leaf’, namely
        ‘Item
           {itemRequirement = s, itemLocation = Nothing,
            itemIsParallelizable = Nothing,
            itemExample = \ _ _ _
                            -> do let ...
                                  ....}’
      In the expression:
        Leaf
          Item
            {itemRequirement = s, itemLocation = Nothing,
             itemIsParallelizable = Nothing,
             itemExample = \ _ _ _
                             -> do let ...
                                   ....}
      In an equation for ‘go’:
          go sp
            = Leaf
                Item
                  {itemRequirement = s, itemLocation = Nothing,
                   itemIsParallelizable = Nothing, itemExample = \ _ _ _ -> do ...}
Examples: 19  Tried: 19  Errors: 0  Failures: 0
> /tmp/stackage-build13/genvalidity-hspec-0.6.2.1$ dist/build/genvalidity-hspec-test/genvalidity-hspec-test
genvalidity-hspec-test: src/Test/Validity/Utils.hs:(80,13)-(96,17): Missing field in record construction itemIsFocused
DanBurton commented 5 years ago

I'm seeing a similar failure in genvalidity-hspec-hashable

> /tmp/stackage-build13/genvalidity-hspec-hashable-0.2.0.3$ dist/build/genvalidity-hspec-hashable-test/genvalidity-hspec-hashable-test
genvalidity-hspec-hashable-test: src/Test/Validity/Utils.hs:(80,13)-(96,17): Missing field in record construction itemIsFocused
NorfairKing commented 5 years ago

This is a forward incompatibility with the new hspec version. @sol I'll look into it.

cdepillabout commented 5 years ago

I'm seeing this when using Nix as well. Currently I am working around it by disabling the genvalidity-hspec tests:

https://github.com/NixOS/nixpkgs/pull/53682

NorfairKing commented 5 years ago

It's not a -Wall failure. This actually means the function in question will crash. .

NorfairKing commented 5 years ago

I just released https://hackage.haskell.org/package/genvalidity-hspec-0.6.2.2 to fix this.