vzarytovskii / haskell-dev-env

A Dockerfile for Haskell Development, and DevContainer for VSCode, for installing GHC HLS (Haskell Language Server) and the required plugins
MIT License
56 stars 17 forks source link

Docker build failed #3

Closed cleversprocket closed 2 years ago

cleversprocket commented 2 years ago

Hello,

The docker build failed with the following errors:

...
#20 1316.8 [13 of 31] Compiling Language.REST.Internal.Rewrite ( src/Language/REST/Internal/Rewrite.hs, dist/build/Language/REST/Internal/Rewrite.o, dist/build/Language/REST/Internal/Rewrite.dyn_o )
#20 1316.8 [14 of 31] Compiling Language.REST.Internal.WorkStrategy ( src/Language/REST/Internal/WorkStrategy.hs, dist/build/Language/REST/Internal/WorkStrategy.o, dist/build/Language/REST/Internal/WorkStrategy.dyn_o )
#20 1316.8 [15 of 31] Compiling Language.REST.Rest ( src/Language/REST/Rest.hs, dist/build/Language/REST/Rest.o, dist/build/Language/REST/Rest.dyn_o )
#20 1316.8 
#20 1316.8 src/Language/REST/Rest.hs:123:35: warning: [-Wdeprecations]
#20 1316.8     In the use of type constructor or class `ListT'
#20 1316.8     (imported from Control.Monad.List, but defined in transformers-0.5.6.2:Control.Monad.Trans.List):
#20 1316.8     Deprecated: "This transformer is invalid on most monads"
#20 1316.8     |
#20 1316.8 123 |         liftSet :: S.HashSet a -> ListT m a
#20 1316.8     |                                   ^^^^^
#20 1316.8 
#20 1316.8 src/Language/REST/Rest.hs:124:21: warning: [-Wdeprecations]
#20 1316.8     In the use of data constructor `ListT'
#20 1316.8     (imported from Control.Monad.List, but defined in transformers-0.5.6.2:Control.Monad.Trans.List):
#20 1316.8     Deprecated: "This transformer is invalid on most monads"
#20 1316.8     |
#20 1316.8 124 |         liftSet s = ListT $ return $ S.toList s
#20 1316.8     |                     ^^^^^
#20 1316.8 
#20 1316.8 src/Language/REST/Rest.hs:130:19: warning: [-Wdeprecations]
#20 1316.8     In the use of `runListT'
#20 1316.8     (imported from Control.Monad.List, but defined in transformers-0.5.6.2:Control.Monad.Trans.List):
#20 1316.8     Deprecated: "This transformer is invalid on most monads"
#20 1316.8     |
#20 1316.8 130 |             res = runListT $ do
#20 1316.8     |                   ^^^^^^^^
#20 1316.8 
#20 1316.8 src/Language/REST/Rest.hs:132:22: warning: [-Wdeprecations]
#20 1316.8     In the use of data constructor `ListT'
#20 1316.8     (imported from Control.Monad.List, but defined in transformers-0.5.6.2:Control.Monad.Trans.List):
#20 1316.8     Deprecated: "This transformer is invalid on most monads"
#20 1316.8     |
#20 1316.8 132 |               t'  <- ListT $ S.toList <$> apply ptTerm r
#20 1316.8     |                      ^^^^^
#20 1316.8 
#20 1316.8 src/Language/REST/Rest.hs:136:44: warning: [-Wdeprecations]
#20 1316.8     In the use of `runListT'
#20 1316.8     (imported from Control.Monad.List, but defined in transformers-0.5.6.2:Control.Monad.Trans.List):
#20 1316.8     Deprecated: "This transformer is invalid on most monads"
#20 1316.8     |
#20 1316.8 136 |         accepted userRWs = M.fromList <$> (runListT $ do
#20 1316.8     |                                            ^^^^^^^^
#20 1316.8 
#20 1316.8 src/Language/REST/Rest.hs:179:25: warning: [-Wdeprecations]
#20 1316.8     In the use of `runListT'
#20 1316.8     (imported from Control.Monad.List, but defined in transformers-0.5.6.2:Control.Monad.Trans.List):
#20 1316.8     Deprecated: "This transformer is invalid on most monads"
#20 1316.8     |
#20 1316.8 179 |             evalPaths = runListT $ do
#20 1316.8     |                         ^^^^^^^^
#20 1316.8 
#20 1316.8 src/Language/REST/Rest.hs:180:26: warning: [-Wdeprecations]
#20 1316.8     In the use of data constructor `ListT'
#20 1316.8     (imported from Control.Monad.List, but defined in transformers-0.5.6.2:Control.Monad.Trans.List):
#20 1316.8     Deprecated: "This transformer is invalid on most monads"
#20 1316.8     |
#20 1316.8 180 |               (t', r) <- ListT $ return (S.toList evalRWs)
#20 1316.8     |                          ^^^^^
#20 1316.8 
#20 1316.8 src/Language/REST/Rest.hs:186:25: warning: [-Wdeprecations]
#20 1316.8     In the use of `runListT'
#20 1316.8     (imported from Control.Monad.List, but defined in transformers-0.5.6.2:Control.Monad.Trans.List):
#20 1316.8     Deprecated: "This transformer is invalid on most monads"
#20 1316.8     |
#20 1316.8 186 |             userPaths = runListT $ do
#20 1316.8     |                         ^^^^^^^^
#20 1316.8 
#20 1316.8 src/Language/REST/Rest.hs:188:22: warning: [-Wdeprecations]
#20 1316.8     In the use of data constructor `ListT'
#20 1316.8     (imported from Control.Monad.List, but defined in transformers-0.5.6.2:Control.Monad.Trans.List):
#20 1316.8     Deprecated: "This transformer is invalid on most monads"
#20 1316.8     |
#20 1316.8 188 |               ord <- ListT $ return $ Mb.maybeToList $ M.lookup t' acceptedUserRewrites
#20 1316.8     |                      ^^^^^
#20 1316.8 [16 of 31] Compiling Language.REST.KBO ( src/Language/REST/KBO.hs, dist/build/Language/REST/KBO.o, dist/build/Language/REST/KBO.dyn_o )
#20 1316.8 [17 of 31] Compiling Language.REST.Types ( src/Language/REST/Types.hs, dist/build/Language/REST/Types.o, dist/build/Language/REST/Types.dyn_o )
#20 1316.8 
#20 1316.8 src/Language/REST/Types.hs:72:10: error:
#20 1316.8     Duplicate instance declarations:
#20 1316.8       instance Hashable a => Hashable (OS.Set a)
#20 1316.8         -- Defined at src/Language/REST/Types.hs:72:10
#20 1316.8       instance Hashable v => Hashable (OS.Set v)
#20 1316.8         -- Defined in `hashable-1.3.5.0:Data.Hashable.Class'
#20 1316.8    |
#20 1316.8 72 | instance Hashable a => Hashable (OS.Set a) where
#20 1316.8    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#20 1316.8 
#20 1316.8 src/Language/REST/Types.hs:75:10: error:
#20 1316.8     Duplicate instance declarations:
#20 1316.8       instance (Hashable a, Hashable b) => Hashable (M.Map a b)
#20 1316.8         -- Defined at src/Language/REST/Types.hs:75:10
#20 1316.8       instance (Hashable k, Hashable v) => Hashable (M.Map k v)
#20 1316.8         -- Defined in `hashable-1.3.5.0:Data.Hashable.Class'
#20 1316.8    |
#20 1316.8 75 | instance (Hashable a, Hashable b) => Hashable (M.Map a b) where
#20 1316.8    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#20 1316.8 cabal: Failed to build rest-rewrite-0.2.0 (which is required by exe:liquid
#20 1316.8 from liquidhaskell-0.8.6.0). See the build log above for details.
#20 1316.8 
------
executor failed running [/bin/sh -c cabal install haskell-dap ghci-dap haskell-debug-adapter hlint-3.2.7 apply-refact retrie stylish-haskell hoogle ormolu liquidhaskell]: exit code: 1
[2383391 ms] Command failed: docker build -f /Users/matt/repos/try/haskell-dev-env/.devcontainer/Dockerfile -t vsc-haskell-dev-env-22b0d53c1a1d6c9380d04e8c48a3f8ec --build-arg GHC_VERSION=8.10.7 --build-arg STACK_RESOLVER=lts-18.13 --build-arg STACK_VERSION=2.7.3 --build-arg CABAL_VERSION=3.6.2.0 --build-arg HLS_VERSION=1.5.1 /Users/matt/repos/try/haskell-dev-env
[2383392 ms] Exit code 1

I wish I could provide insight as to why but I'm a newb to Haskell.

vzarytovskii commented 2 years ago

Hey, since it's always building latest versions of packages, it can break sometimes. I will try to not forget and pin package versions later this week, so it will always be "reproducible" :) Sorry for the inconvenience.

martin503 commented 2 years ago

If u delete in 68 line in Dockerfile liquidhaskell then it works. Some problem with cabal installation I guess ...

vzarytovskii commented 2 years ago

If u delete in 68 line in Dockerfile liquidhaskell then it works. Some problem with cabal installation I guess ...

I've pinned packages' versions, so it should build fine now. I will update them to latest working soon too.

Going to close this one now.