ahc-cabal - Not able to install text-show package
Description
I am trying to convert an exe in duckling to wasm/js artifacts using asterius. Pulled asterius docker image. However when I run
ahc-cabal new-install --installdir . duckling-request-sample
there is an issue while installing package text-show. It has dependency on integer-gmp and that is not being installed.
Error
cabal: Could not resolve dependencies: [__0] next goal: duckling (user goal) [__0] rejecting: duckling-0.1.6.1 (constraint from user target requires ==0.1.6.0) [__0] trying: duckling-0.1.6.0 [__1] trying: text-show-3.8.5 (dependency of duckling) [__2] trying: template-haskell-2.15.0.0/installed-J1EEM9PaTdl97VBPHpmAFC (dependency of text-show +/-template-haskell-2-11) [__3] next goal: integer-gmp (dependency of text-show) [__3] rejecting: integer-gmp-1.0.2.0, integer-gmp-1.0.1.0, integer-gmp-1.0.0.1, integer-gmp-1.0.0.0, integer-gmp-0.5.1.0 (only already installed instances can be used) [__3] fail (backjumping, conflict set: integer-gmp, text-show) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: base, text-show, integer-gmp, template-haskell, duckling
Note Duckling: https://github.com/facebook/duckling Duckling works fine when installed with cabal
We use integer-simple instead of integer-gmp for now, which is the cause of the build failure above. Right now the easiest fix is patching packages which rely on integer-gmp. The longer-term plan is relying on GHC's native bignum implementation, see https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2231
@TerrorJack Thanks for the response, it helps a lot. I am new to this environment, can you please explain a bit in detail how to patch for my specific use case?
@santhiya-v Check https://cabal.readthedocs.io/en/latest/nix-local-build.html#developing-multiple-packages. You need to set up a cabal.project file, add text-show to the project, then you can modify the local text-show sources.
@TerrorJack Thanks a lot! That helped in building it successfully using ahc-cabal.
The longer-term plan is relying on GHC's native bignum implementation
Merged 1 month ago :)