-
Notifications
You must be signed in to change notification settings - Fork 847
Description
I believe this is a side-effect of the changes in #3565, implemented for #3483. CC @tswelsh. To repro, I created two packages, foo
and bar
, with bar
depending on foo
. I then ran the commands:
$ stack test --no-run-tests
$ stack test --no-run-tests bar
Expected: the second command should do nothing, as all tests, libraries, and executables have already been run.
Actual: I saw the following output:
$ stack test --no-run-tests bar
bar-0.1.0.0: unregistering (missing dependencies: foo)
foo-0.1.0.0: unregistering (local file changes: app/Main.hs test/Spec.hs)
foo-0.1.0.0: build (lib + exe)
foo-0.1.0.0: copy/register
bar-0.1.0.0: configure (lib + exe + test)
Notice how foo
is unregistered, due to Stack thinking that the files changed. This occurs because the test suite and executable files are no longer included at all in the list of files in the package.
Instead, we should track, for each package, the files needed on a per-component basis, and only rebuild based on this. This may tie in with @ezyang's work on per-component builds, not sure.
@tswelsh are you interested in taking a stab at this one?