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

mark executable-only packages as installed when copied from cache #1043

Merged
merged 1 commit into from Sep 27, 2015

Conversation

Projects
None yet
2 participants
@ljli
Contributor

ljli commented Sep 24, 2015

Executable only packages don't get an entry in the pkgdb. Instead stack marks them via a dummy file in installed-packages. If a package is copied from another snapshot it gets registered if it has library, but when it has not the binaries are copied but the snapshot, which they are copied to doesn't get to know this. That means every time you do stack build they get copied again. That alone isn't a big problem, but they can trigger rebuilds of other packages, which can get out of hand. A solution would be to mark them as installed. Writing this in copyPreCompiled does the trick:

case (mlib, exes) of
    (Nothing, _:_) -> markExeInstalled (taskLocation task) taskProvides
    _ -> return ()

But I wasn't sure about the full implications of this. So I opted for simply not caching them instead. The downside is that people who already cached executable-only packages need to nuke them manually from the cache.

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Sep 25, 2015

Actually, your other approach of calling markExeInstalled looks much better to me. Would you be able to update this PR to use that instead?

@ljli ljli force-pushed the ljli:master branch from 68248ca to 2f3b8bc Sep 25, 2015

@ljli

This comment has been minimized.

Contributor

ljli commented Sep 25, 2015

Done, thanks for the feedback!

@ljli ljli changed the title from dont cache executable only packages to mark executable-only packages as installed when copied from cache Sep 25, 2015

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Sep 27, 2015

Thanks!

@snoyberg snoyberg merged commit 2f3b8bc into commercialhaskell:master Sep 27, 2015

2 checks passed

continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

snoyberg added a commit that referenced this pull request Sep 27, 2015

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