goldfirere / units

The home of the units Haskell package
94 stars 19 forks source link

Cannot build on GHC 9 #67

Closed ocharles closed 2 years ago

ocharles commented 2 years ago

If I change units.cabal to depend on singletons-th I get a bit further, but then I get:

Data/Metrology/Z.hs:81:2: error: Cannot find type annotation for ==
   |
81 | $(singletons [d| data Z = Zero | S Z | P Z deriving Eq |])
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Data/Metrology/Z.hs:81:2: error: Q monad failure
   |
81 | $(singletons [d| data Z = Zero | S Z | P Z deriving Eq |])
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

At this point I'm not sure what to do

goldfirere commented 2 years ago

I've pushed a fix. But, sadly, I can't seem to get CI working. See e.g. https://github.com/goldfirere/units/runs/3464148933?check_suite_focus=true The problem seems to be that, in the testsuite, I use hs-source-dirs in the cabal file to build the units-defs packages as part of the testsuite, but somehow the haskell-ci-generated CI script doesn't know this. I'm a bit out of my depth here. Any advice? Maybe I can summon @phadej to share a bit of insight. (I'm happy to restructure how to do this, but I don't know what configuration is best.)

phadej commented 2 years ago

looks like actions/checkout doesn't checkout recursively. Please open an issue in haskell-ci.

phadej commented 2 years ago

It seems you have to enable it explicitly, https://github.com/haskell-CI/haskell-ci/pull/504 https://github.com/haskell-CI/haskell-ci/pull/503

ocharles commented 2 years ago

LG! Could this be released to Hackage?

goldfirere commented 2 years ago

Done!