input-output-hk / smash

Stakepool Metadata Aggregation Server
36 stars 7 forks source link

Compilation failure when trying to build latest master or 1.4.0 tag #152

Closed hodlonaut closed 3 years ago

hodlonaut commented 3 years ago

I've tried compiling using ghc 8.10.3, 8.10.2 and Erik has tried 8.10.4. All cases seem to run into the following error as a part of 'cabal build smash' (after earlier 'cabal update'):

[3 of 4] Compiling Cardano.SMASH.Types ( src/Cardano/SMASH/Types.hs, /home/smash/cardano/smash/dist-newstyle/build/x86_64-linux/ghc-8.10.2/smash-servant-types-1.4.0/build/Cardano/SMASH/Types.o, /home/smash/cardano/smash/dist-newstyle/build/x86_64-linux/ghc-8.10.2/smash-servant-types-1.4.0/build/Cardano/SMASH/Types.dyn_o )

src/Cardano/SMASH/Types.hs:355:26: error:
    • No instance for (MonadFail (Either Text))
        arising from a use of ‘parseTimeM’
    • In the expression: parseTimeM False defaultTimeLocale timeFormat
      In the expression:
        parseTimeM False defaultTimeLocale timeFormat $ toS queryParam
      In an equation for ‘parsedTime’:
          parsedTime
            = parseTimeM False defaultTimeLocale timeFormat $ toS queryParam
    |
355 |             parsedTime = parseTimeM False defaultTimeLocale timeFormat $ toS queryParam
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" -

Please advise

erikd commented 3 years ago

I needed to add

Constraints: ListLike >= 4.7.4

to to cabal .project.local to avoid cabal pulling in an older version that that caused overlapping instance errors. I suspect that should be in the cabal.project file.

With that added constraint I get the above build error with ghc-8.10.4 .

ksaric commented 3 years ago

The project still uses GHC 8.6.4, will take a look after we sort the major issues.

ksaric commented 3 years ago

Should be fixed with https://github.com/input-output-hk/smash/pull/151