abailly / sensei

A sensei for improving one's development process
BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

"error: Could not find module 'Data.Aeson.Key'" preventing compile/build #29

Closed Jayjader closed 4 months ago

Jayjader commented 1 year ago

When I attempt stack build in the root directory of the project, I get the following error:

servant-server-base> /home/jayjader/src/sensei/servant-server-base/src/Data/Aeson/Extra.hs:14:1: error:
servant-server-base>     Could not find module ‘Data.Aeson.Key’
servant-server-base>     Perhaps you meant
servant-server-base>       Data.Aeson.TH (from aeson-1.5.6.0)
servant-server-base>       Data.Aeson.Text (from aeson-1.5.6.0)
servant-server-base>       Data.Aeson (from aeson-1.5.6.0)
servant-server-base>     Locations searched:
servant-server-base>       .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/Data/Aeson/Key.hs
servant-server-base>       .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/Data/Aeson/Key.lhs
servant-server-base>       .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/Data/Aeson/Key.hsig
servant-server-base>       .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/Data/Aeson/Key.lhsig
servant-server-base>       src/Data/Aeson/Key.hs
servant-server-base>       src/Data/Aeson/Key.lhs
servant-server-base>       src/Data/Aeson/Key.hsig
servant-server-base>       src/Data/Aeson/Key.lhsig
servant-server-base>       .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/autogen/Data/Aeson/Key.hs
servant-server-base>       .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/autogen/Data/Aeson/Key.lhs
servant-server-base>       .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/autogen/Data/Aeson/Key.hsig
servant-server-base>       .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/autogen/Data/Aeson/Key.lhsig
servant-server-base>       .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/global-autogen/Data/Aeson/Key.hs
servant-server-base>       .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/global-autogen/Data/Aeson/Key.lhs
servant-server-base>       .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/global-autogen/Data/Aeson/Key.hsig
servant-server-base>       .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/global-autogen/Data/Aeson/Key.lhsig
servant-server-base>    |
servant-server-base> 14 | import Data.Aeson.Key (fromText)
servant-server-base>    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I'm on arch-linux, using the stack-static Arch User Repository package.

When googling the error, I noticed that the most recent version of aeson seems to be 2.2. I don't know haskell very well, but I couldn't find any version pinning of aeson by grep-ing in the project files. So I'm not quite sure why the build tool mentions aeson-1.5.6.0 in the error message...

The full log of the stack build invocation is here in a gist.

abailly commented 1 year ago

First of all, thanks a lot for trying sensei! I am not using stack on a regular basis anymore so it might have bitrotten. I have upgraded to a more recent stockage version on master, could you give it a try?

Jayjader commented 4 months ago

First of all, sorry for the long delay.

I tried rebuilding today with an up-to-date clone of this repo. Aside from needing to npm install inside ui/, stack build at the project root worked perfectly.

npm install did complain about missing peer dependencies, but it didn't prevent the haskell project from building.

Invoking sensei-exe --help seems to work as it should, in any case.