HuwCampbell / grenade

Deep Learning in Haskell
BSD 2-Clause "Simplified" License
1.45k stars 84 forks source link

mafia build failure #82

Closed vincent-hui closed 5 years ago

vincent-hui commented 5 years ago

I cloned the latest code on master branch and ran ./mafia build to build grenade When Preprocessing test suite, I got the following error message.

Preprocessing test suite 'test' for grenade-0.1.0...
[ 1 of 15] Compiling Test.Hedgehog.Hmatrix ( test/Test/Hedgehog/Hmatrix.hs, dist/build/test/test-tmp/Test/Hedgehog/Hmatrix.o )
[ 2 of 15] Compiling Test.Hedgehog.Compat ( test/Test/Hedgehog/Compat.hs, dist/build/test/test-tmp/Test/Hedgehog/Compat.o )
[ 3 of 15] Compiling Test.Hedgehog.TypeLits ( test/Test/Hedgehog/TypeLits.hs, dist/build/test/test-tmp/Test/Hedgehog/TypeLits.o )

test/Test/Hedgehog/TypeLits.hs:22:1: warning: [-Wdeprecations]
    Module ‘GHC.TypeLits.Witnesses’ is deprecated:
      Use singletons package instead

test/Test/Hedgehog/TypeLits.hs:64:14: warning: [-Wdeprecations]
    In the use of ‘natDict’ (imported from GHC.TypeLits.Witnesses):
    Deprecated: "Use singletons package instead"

test/Test/Hedgehog/TypeLits.hs:64:25: warning: [-Wdeprecations]
    In the use of ‘%*’ (imported from GHC.TypeLits.Witnesses):
    Deprecated: "Use singletons package instead"

test/Test/Hedgehog/TypeLits.hs:64:28: warning: [-Wdeprecations]
    In the use of ‘natDict’ (imported from GHC.TypeLits.Witnesses):
    Deprecated: "Use singletons package instead"

<no location info>: error:
Failing due to -Werror.
Process failed: cabal build -j --ghc-options=-Werror (exit code: 1)
ubuntu@ip-172-31-29-191:~/grenade$
erikd commented 5 years ago

What version of GHC are you using? I thinkg ghc 8.6 doesn't work, but earlier versions should work.

vincent-hui commented 5 years ago

I am using 8.0.2

erikd commented 5 years ago

Oh, that's a different issue. I am pretty sure 8.0.2 is too old.

Grenade uses Haskell's dependent types features and these features are still in a state of flux and can change from release to release.

Please try ghc 8.2 or 8.4.

HuwCampbell commented 5 years ago

It should still work, but mafia is very strict on warnings, and activates -Wall all the time; it is also hard to maintain warnings free code across multiple versions when using some of the more advanced GHC features which are currently in flux.

mafia should set up a proper sandbox for you, and you should then be able to use normal cabal commands to get things compiling.

tmcgilchrist commented 5 years ago

Running it as mafia build -w will pass the build even if there are warnings.

On Wed, 6 Feb 2019 at 12:05 pm, Huw Campbell notifications@github.com wrote:

It should still work, but mafia is very strict on warnings, and activates -Wall all the time; it is also hard to maintain warnings free code across multiple versions when using some of the more advanced GHC features which are currently in flux.

mafia should set up a proper sandbox for you, and you should then be able to use normal cabal commands to get things compiling.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HuwCampbell/grenade/issues/82#issuecomment-460866137, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKbuSFq-mz-Ev8ljZAKlXyhTr8_lOqXks5vKipzgaJpZM4ahcdT .

vincent-hui commented 5 years ago

Thank you. Yes I can build grenade with mafia build -w.