stack-hpc-coveralls icon indicating copy to clipboard operation
stack-hpc-coveralls copied to clipboard

Command fails with multiple packages

Open creichert opened this issue 8 years ago • 3 comments

Simply having this in my stack.yaml fails the command:

packages:
  - '.'
  - location:
      git: [email protected]:creichert/reserve.git
      commit: 1264826d78a22a640d41daaecbfdd4763c86915a
    extra-dep: true
$ stack exec -- shc --repo-token=$COVERALLS_REPO_TOKEN combined all
ghc-pkg: cannot find package reserve
shc: readCreateProcess: stack "exec" "--" "ghc-pkg" "field" "reserve" "key" "--simple-output" (exit 1): failed

I'm not specifically interested in generating the coverage metrics for "extra-dep" packages. I've tried several things and only disabling the location block entirely works.

Any possible workarounds?

creichert avatar Aug 31 '16 15:08 creichert

I can reproduce the issue adding another repository via the location field in the stack.yaml file. The problem is that the additional packages are downloaded in .stack-work/downloaded; however, they are not registered like normal packages. So it's not actually possible (to the extent of my knowledge) to retrieve a package key, because it does not exist.

Therefore, replacing the key with the package id effectively makes it work, and the package will not be included in the coverage, which is what you asked for.

rubik avatar Sep 01 '16 07:09 rubik

Do you have the possibility to check out from master and try? I made a local test and it worked.

rubik avatar Sep 01 '16 07:09 rubik

@rubik definitely, i'll try it in my CI setup today. thanks!

creichert avatar Sep 02 '16 18:09 creichert