Stack: almost all stack actions result in SQLite error ...

Created on 19 Jan 2019  Â·  3Comments  Â·  Source: commercialhaskell/stack

stack build, stack ghci, stack upgrade ... all fail ... it's a reasonably unfortunate situation.

i'm running the latest from master:

07:02 PM noon ∈ ~ ♫ stack --version
Version 1.10.0, Git revision ac20e0da239d2e3f6a7cb4bb67ea33b2a7c95849 x86_64 hpack-0.31.1

most unfortunately, it also affects stack upgrade:

07:02 PM noon ∈ ~ ♫ stack upgrade  
SQLite3 returned ErrorConstraint while attempting to perform step: FOREIGN KEY constraint failed

and when running again:

07:02 PM noon ∈ ~ ♫ stack upgrade
SQLite3 returned ErrorBusy while attempting to perform step: database is locked

( as an aside, i feel like the master branch is much more unstable in the last 6 months or so; i used to upgrade all the time; now, whenever i do i hit some weird bug. maybe the "stack upgrade --git" option could hit a more stable branch, if master isn't stable anymore? )

pantry question

Most helpful comment

We already have a flag that lets you specify which branch to clone.

All 3 comments

This is an unfortunate side effect of https://github.com/commercialhaskell/stack/pull/4439 - Pantry DB changes from it can't get easily migrated, the current "hard" workaround is to delete Pantry database in ~/.stack. We planned to work on some way to ensure better migration experience (at least advising to delete DB would be better than what we have right now).
As for the stability - you're quite correct and master is not quite stable as stable branch - it contains code for the new upcoming Stack release bringing substantial changes into the way Stack works. E.g. it's expected that soon we'll have #4288 implemented and merged.
@borsboom @snoyberg could it make sense to have something like stack upgrade --git --stable maybe?

We already have a flag that lets you specify which branch to clone.

We already have a flag that lets you specify which branch to clone.

I didn't know this; it is --git-branch. So stack upgrade --git --git-branch stable.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

symbiont-joseph-kachmar picture symbiont-joseph-kachmar  Â·  3Comments

Toxaris picture Toxaris  Â·  4Comments

Cosmius picture Cosmius  Â·  3Comments

srghma picture srghma  Â·  3Comments

rrnewton picture rrnewton  Â·  4Comments