Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use with hie on stack project -> add example #384

Closed
srghma opened this issue Dec 25, 2019 · 3 comments
Closed

how to use with hie on stack project -> add example #384

srghma opened this issue Dec 25, 2019 · 3 comments

Comments

@srghma
Copy link

srghma commented Dec 25, 2019

No description provided.

@srghma
Copy link
Author

srghma commented Dec 25, 2019

I have generated example project https://github.com/srghma/generate-all-tests

FIles here are generated with

$ stack init

$ nix-shell -p '(with import (builtins.fetchTarball "https://github.com/input-output-hk/nixpkgs/archive/a8f81dc037a5977414a356dd068f2621b3c89b60.tar.gz") (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz)); [haskell-nix.nix-tools])'

$ stack-to-nix --output . --stack-yaml stack.yaml

The idea is that hie should work if stack build --verbose --only-configure is working

but it's not working yet

I have an error Invalid option --internal-re-exec-version=2.1.3.1'`

$ /nix/store/dj2ylmvx2c288h51yx8ljg4h6bh5vyla-nix-2.3/bin/nix-shell /home/srghma/projects/generate-all-tests/stack-shell.nix --arg ghc "with (import <nixpkgs> {}); haskell.compiler.ghc865" --run "'/nix/store/f9lqnmvfbq9367jazh14qv147aawlphb-stack-2.1.3.1/bin/stack' 'build' '--verbose' '--only-configure'"
2.1.3.1 x86_64 hpack-0.33.0
2019-12-25 20:57:47.373504: [debug] Checking for project config at: /home/srghma/projects/generate-all-tests/stack.yaml
2019-12-25 20:57:47.373629: [debug] Loading project config file stack.yaml
2019-12-25 20:57:47.380012: [debug] SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2019-12-24 18:57:47.379977306 UTC]
2019-12-25 20:57:47.380394: [debug] Using package location completions from a lock file
2019-12-25 20:57:47.484796: [debug] Running hpack on /home/srghma/projects/generate-all-tests/package.yaml
2019-12-25 20:57:47.487297: [debug] hpack output unchanged in /home/srghma/projects/generate-all-tests/generate-all-tests.cabal
2019-12-25 20:57:47.489306: [debug] PATH is: Just "/nix/store/rn5dmlak31vg3fjv94y8gwy1pn6vbdab-bash-interactive-4.4-p23/bin:/nix/store/jinzixh6zw7rsvlqs1bi3isy8wndzna0-ghc-shell-for-generate-all-tests-ghc-8.6.5/bin:/nix/store/5w1sbkk3kwahwm25dhgnyd4w6kg4znmf-gcc-wrapper-8.3.0/bin:/nix/store/bzx75p22dpyzc62z9znkrm0xmvy4hxch-gcc-8.3.0/bin:/nix/store/g8dv76zcqp8qwbm6mrl5iy7zrkbzzc46-glibc-2.27-bin/bin:/nix/store/3kqc2wmvf1jkqb2jmcm7rvd9lf4345ra-coreutils-8.31/bin:/nix/store/dcy619xipxv2fjna4hr077x6z1lxjay3-binutils-wrapper-2.31.1/bin:/nix/store/q354712mnkw3ky8b5crj7ir7dyv29ylj-binutils-2.31.1/bin:/nix/store/g8dv76zcqp8qwbm6mrl5iy7zrkbzzc46-glibc-2.27-bin/bin:/nix/store/3kqc2wmvf1jkqb2jmcm7rvd9lf4345ra-coreutils-8.31/bin:/nix/store/l55n5piyrm86j41rk44qf6938q7njcpy-patchelf-0.9/bin:/nix/store/zp8v7wkbplvmzyds87icn1rk070hizdc-ncurses-6.1-20190112/bin:/nix/store/s64szybpxlw3cd5p9nryjxjs5ix6aps2-cabal-install-3.0.0.0/bin:/nix/store/dj2ylmvx2c288h51yx8ljg4h6bh5vyla-nix-2.3/bin:/nix/store/6rvaraplda7m14c575gpvs6kgzdwvkav-hoogle-local-0.1/bin:/nix/store/3kqc2wmvf1jkqb2jmcm7rvd9lf4345ra-coreutils-8.31/bin:/nix/store/xhdbfv3kivss6y04xk9i4a5pknaww1az-findutils-4.7.0/bin:/nix/store/jx6nb80kgci6pmbrxacckf2pzx3384xq-diffutils-3.7/bin:/nix/store/p6yrqh9awh62n8h1dihim6463fkkd8aw-gnused-4.7/bin:/nix/store/az4kl5slhbkmmy4vj98z3hzxxkan7zza-gnugrep-3.3/bin:/nix/store/vqhym3lldqg3ihbk9zm019v3apl1g1hr-gawk-5.0.1/bin:/nix/store/b6aigimi4gv2a3jxbqpkwwc241n911mr-gnutar-1.32/bin:/nix/store/5w219iiyx6cbzwvmr3pbpnczhz66dydz-gzip-1.10/bin:/nix/store/gpszqcy0xi0lavbbjdq82zkkjp3jbp2a-bzip2-1.0.6.0.1-bin/bin:/nix/store/n4xi4wk9bzh4jp3hvrqk2bwy6jm6sah0-gnumake-4.2.1/bin:/nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin:/nix/store/l2f26kxcnxjdh1bgq73pfkwwxqfjbrhn-patch-2.7.6/bin:/nix/store/k2hzs4i8afx598iyjvsh16fybcn1b7dp-xz-5.2.4-bin/bin:/home/srghma/.gem/ruby/2.4.0/bin:/home/srghma/.node_modules/bin:/home/srghma/bin:/run/wrappers/bin:/home/srghma/.nix-profile/bin:/etc/profiles/per-user/srghma/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:./node_modules/.bin"
2019-12-25 20:57:47.489400: [debug] Using a nix-shell environment from file: /home/srghma/projects/generate-all-tests/stack-shell.nix
2019-12-25 20:57:47.489665: [debug] Run process: /nix/store/dj2ylmvx2c288h51yx8ljg4h6bh5vyla-nix-2.3/bin/nix-shell --pure /home/srghma/projects/generate-all-tests/stack-shell.nix --arg ghc "with (import <nixpkgs> {}); haskell.compiler.ghc865" --run "'/nix/store/f9lqnmvfbq9367jazh14qv147aawlphb-stack-2.1.3.1/bin/stack' $STACK_IN_NIX_EXTRA_ARGS '--internal-re-exec-version=2.1.3.1' 'build' '--verbose' '--only-configure'"
2.1.3.1 x86_64 hpack-0.33.0
2019-12-25 20:57:51.631665: [debug] Checking for project config at: /home/srghma/projects/generate-all-tests/stack.yaml
2019-12-25 20:57:51.631788: [debug] Loading project config file stack.yaml
2019-12-25 20:57:51.634662: [debug] SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2019-12-24 18:57:51.634641356 UTC]
2019-12-25 20:57:51.635095: [debug] Using package location completions from a lock file
2019-12-25 20:57:51.737193: [debug] Running hpack on /home/srghma/projects/generate-all-tests/package.yaml
2019-12-25 20:57:51.739655: [debug] hpack output unchanged in /home/srghma/projects/generate-all-tests/generate-all-tests.cabal
2019-12-25 20:57:51.741516: [debug] PATH is: Just "/nix/store/rn5dmlak31vg3fjv94y8gwy1pn6vbdab-bash-interactive-4.4-p23/bin:/nix/store/jinzixh6zw7rsvlqs1bi3isy8wndzna0-ghc-shell-for-generate-all-tests-ghc-8.6.5/bin:/nix/store/5w1sbkk3kwahwm25dhgnyd4w6kg4znmf-gcc-wrapper-8.3.0/bin:/nix/store/bzx75p22dpyzc62z9znkrm0xmvy4hxch-gcc-8.3.0/bin:/nix/store/g8dv76zcqp8qwbm6mrl5iy7zrkbzzc46-glibc-2.27-bin/bin:/nix/store/3kqc2wmvf1jkqb2jmcm7rvd9lf4345ra-coreutils-8.31/bin:/nix/store/dcy619xipxv2fjna4hr077x6z1lxjay3-binutils-wrapper-2.31.1/bin:/nix/store/q354712mnkw3ky8b5crj7ir7dyv29ylj-binutils-2.31.1/bin:/nix/store/g8dv76zcqp8qwbm6mrl5iy7zrkbzzc46-glibc-2.27-bin/bin:/nix/store/3kqc2wmvf1jkqb2jmcm7rvd9lf4345ra-coreutils-8.31/bin:/nix/store/l55n5piyrm86j41rk44qf6938q7njcpy-patchelf-0.9/bin:/nix/store/zp8v7wkbplvmzyds87icn1rk070hizdc-ncurses-6.1-20190112/bin:/nix/store/s64szybpxlw3cd5p9nryjxjs5ix6aps2-cabal-install-3.0.0.0/bin:/nix/store/dj2ylmvx2c288h51yx8ljg4h6bh5vyla-nix-2.3/bin:/nix/store/6rvaraplda7m14c575gpvs6kgzdwvkav-hoogle-local-0.1/bin:/nix/store/3kqc2wmvf1jkqb2jmcm7rvd9lf4345ra-coreutils-8.31/bin:/nix/store/xhdbfv3kivss6y04xk9i4a5pknaww1az-findutils-4.7.0/bin:/nix/store/jx6nb80kgci6pmbrxacckf2pzx3384xq-diffutils-3.7/bin:/nix/store/p6yrqh9awh62n8h1dihim6463fkkd8aw-gnused-4.7/bin:/nix/store/az4kl5slhbkmmy4vj98z3hzxxkan7zza-gnugrep-3.3/bin:/nix/store/vqhym3lldqg3ihbk9zm019v3apl1g1hr-gawk-5.0.1/bin:/nix/store/b6aigimi4gv2a3jxbqpkwwc241n911mr-gnutar-1.32/bin:/nix/store/5w219iiyx6cbzwvmr3pbpnczhz66dydz-gzip-1.10/bin:/nix/store/gpszqcy0xi0lavbbjdq82zkkjp3jbp2a-bzip2-1.0.6.0.1-bin/bin:/nix/store/n4xi4wk9bzh4jp3hvrqk2bwy6jm6sah0-gnumake-4.2.1/bin:/nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin:/nix/store/l2f26kxcnxjdh1bgq73pfkwwxqfjbrhn-patch-2.7.6/bin:/nix/store/k2hzs4i8afx598iyjvsh16fybcn1b7dp-xz-5.2.4-bin/bin"
2019-12-25 20:57:51.741591: [debug] Using a nix-shell environment from file: /home/srghma/projects/generate-all-tests/stack-shell.nix
2019-12-25 20:57:51.741786: [debug] Run process: /nix/store/dj2ylmvx2c288h51yx8ljg4h6bh5vyla-nix-2.3/bin/nix-shell --pure /home/srghma/projects/generate-all-tests/stack-shell.nix --arg ghc "with (import <nixpkgs> {}); haskell.compiler.ghc865" --run "'/nix/store/f9lqnmvfbq9367jazh14qv147aawlphb-stack-2.1.3.1/bin/stack' $STACK_IN_NIX_EXTRA_ARGS '--internal-re-exec-version=2.1.3.1' '--internal-re-exec-version=2.1.3.1' 'build' '--verbose' '--only-configure'"
warning: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:9; will use bash from your environment
Invalid option `--internal-re-exec-version=2.1.3.1'

Usage: stack [--help] [--version] [--numeric-version] [--hpack-numeric-version]
             [--docker*] [--nix*] ([--verbosity VERBOSITY] | [-v|--verbose] |
             [--silent]) [--[no-]time-in-log] [--stack-root STACK-ROOT]
             [--work-dir WORK-DIR] [--[no-]system-ghc] [--[no-]install-ghc]
             [--arch ARCH] [--ghc-variant VARIANT] [--ghc-build BUILD]
             [-j|--jobs JOBS] [--extra-include-dirs DIR] [--extra-lib-dirs DIR]
             [--with-gcc PATH-TO-GCC] [--with-hpack HPACK]
             [--[no-]skip-ghc-check] [--[no-]skip-msys] [--local-bin-path DIR]
             [--[no-]modify-code-page] [--[no-]allow-different-user]
             [--[no-]dump-logs] [--color|--colour WHEN] [--resolver RESOLVER]
             [--compiler COMPILER] [--[no-]terminal]
             [--stack-colors|--stack-colours STYLES] [--terminal-width INT]
             [--stack-yaml STACK-YAML] [--lock-file ARG] COMMAND|FILE

@srghma
Copy link
Author

srghma commented Dec 26, 2019

I made hie work, but it doesn't use haskell packages from haskell.nix, instead it is using packages from stack, haskell.nix is used only for making builds

srghma/generate-all-tests@55c3795

@michaelpj
Copy link
Collaborator

Old, HLS works pretty well these days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants