Open valpackett opened 9 years ago
If I understand well, https://github.com/myfreeweb/sweetroll is an example project using stack?
Can you please tell me where are the *.tix
and *.mix
files located in your project once you've run the tests with coverage enabled?
It doesn't use hpc, but https://github.com/myfreeweb/http-link-header does.
After running tests, tests.tix
is created right in the project directory. The .hpc
folder with the *.mix
stuff is right there too.
Is there any progress on stack
support? Do you need help?
I'm interested as well, what needs to be done exactly to support Stack?
I wrote stack-hpc-coveralls, which is based on hpc-coveralls code. It's just an experiment, but at least it's working for my repositories.
The changes are pretty heavy and it's really meant to work with Stack out of the box, with little to no configuration. Therefore I did not submit a PR. I may in the future if the author is interested.
@rubik You're welcome to help adding support for stack to hpc-coveralls!
It would be nice if we can keep the functionality backward compatible with cabal and be able to auto-detect whether the project is using cabal or stack (or a new flag could be introduced to specify to use stack, and if not specified it would switch back to cabal).
@guillaume-nargeot the files get generated under .stack-work
:
$PROJECT_ROOT/.stack-work/install/x86_64-osx/lts-3.9/7.10.2/hpc/skylark-core/test/test.tix
Which is discoverable from the stack tool:
$ stack path --local-hpc-root
$PROJECT_ROOT/.stack-work/install/x86_64-osx/lts-3.9/7.10.2/hpc
And in the stack library: hpcDirFromDir.
@guillaume-nargeot Detecting if a project is using Stack or Cabal should be a matter of just looking for the existence of the stack.yaml
file in the main directory of the project.
If the file is there, then it should be assumed that the project is using Stack. Or if it is not there, then the project should be assumed to be using Cabal.
stack is the new build tool that's better than cabal-install. It uses a different directory layout, so hpc-coveralls currently fails: