Skip to content

Test failures with GHC 9.8.1 #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
andreasabel opened this issue Oct 25, 2023 · 0 comments
Closed

Test failures with GHC 9.8.1 #36

andreasabel opened this issue Oct 25, 2023 · 0 comments

Comments

@andreasabel
Copy link
Contributor

andreasabel commented Oct 25, 2023

On current master (1495ff2) I am getting test failures when built with GHC 9.8.1.
Update: I am also getting these failures for the released 0.1.4.

 ✗ EXPECTED FAILURE failed at test/Test/NoThunks/Class.hs:176:7
    after 18 tests and 2 shrinks.
    shrink path: 18:b2
    Just ["Int","Seq"] 33% ██████▋·············
    Nothing            61% ████████████▏·······
  
        ┏━━ test/Test/NoThunks/Class.hs ━━━
    163 ┃ testWithModel :: forall a. FromModel a
    164 ┃               => (Maybe ThunkInfo -> Maybe [String] -> Bool)
    165 ┃               -> Proxy a
    166 ┃               -- ^ Compare @ThunkInfo@. When we use 'noThunks' this
    167 ┃               -- can just be @(==)@; however, when we use 'isNormalForm', the
    168 ┃               -- context we will get from the model will be too detailed.
    169 ┃               -> Property
    170 ┃ testWithModel compareInfo _proxy = withTests 1000 $ property $ do
    171 ┃     m :: Model a <- forAll genModel
        ┃     │ Wrap
        ┃     │   { unwrap =
        ┃     │       SeqEnqueue
        ┃     │         (IntValue 0)
        ┃     │         (SeqEnqueue
        ┃     │            (IntValue 0)
        ┃     │            (SeqEnqueue
        ┃     │               (IntValue 0)
        ┃     │               (SeqEnqueue
        ┃     │                  (IntValue 0)
        ┃     │                  (SeqEnqueue (IntValue 0) (SeqEnqueue (IntValue 0) SeqEmpty)))))
        ┃     │   }
    172 ┃     collect $ modelUnexpected [] m
    173 ┃     fromModel m $ \a -> do
    174 ┃       annotate $ show $ modelIsNF [] m
        ┃       │ IsNF
    175 ┃       isNF <- liftIO $ noThunks [] a
    176 ┃       Hedgehog.diff isNF compareInfo (modelUnexpected [] m)
        ┃       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        ┃       │ ━━━ Failed (- lhs) (+ rhs) ━━━
        ┃       │ - Just ThunkInfo { thunkContext = [ "..." , "Seq Int" ] }
        ┃       │ + Nothing
  
    This failure can be reproduced by running:
    > recheckAt (Seed 9830890977581035153 3438688580856117965) "18:b2" EXPECTED FAILURE
      IntInt:            FAIL (0.07s)
          ✗ <interactive> failed at test/Test/NoThunks/Class.hs:176:7
            after 1 test and 1 shrink.
            shrink path: 1:a
          
                ┏━━ test/Test/NoThunks/Class.hs ━━━
            163 ┃ testWithModel :: forall a. FromModel a
            164 ┃               => (Maybe ThunkInfo -> Maybe [String] -> Bool)
            165 ┃               -> Proxy a
            166 ┃               -- ^ Compare @ThunkInfo@. When we use 'noThunks' this
            167 ┃               -- can just be @(==)@; however, when we use 'isNormalForm', the
            168 ┃               -- context we will get from the model will be too detailed.
            169 ┃               -> Property
            170 ┃ testWithModel compareInfo _proxy = withTests 1000 $ property $ do
            171 ┃     m :: Model a <- forAll genModel
                ┃     │ PairDefined (IntValue 0) (IntThunk (IntValue 0))
            172 ┃     collect $ modelUnexpected [] m
            173 ┃     fromModel m $ \a -> do
            174 ┃       annotate $ show $ modelIsNF [] m
                ┃       │ IsWHNF ["Int","(,)"]
            175 ┃       isNF <- liftIO $ noThunks [] a
            176 ┃       Hedgehog.diff isNF compareInfo (modelUnexpected [] m)
                ┃       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                ┃       │ ━━━ Failed (- lhs) (+ rhs) ━━━
                ┃       │ - Just ThunkInfo { thunkContext = [ "Int" , "Tuple2" ] }
                ┃       │ + Just [ "Int" , "(,)" ]
          
            This failure can be reproduced by running:
            > recheckAt (Seed 1509894862227899575 3014110894838300521) "1:a" <property>
          
        Use "--pattern '$NF ~ /IntInt/' --hedgehog-replay '1:a Seed 1509894862227899575 3014110894838300521'" to reproduce from the command-line.
        
        Use -p '/Model.IntInt/' to rerun this test only.
      IntListInt:        FAIL (0.07s)
          ✗ <interactive> failed at test/Test/NoThunks/Class.hs:176:7
            after 1 test.
            shrink path: 1:
          
                ┏━━ test/Test/NoThunks/Class.hs ━━━
            163 ┃ testWithModel :: forall a. FromModel a
            164 ┃               => (Maybe ThunkInfo -> Maybe [String] -> Bool)
            165 ┃               -> Proxy a
            166 ┃               -- ^ Compare @ThunkInfo@. When we use 'noThunks' this
            167 ┃               -- can just be @(==)@; however, when we use 'isNormalForm', the
            168 ┃               -- context we will get from the model will be too detailed.
            169 ┃               -> Property
            170 ┃ testWithModel compareInfo _proxy = withTests 1000 $ property $ do
            171 ┃     m :: Model a <- forAll genModel
                ┃     │ PairDefined (IntThunk (IntValue 0)) ListNil
            172 ┃     collect $ modelUnexpected [] m
            173 ┃     fromModel m $ \a -> do
            174 ┃       annotate $ show $ modelIsNF [] m
                ┃       │ IsWHNF ["Int","(,)"]
            175 ┃       isNF <- liftIO $ noThunks [] a
            176 ┃       Hedgehog.diff isNF compareInfo (modelUnexpected [] m)
                ┃       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                ┃       │ ━━━ Failed (- lhs) (+ rhs) ━━━
                ┃       │ - Just ThunkInfo { thunkContext = [ "Int" , "Tuple2" ] }
                ┃       │ + Just [ "Int" , "(,)" ]
          
            This failure can be reproduced by running:
            > recheckAt (Seed 18426870851181589552 15121270568925645443) "1:" <property>
          
        Use "--pattern '$NF ~ /IntListInt/' --hedgehog-replay '1: Seed 18426870851181589552 15121270568925645443'" to reproduce from the command-line.
        
        Use -p '/Model.IntListInt/' to rerun this test only.

Maybe it is just a case of an updated printer:

- Just ThunkInfo { thunkContext = [ "Int" , "Tuple2" ] }
+ Just [ "Int" , "(,)" ]
@andreasabel andreasabel changed the title Test failures on master with GHC 9.8.1 Test failures with GHC 9.8.1 Oct 25, 2023
andreasabel added a commit to andreasabel/nothunks that referenced this issue Oct 28, 2023
@coot coot closed this as completed in c4b31e3 Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant