Funflow does not build when added to extra-deps of project
GuillaumeDesforges opened this issue · comments
Describe the bug
The build of the dependency funflow (from master) fails.
$ stack build
funflow > configure
funflow > Configuring funflow-1.6.0...
funflow > build
funflow > Preprocessing library for funflow-1.6.0..
funflow > Building library for funflow-1.6.0..
funflow > [ 1 of 17] Compiling Control.Arrow.Free
funflow > [ 2 of 17] Compiling Control.Arrow.Async
funflow > [ 3 of 17] Compiling Control.Funflow.Cache.TH
funflow > [ 4 of 17] Compiling Control.Funflow.Diagram
funflow > [ 5 of 17] Compiling Control.Funflow.External
funflow > [ 6 of 17] Compiling Control.Funflow.Base
funflow > [ 7 of 17] Compiling Control.Funflow.Class
funflow > [ 8 of 17] Compiling Control.Funflow.External.Coordinator
funflow > [ 9 of 17] Compiling Control.Funflow.External.Coordinator.Memory
funflow > [10 of 17] Compiling Control.Funflow.External.Coordinator.Redis
funflow > [11 of 17] Compiling Control.Funflow.External.Coordinator.SQLite
funflow > [12 of 17] Compiling Control.Funflow.External.Docker
funflow > [13 of 17] Compiling Control.Funflow.External.Executor
funflow >
funflow > /run/user/1000/stack-cad912e60174bbcf/funflow-1.6.0/src/Control/Funflow/External/Executor.hs:68:13: error:
funflow > • Couldn't match type ‘(->)
funflow > (Path Abs Dir
funflow > -> t0 IO (Either (Either IOException (TimeSpec, Int)) TimeSpec))’
funflow > with ‘IO’
funflow > arising from a functional dependency between:
funflow > constraint ‘monad-control-1.0.2.3:Control.Monad.Trans.Control.MonadBaseControl
funflow > IO
funflow > ((->)
funflow > (Path Abs Dir
funflow > -> t0 IO (Either (Either IOException (TimeSpec, Int)) TimeSpec)))’
funflow > arising from a use of ‘CS.withConstructIfMissing’
funflow > instance ‘monad-control-1.0.2.3:Control.Monad.Trans.Control.MonadBaseControl
funflow > ((->) r) ((->) r)’
funflow > at <no location info>
funflow > • In the expression:
funflow > CS.withConstructIfMissing
funflow > store Remote.NoCache (return ()) (td ^. tdOutput)
funflow > In a stmt of a 'do' block:
funflow > status <- CS.withConstructIfMissing
funflow > store Remote.NoCache (return ()) (td ^. tdOutput)
funflow > $ \ fp
funflow > -> do (fpOut, hOut) <- lift
funflow > $ CS.createMetadataFile
funflow > store
funflow > (td ^. tdOutput)
funflow > (Path.Internal.Path "stdout" :: Path Rel File)
funflow > (fpErr, hErr) <- lift
funflow > $ CS.createMetadataFile
funflow > store
funflow > (td ^. tdOutput)
funflow > (Path.Internal.Path "stderr" :: Path Rel File)
funflow > ....
funflow > In the second argument of ‘($)’, namely
funflow > ‘do status <- CS.withConstructIfMissing
funflow > store Remote.NoCache (return ()) (td ^. tdOutput)
funflow > $ \ fp -> do ...
funflow > case status of
funflow > CS.Missing (Left e) -> return (ExecutorFailure e)
funflow > CS.Missing (Right (t, ec)) -> return (Failure t ec)
funflow > CS.Pending () -> return AlreadyRunning
funflow > CS.Complete (Nothing, _) -> return Cached
funflow > CS.Complete (Just t, _) -> return (Success t)’
funflow > |
funflow > 68 | status <- CS.withConstructIfMissing store Remote.NoCache (return ()) (td ^. tdOutput) $ \fp -> do
funflow > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
funflow >
funflow > /run/user/1000/stack-cad912e60174bbcf/funflow-1.6.0/src/Control/Funflow/External/Executor.hs:68:13: error:
funflow > • Couldn't match type ‘CS.Status e0 () (Maybe a0, CS.Item)’
funflow > with ‘KatipContextT
funflow > IO
funflow > (CS.Status
funflow > (Either IOException (TimeSpec, Int)) () (Maybe TimeSpec, b0))’
funflow > Expected type: (Path Abs Dir
funflow > -> t0 IO (Either (Either IOException (TimeSpec, Int)) TimeSpec))
funflow > -> KatipContextT
funflow > IO
funflow > (CS.Status
funflow > (Either IOException (TimeSpec, Int)) () (Maybe TimeSpec, b0))
funflow > Actual type: (Path Abs Dir
funflow > -> t0 IO (Either (Either IOException (TimeSpec, Int)) TimeSpec))
funflow > -> CS.Status e0 () (Maybe a0, CS.Item)
funflow > • The first argument of ($) takes one argument,
funflow > its type is ‘m1 (CS.Status e0 () (Maybe a0, CS.Item))’,
funflow > it is specialized to ‘(Path Abs Dir
funflow > -> t0 IO (Either (Either IOException (TimeSpec, Int)) TimeSpec))
funflow > -> CS.Status e0 () (Maybe a0, CS.Item)’
funflow > In a stmt of a 'do' block:
funflow > status <- CS.withConstructIfMissing
funflow > store Remote.NoCache (return ()) (td ^. tdOutput)
funflow > $ \ fp
funflow > -> do (fpOut, hOut) <- lift
funflow > $ CS.createMetadataFile
funflow > store
funflow > (td ^. tdOutput)
funflow > (Path.Internal.Path "stdout" :: Path Rel File)
funflow > (fpErr, hErr) <- lift
funflow > $ CS.createMetadataFile
funflow > store
funflow > (td ^. tdOutput)
funflow > (Path.Internal.Path "stderr" :: Path Rel File)
funflow > ....
funflow > In the second argument of ‘($)’, namely
funflow > ‘do status <- CS.withConstructIfMissing
funflow > store Remote.NoCache (return ()) (td ^. tdOutput)
funflow > $ \ fp -> do ...
funflow > case status of
funflow > CS.Missing (Left e) -> return (ExecutorFailure e)
funflow > CS.Missing (Right (t, ec)) -> return (Failure t ec)
funflow > CS.Pending () -> return AlreadyRunning
funflow > CS.Complete (Nothing, _) -> return Cached
funflow > CS.Complete (Just t, _) -> return (Success t)’
funflow > |
funflow > 68 | status <- CS.withConstructIfMissing store Remote.NoCache (return ()) (td ^. tdOutput) $ \fp -> do
funflow > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
funflow >
funflow > /run/user/1000/stack-cad912e60174bbcf/funflow-1.6.0/src/Control/Funflow/External/Executor.hs:68:61: error:
funflow > • Couldn't match expected type ‘Data.CAS.ContentHashable.ContentHash’
funflow > with actual type ‘m0 ()’
funflow > • In the third argument of ‘CS.withConstructIfMissing’, namely
funflow > ‘(return ())’
funflow > In the expression:
funflow > CS.withConstructIfMissing
funflow > store Remote.NoCache (return ()) (td ^. tdOutput)
funflow > In a stmt of a 'do' block:
funflow > status <- CS.withConstructIfMissing
funflow > store Remote.NoCache (return ()) (td ^. tdOutput)
funflow > $ \ fp
funflow > -> do (fpOut, hOut) <- lift
funflow > $ CS.createMetadataFile
funflow > store
funflow > (td ^. tdOutput)
funflow > (Path.Internal.Path "stdout" :: Path Rel File)
funflow > (fpErr, hErr) <- lift
funflow > $ CS.createMetadataFile
funflow > store
funflow > (td ^. tdOutput)
funflow > (Path.Internal.Path "stderr" :: Path Rel File)
funflow > ....
funflow > |
funflow > 68 | status <- CS.withConstructIfMissing store Remote.NoCache (return ()) (td ^. tdOutput) $ \fp -> do
funflow > | ^^^^^^^^^
funflow >
funflow > /run/user/1000/stack-cad912e60174bbcf/funflow-1.6.0/src/Control/Funflow/External/Executor.hs:68:73: error:
funflow > • Couldn't match expected type ‘Path Abs Dir
funflow > -> (Path Abs Dir
funflow > -> t0 IO (Either
funflow > (Either IOException (TimeSpec, Int)) TimeSpec))
funflow > -> Either e0 a0’
funflow > with actual type ‘Data.CAS.ContentHashable.ContentHash’
funflow > • Possible cause: ‘(^.)’ is applied to too many arguments
funflow > In the fourth argument of ‘CS.withConstructIfMissing’, namely
funflow > ‘(td ^. tdOutput)’
funflow > In the expression:
funflow > CS.withConstructIfMissing
funflow > store Remote.NoCache (return ()) (td ^. tdOutput)
funflow > In a stmt of a 'do' block:
funflow > status <- CS.withConstructIfMissing
funflow > store Remote.NoCache (return ()) (td ^. tdOutput)
funflow > $ \ fp
funflow > -> do (fpOut, hOut) <- lift
funflow > $ CS.createMetadataFile
funflow > store
funflow > (td ^. tdOutput)
funflow > (Path.Internal.Path "stdout" :: Path Rel File)
funflow > (fpErr, hErr) <- lift
funflow > $ CS.createMetadataFile
funflow > store
funflow > (td ^. tdOutput)
funflow > (Path.Internal.Path "stderr" :: Path Rel File)
funflow > ....
funflow > |
funflow > 68 | status <- CS.withConstructIfMissing store Remote.NoCache (return ()) (td ^. tdOutput) $ \fp -> do
funflow > | ^^^^^^^^^^^^^^
funflow >
-- While building package funflow-1.6.0 using:
/home/arsleust/.stack/setup-exe-cache/x86_64-linux-nix/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1 build --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Progress 1/2
To Reproduce
- clone https://github.com/GuillaumeDesforges/funflow-sandbox
git checkout 695ed51bbf1b888e678a980ee3fe86e030a7f0b4
stack build
Expected behavior
The build of funflow should not fail.
Environment
- OS name + version: NixOS 20.03
- Version of the code: master 7d8f088
At first stack was telling me to add
- cas-hashable-1.0.1@sha256:fa10169aa9c58566eb3bfcda3fb62d76390ea43d8cdcc0878ab0dae2c93ba325,1548
- cas-store-1.0.1@sha256:6d91502edce942ec2fe72cc2380acf23511b9b07be63e9bd3d0c9f6510102883,2757
to the extra-deps of my stack.yml
.
Removing those and putting
extra-deps:
- github: tweag/funflow
commit: 7d8f088f2087423a9314d75c4d0d0c46806dde1e
subdirs:
- cas/hashable
- cas/s3
- cas/store
- funflow
in stack.yml
fixed it.