asterius icon indicating copy to clipboard operation
asterius copied to clipboard

ahc-cabal - Not able to install text-show package

Open santhiya-v opened this issue 5 years ago • 5 comments

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

santhiya-v avatar Apr 23 '20 16:04 santhiya-v

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 avatar Apr 24 '20 05:04 TerrorJack

@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 avatar Apr 24 '20 05:04 santhiya-v

@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 avatar Apr 27 '20 07:04 TerrorJack

@TerrorJack Thanks a lot! That helped in building it successfully using ahc-cabal.

santhiya-v avatar May 01 '20 14:05 santhiya-v

The longer-term plan is relying on GHC's native bignum implementation

Merged 1 month ago :)

Fell-x27 avatar Aug 16 '20 11:08 Fell-x27