Closed aleeusgr closed 1 year ago
error: (42 results) [35/1870] Spock-core > • Couldn't match type: forall a. Spock-core > ActionCtxT ctx m a -> ActionCtxT () m a Spock-core > with: ActionCtxT ctx m () -> ActionCtxT () m () Spock-core > Expected: LiftHooked ctx m -> ActionCtxT ctx m () -> ActionT m () Spock-core > Actual: LiftHooked ctx m Spock-core > -> forall a. ActionCtxT ctx m a -> ActionCtxT () m a Spock-core > • In the first argument of ‘asks’, namely ‘unLiftHooked’ Spock-core > In the second argument of ‘($)’, namely ‘asks unLiftHooked’ Spock-core > In a stmt of a 'do' block: hookLift <- lift $ asks unLiftHooked Spock-core > • Relevant bindings include Spock-core > action :: [T.Text] -> ActionCtxT ctx m () Spock-core > (bound at src/Web/Spock/Core.hs:78:15) Spock-core > wireAny :: SpockMethod Spock-core > -> ([T.Text] -> ActionCtxT ctx m ()) -> SpockCtxT ctx m () Spock-core > (bound at src/Web/Spock/Core.hs:78:5) Spock-core > | Spock-core > 80 | do hookLift <- lift $ asks unLiftHooked Spock-core > | ^^^^^^^^^^^^ Spock-core > Spock-core > /run/user/1000/stack-87827ee7c5625bb0/Spock-core-0.14.0.0/src/Web/Spock/Core.hs:106:32: error:
>Step 3/13 : RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories
---> Running in 769c46699550
/bin/sh: line 1: /etc/apk/repositories: No such file or directory
The command '/bin/sh -c echo http://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories' returned a non-zero code: 1
SMOOTH, NON-INVASIVE HASKELL STACK AND NIX SHELL INTEGRATION
So while Nix might be great for you, it’s helpful if it’s optional for others. Therefore, any solution combining Nix and Stack should be non-invasive and also work for those who don’t use Nix.
the solution above works, but further development is blocked: docker does not build with it. Try different solution first: https://github.com/srid/haskell-template/discussions/65
error: nix experimental features disabled
https://nixos.wiki/wiki/Docker https://codesandbox.io/docs/tutorial/getting-started-with-docker https://lethalman.blogspot.com/2016/04/cheap-docker-images-with-nix_15.html https://unix.stackexchange.com/questions/588575/building-docker-image-with-nix-dockertools-buildimage-no-internet-access-in-bu https://jpetazzo.github.io/2020/04/01/quest-minimal-docker-images-part-3/
search nix dockertools
https://stackoverflow.com/questions/43375880/how-to-build-a-docker-container-with-nix https://ryantm.github.io/nixpkgs/builders/images/dockertools/ https://thewagner.net/blog/2021/02/25/building-container-images-with-nix/ https://nix.dev/tutorials/building-and-running-docker-images
https://github.com/aleeusgr/hello-haskell-ci/commit/0a62b34b070cb5a3210319e613d194d17b73d887
milestone achieved: working production environment that can be build into a docker container (see test-docker-nix.sh), or tested nix run
or developed nix develop
flakes need to be enabled in nix.
Spock tutorial
stack build --fast --pedantic
1
lead
Solution:
add following code to
stack.yml
⚠️WARNING: read this for better option
2
Originally posted by @aleeusgr in https://github.com/SIDANWhatever/plutus-cborhex-automation/issues/3#issuecomment-1278544029
Suggestion: