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

Turning on test coverage rebuilds all packages #1940

Open
hesselink opened this issue Mar 22, 2016 · 8 comments
Open

Turning on test coverage rebuilds all packages #1940

hesselink opened this issue Mar 22, 2016 · 8 comments

Comments

@hesselink
Copy link
Contributor

If I call stack test --coverage <some-package> in a repository with many packages, all packages (or at least dependencies of "some-package") will be reinstalled with a coverage flag passed to it. This causes a lot of rebuilding (46 packages in my case) and probably generate coverage reports for all of them. In my case, I'm only interested of the coverage of the package I'm testing. Is there a way to tell stack this? If not, would it be possible to add?

@mgsloan
Copy link
Contributor

mgsloan commented Jul 27, 2016

Good point! I've opened #2417 to track a potential general resolution to this. Marking this as blocked on that.

@chreekat
Copy link
Member

chreekat commented Jul 8, 2017

Related: 'stack test --coverage' will rebuild (and make coverage reports for) packages specified as extra-deps via package [{location: ..., extra-dep: true}]

@rlpowell
Copy link

This is quite onerous for me because one of my dependencies is an "extra-dep: true" local copy of pandoc -___- because I rely on some things in pandoc mainline. Pandoc takes a loooooong time to compile; easily 10x the length of time it takes to compile the package that I actually need to compile.

I'm not an expert at stack itself or Cabal, but if someone points me in the right direction I'd love to fix this.

@rlpowell
Copy link

What's worse is that they all rebuild every time, even though nothing has changed in the subordinate packages. So a one-line change to my code requires a complete build of my local copy of pandoc if I want a new coverage report. I'm not sure that was clear in the original issue statement.

@chreekat
Copy link
Member

chreekat commented Jul 27, 2017

@rlpowell tell me about it. :)

Have you tried the newest version of stack? It changed how "special" extra-deps are specified. I haven't tried it yet, but I am optimistic that it fixes this set of related problems.

@rlpowell
Copy link

Despite documentation changes in master, stack 1.5.0 still does the "packages: extra-dep: true" thing; I couldn't get local directories to work under "extra-deps:", which I think is the thing you're pointing at? If that's supposed to work in 1.5.0, I should file a bug. If that's not the thing you are pointing at, please explain. If you mean "have you tried master-branch latest stack?", then no.

@chreekat
Copy link
Member

chreekat commented Jul 27, 2017 via email

@rlpowell
Copy link

rlpowell commented Aug 2, 2017

Welllll, I can confirm that in current mainline, this problem is definitely "solved", with an emphasis on the scare quotes :D. See #3306

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

No branches or pull requests

4 participants