I encountered a bug in cardano-node recently and since I know Haskell - I thought to myself, why not try and fix it?
I've done the following:
- Build from source per https://github.com/input-output-hk/cardano-node/blob/master/doc/getting-started/install.md/
- Install ghcid through stack
- However, when running
ghcid -c "cabal repl exe:cardano-node --reorder-goals"as per documentation results in the following error:
$ ghcid -c "cabal repl exe:cardano-node --reorder-goals" Loading cabal repl exe:cardano-node --reorder-goals ... Warning: Requested index-state 2021-04-30T00:00:00Z is newer than 'hackage.haskell.org'! Falling back to older state (2021-04-29T23:07:55Z). Resolving dependencies... Build profile: -w ghc-8.10.4 -O1 In order, the following will be built (use -v for more details): - cardano-node-1.27.0 (exe:cardano-node) (ephemeral targets) Preprocessing executable 'cardano-node' for cardano-node-1.27.0.. GHCi, version 8.10.4: https://www.haskell.org/ghc/ :? for help *** Exception: The following packages were specified via -package or -package-id flags, but were not needed for compilation: - text-22.214.171.124 - optparse-applicative-0.16.1.0 - cardano-prelude-0.1.0.0 - cardano-node-1.27.0 - cardano-config-0.1.0.0 No files loaded, GHCi is not working properly. Command: cabal repl exe:cardano-node --reorder-goals
Update: I guess for local development, I can probably work around this by setting
package cardano-node ghc-options: -Wwarn
in cabal.project, but that seems undesirable. It's been over 8 years since I've last used Haskell & Cabal, so I'm still figuring it all out again heh. But I guess something is slightly misconfigured?
Output when setting -Wwarn for cardano-node:
[1 of 2] Compiling Paths_cardano_node ( /home/weebl/git/cardano-node/dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-node-1.27.0/x/cardano-node/build/cardano-node/autogen/Paths_cardano_node.hs, interpreted ) [2 of 2] Compiling Main ( app/cardano-node.hs, interpreted ) Ok, two modules loaded. All good (2 modules, at 04:45:39)
If anyone knows which steps I'm missing, please let me know.
GHC 8.10.4 Cabal 126.96.36.199 ghcid v0.8.7 OS: Ubuntu 21.04 x86-64
Thanks in advance!