-
Notifications
You must be signed in to change notification settings - Fork 842
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
Duplicate builds with --test #952
Comments
I'm fairly certain this is a manifestation of #838. |
I'm not sure if it's the same as #838 because the duplicates occur even with a clean slate. They seem to be part of |
@meteficha Maybe I misread your initial report. If the problem is that package "foo" is first built, and then again built for testing, that's everything working as intended. We do it that way to address the cyclical dependency case. There are a number of tricks employed by stack to make the amount of recompilation minimal (though see #834 for more information on future improvements). |
I think that you understood correctly the issue now. But the thing is, this happens only with So the questions in my head are:
I'd like to stress something that perhaps may give you a clue: most packages below are leaves, meaning that no other package depends on them. For example, no one depends on the I don't know enough about the inner workings of the Cabal library to understand how #834 could solve this issue :). Using
Using
|
Yes, there was a change: we build all executables and libraries even if a package is a leaf for testing. There are multiple reasons this was desirable, simplest of which is: sometimes test suites need to use the generated executables. I think the behavior here is correct. Are you reporting that there's been a significant performance impact in aggregate? The progress numbers aren't enough to tell me that there's really a problem. |
It does cause an issue, especially when developing (not so much on CI). For example, if I change something on the test suite, now I have to wait for the whole package to be built twice from scratch, plus the whole test suite, while in theory only a couple of modules from the test suite really need to be rebuilt. |
That shouldn't be happening, and hasn't been my experience. Do you have a minimal example of that happening? Also, can you check if this is happening with master? |
I'll rebuild my |
On a simple test Regarding the reason why things get built twice, is there a longer-term issue I can subscribe to for working so that these rebuilds aren't necessary anymore? In my own experience I've never needed to use an executable from a test suite, so I'll project this onto others and say that many people feel the same way and are wasting their times waiting for needless recompilations :). If I didn't use Cabal's test-suite and instead had a new |
I think there are three potentially different problems here:
The components issue I linked to is about getting more control with Cabal to solve (2), and say "I don't want you to build the library, really, trust me, just build these components I'm telling you about now." |
Using
|
Yup, you're hitting: haskell/cabal#2780 On Mon, Sep 21, 2015 at 8:11 PM, Felipe Lessa [email protected]
|
Thanks, subscribed. I'll re-open this issue if some new related strangeness happens. |
PS: Here's a formal reference so GitHub links these issues together: haskell/cabal#2780 . |
Steps to reproduce:
.stack-work
infra and afterstack clean && find . -name .stack-work -exec rm -Rf {} \;
.stack build --test --pedantic --no-run-tests
Expected:
One build per package. Every build configured for testing.
Actual:
Packages get built twice: once normally, once for testing.
Here's the verbose output for a build that does nothing then a build after a trivial change to one of the packages:
You can find /tmp/t[12] here: https://gist.github.com/meteficha/7fba50a7a002daba2db0.
I don't know if this is relevant, but we're using a custom snapshot instead of Stackage.
The text was updated successfully, but these errors were encountered: