Skip to content

Fix a case of unnecessary dependency rebuilding #3035 #3039

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

Merged
merged 2 commits into from
Mar 8, 2017

Conversation

mgsloan
Copy link
Contributor

@mgsloan mgsloan commented Mar 3, 2017

See #3035

I think it makes sense to include this in the release candidate, since it's the first version with custom-setup.

@sjakobi
Copy link
Member

sjakobi commented Mar 3, 2017

The change makes sense to me but it doesn't appear to fix the original issue. Even when I delete ~/.stack/snapshots and stack clean --full I still see the behavior described in #3035.

@borsboom
Copy link
Contributor

borsboom commented Mar 3, 2017

Including in rc/v1.4.0 makes sense to me, so feel free to merge when ready.

@mgsloan
Copy link
Contributor Author

mgsloan commented Mar 4, 2017

@sjakobi Ah, good catch! Issue was that this computed info gets stored in a cache. Normally, we'd just bump the version tags.

However, when investigating this I noticed that the errors for peeking when both the version tag and format of the contents have changed are rather poor. Decode errors in the contents took priority over tag matching. I've released store-0.4.1, which handles this more gracefully, and encodes the tags at the beginning rather than the end.

There was also an encoding change with Map for this store release. If we delayed on updating store version, then this would cause further cache invalidation down the road. Best to avoid this when feasible!

@sjakobi
Copy link
Member

sjakobi commented Mar 4, 2017

OOM while building store with GHC-7.10.3: https://travis-ci.org/commercialhaskell/stack/jobs/207616671#L327

Not sure if this needs further investigation in store.

Here, we should probably switch to using the sudo-enabled Travis environment that has 7.5 GB memory instead of 4. (Yes, that environment has caching too now.)

@sjakobi
Copy link
Member

sjakobi commented Mar 4, 2017

Looks like the other build failures were caused because they weren't aware of store-0.4.1 yet.

@sjakobi
Copy link
Member

sjakobi commented Mar 4, 2017

Works on my machine though! Nice work, @mgsloan! 👍

@borsboom
Copy link
Contributor

borsboom commented Mar 5, 2017

We should make sure the CI works before merging.

@borsboom
Copy link
Contributor

borsboom commented Mar 6, 2017

@mgsloan: is the store upgrade actually necessary to fix the bug? I'm hesitant to do that for v1.4.0.

@mgsloan
Copy link
Contributor Author

mgsloan commented Mar 6, 2017

@borsboom Not strictly necessary. But if we don't do it now, then the cache for MiniBuildPlan will be invalidated for both this release and next release. It's straightforward to do it that way instead.

@mgsloan mgsloan force-pushed the 3035-fix-unnecessary-rebuild branch from 00b1a75 to 32c128a Compare March 8, 2017 01:40
@mgsloan
Copy link
Contributor Author

mgsloan commented Mar 8, 2017

I've gone with the more conservative change. Will merge once the tests pass.

@borsboom borsboom merged commit 785127c into rc/v1.4.0 Mar 8, 2017
@borsboom
Copy link
Contributor

borsboom commented Mar 8, 2017

Tests passed, so I merged it.

@borsboom borsboom deleted the 3035-fix-unnecessary-rebuild branch March 8, 2017 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants