-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
travis: Automatically invalidate caches if new package versions exist #129
Comments
Now that we decided to keep testing with cabal - to support ghc-7.6.3 - and everything else is solved, we need to address this problem. I think that - because we cache the state of globally installed cabal packages - this will, by design, affect subsequent builds. Of course, we can try to identify when we need to invalidate the cache, but that will increase complexity and build times when triggered. How do you think we should tackle this issue? |
Also a thing to note is that the symptom of the problem may change a little bit. Now that This is actually the opposite situation as the one I found myself in a while ago. In that situation, we were broken unless we clear the cache. In our current situation, we may find that we are broken only if we clear the cache. Nevertheless, both situations are undesirable. But can I stop to ask: What is the chance that we will break? In the current situation, if we clear the cache and You see that now I need some help thinking about this since the nature of the issue has changed since the time when I filed it. |
It believe it will not break on newer versions, but it will break on new dependencies. This is really undesirable, because we are joint-testing the repository and the history's cache. Failing will not tell us if there is really something wrong with the repository of if we just met an unfortunate install order. From what I understand, this problem is intrinsic to installing packages globally. |
Maybe we could try to avoid this problem allowing cabal to reinstall packages, but I don't know if it would work. With this issue, we are trying to solve problems already addressed by a newer version of cabal sandboxes and stack, which was designed specifically to allow reproducible builds. If we really want to keep testing with global packages, maybe we should forget about caching it. It feels like we're trying really hard to use a tool in something for which it was not designed. Edit: Or, we can just leave it the way it is. We can clear the cache manually when it breaks. |
I see, you are right. If we add a new dependency we could run into problems. This issue has changed a lot from when I originally filed it. When I filed it I had a clear solution plan in mind (https://github.com/hvr/multi-ghc-travis/blob/master/make_travis_yml.hs), but now that we changed how we Then, I currently don't understand the problem well enough to be able to take any action on this issue. If, for example, we can find a potential dependency that we might add that would break our build given our cache, then we'd be able to discuss what to do. With clear reproduction steps, only then can we test whether a solution has solved the problem. I may spend some time trying to find such a dependency, but if I cannot find, I can't really consider this issue actionable, so I may be tempted to close it. Or at least unsubcribe. |
Where might I start looking to look for potential candidates that could break though? Clearly I can't pick packages at random, but must be something principled |
I guess you met this problem when you tried to install packages individually with
This issue is related to a design choice we made. I don't think we can do anything about it without making major changes, so I would mark it as If we decide in the future to drop support for ghc-7.6.3, we will not need We already have an overly-complex Travis, and it's probably less work to manually solve those problems than trying to write and debug an even more complex solution. Of course, that will be annoying for contributors that will have failing tests without understanding why. |
Hmm, now that We are agreed that we'll close for now. If we run into problems in the future the experience gained can be described there and we'll be better able to come up with a solution when we have a clear problem |
While working on #101 I discovered that because we cache .cabal, we'll get conflicts (and thus build failures) if there's a new version of a cabal package we use.
That's less than ideal (and we had to manually clear the cache to fix the build), but I believe there's a way out. Should examine the work done in https://github.com/hvr/multi-ghc-travis/blob/master/make_travis_yml.hs - it seems to check the install plan and compares it to the last known one. If there's a change, it clears the packages and asks cabal to reinstall. I think this will work, though it may need some testing... and depending on how often our used packages release new versions opportunities to test may be rare.
The text was updated successfully, but these errors were encountered: