-
Notifications
You must be signed in to change notification settings - Fork 847
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
stack setup on appveyor fails #1418
Comments
I see this in the log:
I wonder if something might have gone funny in that build cache. Stack seems to think it already has a package index and just needs to update it, but Could add a check to Stack to ensure the package index is a valid repo before trying to update it (if it's not, just blow it away and start over like it wasn't there), I suppose. |
Good thinking, I turned off the cache, and it seems a lot happier. Seems like Stack wiping invalid repos would be very useful. |
A pull request would be most welcome! |
For info, I've now seen this on a different project on Appveyor, so not a one-off, but still not common. |
Note Appveyor docs says that cache size after compression must be no bigger than 100 Mb. What I see is that on my machine the hackage index alone is > 300 Mb. |
@quyse - my guess is that is a wild guideline, and that they don't enforce it, partly because they don't give any hint how big a projects cache is or let you see what it contains. Looking at the cache sizes for the compiled stuff on my machine I see things in the range 40Mb-160Mb, where the 160Mb compresses down to 20Mb. I'm not sure if I cache anything else or not - it's really pretty hard to figure out in Appveyor. |
@ndmitchell Well, you had setting I just came up with a script using additional git repository on Gitlab (because they don't have 1Gb per repo/100 Mb per file limits as Github has) in order to cache stack's stuff manually. Script gist: https://gist.github.com/quyse/7178ec5737235bdf60bf, build on appveyor using it: https://ci.appveyor.com/project/quyse/flaw/build/1.0.15. I think thanks to this script I won additional ~20 minutes so build doesn't timeout. It seems like a bit of abuse of Gitlab though (which delivers ~500 Mb for each build), so not really elegant solution. Appveyor really needs bigger cache limits. |
My builds take near the 8 min mark, see https://ci.appveyor.com/project/ndmitchell/hlint. I guess I only have Stackage dependencies. I also run stack setup each time and don't cache that bit - caching that adds 20 mins or so. |
I'm now seeing this almost every other build for one of my projects, which I does not seem special in any way. There may be some restoring of old states going on that recorrupts things. |
PR now in #1580. In the absence of other evidence, I'm going to assume someone at Stack HQ sabotaged my Appveyor instance to make it recur enough to be worth fixing 😛 |
I think it's reasonable to assume #1580 fixed it, and I'll reopen if that turns out to not be the case. |
In the last week I've suddenly got this on 5 different Appveyor repos. They are all using:
Seems like a regression in the latest release? |
Output is:
The related code is https://github.com/commercialhaskell/stack/blob/master/src/Stack/PackageIndex.hs#L260. I think the immediate cause is that the caller has switched from using I note that at #1580 (comment) I said:
This bug seems to be a symptom of that, with seemingly harmless refactorings changing subtle things like which exceptions are raised. |
@ndmitchell Sounds about right. Does e52b2c5 fix it? Feel free to re-open if not |
Thanks @mgsloan! It seems to have stopped recurring in the last couple of days, most appreciated. |
See https://ci.appveyor.com/project/ndmitchell/hlint/build/1.0.44, which just gets
stack.exe
and runsstack setup --verbose
. It fails at the end with:Is it possible on a never-used-before machine
stack setup
fails?The text was updated successfully, but these errors were encountered: