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

Stack support #47

Open
valpackett opened this issue Jul 30, 2015 · 8 comments · May be fixed by #69
Open

Stack support #47

valpackett opened this issue Jul 30, 2015 · 8 comments · May be fixed by #69

Comments

@valpackett
Copy link

stack is the new build tool that's better than cabal-install.
It uses a different directory layout, so hpc-coveralls currently fails:

Couldn't find the hpc data directory
Couldn't find the directory dist/
Dumping dist/ directory content:
hpc-coveralls: dist/: getDirectoryContents: does not exist (No such file or directory)
@killy971
Copy link
Owner

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?

@valpackett
Copy link
Author

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.

@mrkkrp
Copy link

mrkkrp commented Nov 2, 2015

Is there any progress on stack support? Do you need help?

@rubik
Copy link

rubik commented Nov 4, 2015

I'm interested as well, what needs to be done exactly to support Stack?

@rubik
Copy link

rubik commented Nov 13, 2015

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.

@killy971
Copy link
Owner

@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).

@mfine
Copy link

mfine commented Jan 15, 2016

@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.

@ExcaliburZero
Copy link

@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.

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

Successfully merging a pull request may close this issue.

6 participants