Skip to content
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

sydtest-hspec fails to compile on nightly #6772

Closed
mihaimaruseac opened this issue Nov 19, 2022 · 3 comments
Closed

sydtest-hspec fails to compile on nightly #6772

mihaimaruseac opened this issue Nov 19, 2022 · 3 comments

Comments

@mihaimaruseac
Copy link
Contributor

Preprocessing library for sydtest-hspec-0.3.0.2..
Building library for sydtest-hspec-0.3.0.2..           
[2 of 2] Compiling Test.Syd.Hspec                                                     
                                           
/var/stackage/work/unpack-dir/unpacked/sydtest-hspec-0.3.0.2-181d494ee8f576544cc756c87483ff89a3bae9bde05938b876fdcbb90a44e24a/src/Test/Syd/Hspec.hs:30:42: error:
    • Couldn't match type ‘transformers-0.5.6.2:Control.Monad.Trans.Reader.ReaderT
                             hspec-core-2.10.6:Test.Hspec.Core.Spec.Monad.Env IO’
                     with ‘IO’
      Expected: WriterT
                  (Endo hspec-core-2.10.6:Test.Hspec.Core.Config.Definition.Config,
                   [Hspec.SpecTree ()])
                  IO
                  ()
        Actual: WriterT
                  (Endo hspec-core-2.10.6:Test.Hspec.Core.Config.Definition.Config,
                   [Hspec.SpecTree ()])
                  (transformers-0.5.6.2:Control.Monad.Trans.Reader.ReaderT
                     hspec-core-2.10.6:Test.Hspec.Core.Spec.Monad.Env IO)
                  ()
    • In the first argument of ‘runWriterT’, namely ‘specWriter’
      In the second argument of ‘($)’, namely ‘runWriterT specWriter’
      In a stmt of a 'do' block:
        (result, trees) <- liftIO $ runWriterT specWriter
   |
30 |   (result, trees) <- liftIO $ runWriterT specWriter
   |                                          ^^^^^^^^^^

This is with the move for GHC 9.4 for nightly

CC @NorfairKing

mihaimaruseac added a commit that referenced this issue Nov 19, 2022
Signed-off-by: Mihai Maruseac <mihai.maruseac@gmail.com>
@alaendle
Copy link
Member

Still doesn't compile in v0.4.0.0 (cc @NorfairKing)

/home/andreas/stackage/stackage/tmp.EVNz/sydtest-hspec-0.4.0.0/src/Test/Syd/Hspec.hs:30:42: error:
    • Couldn't match type ‘transformers-0.5.6.2:Control.Monad.Trans.Reader.ReaderT
                             hspec-core-2.10.10:Test.Hspec.Core.Spec.Monad.Env IO’
                     with ‘IO’
      Expected: WriterT      
                  (Endo hspec-core-2.10.10:Test.Hspec.Core.Config.Definition.Config,
                   [Hspec.SpecTree ()])
                  IO         
                  ()         
        Actual: WriterT      
                  (Endo hspec-core-2.10.10:Test.Hspec.Core.Config.Definition.Config,
                   [Hspec.SpecTree ()])
                  (transformers-0.5.6.2:Control.Monad.Trans.Reader.ReaderT
                     hspec-core-2.10.10:Test.Hspec.Core.Spec.Monad.Env IO)
                  ()         
    • In the first argument of ‘runWriterT’, namely ‘specWriter’
      In the second argument of ‘($)’, namely ‘runWriterT specWriter’
      In a stmt of a 'do' block:
        (result, trees) <- liftIO $ runWriterT specWriter
   |                         
30 |   (result, trees) <- liftIO $ runWriterT specWriter
   |                                          ^^^^^^^^^^
                             
/home/andreas/stackage/stackage/tmp.EVNz/sydtest-hspec-0.4.0.0/src/Test/Syd/Hspec.hs:33:68: error:
    • Couldn't match type: [Hspec.SpecTree ()]
                     with: Hspec.Tree (IO ()) (Hspec.Item ())
      Expected: (Endo        
                   hspec-core-2.10.10:Test.Hspec.Core.Config.Definition.Config,
                 Hspec.SpecTree ())
        Actual: (Endo        
                   hspec-core-2.10.10:Test.Hspec.Core.Config.Definition.Config,
                 [Hspec.SpecTree ()])
    • In the second argument of ‘mapM_’, namely ‘trees’
      In the second argument of ‘($)’, namely
        ‘mapM_ importSpecTree trees’
      In the second argument of ‘($)’, namely
        ‘sequential $ mapM_ importSpecTree trees’
   |                         
33 |   doNotRandomiseExecutionOrder $ sequential $ mapM_ importSpecTree trees
   |                                                                    ^^^^^
                             
/home/andreas/stackage/stackage/tmp.EVNz/sydtest-hspec-0.4.0.0/src/Test/Syd/Hspec.hs:39:18: error:
    • Couldn't match type: () -> IO ()
                     with: IO ()
      Expected: Hspec.SpecTree () -> Spec
        Actual: Hspec.Tree (() -> IO ()) (Hspec.Item ())
                -> TestDefM '[] () ()
    • In the expression: go  
      In an equation for ‘importSpecTree’:
          importSpecTree     
            = go             
            where            
                go           
                  = \case    
                      Hspec.Leaf item -> importItem item
                      Hspec.Node d ts -> describe d $ mapM_ go ts
                      Hspec.NodeWithCleanup _ cleanup ts
                        -> afterAll_ (cleanup ()) (mapM_ go ts)
   |                         
39 | importSpecTree = go

@NorfairKing
Copy link
Contributor

This'll be fixed once this version is in the LTS that's in the stable nixos, or if anyone cares before that.

@alaendle
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants