. When using a nightly based on GHC 8.4, any stack build of any project or package errors immediately with
The following packages specified by flags or options are not found: persistent-sqlite
even for the most trivial stack.yaml and cabal files, with no connection whatsoever with persistent-sqlite in any transitive dependency. I have never even used that package for anything, although it has come up in the past as a transitive dependency. I deleted local .stack-work. I searched ~/.stack for anything related to persistent-sqlite - there are some things for 8.2.2, but nothing for 8.4.
Using Ubuntu 16.04 on WSL. Tried with the standard Ubuntu stack 1.6.1 binary, and also my own stack build on WSL (using stack with lts-11.0). Same issue.
I am using the GHC 8.4.1 build for WSL from the PPA, since stack auto-download doesn't provide GHC builds for WSL yet (AFAIK). GHC 8.4.1 works fine using cabal.
Correct. This is a bug in stack, which has been fixed on github, but not yet released: https://github.com/commercialhaskell/stack/pull/3916
The problem is that persistent-sqlite was used by stack itself, but is not present in the recent nightlies (waiting on transitive dep blaze-builder to be updated).
A workaround for those who wish to use these nightlies is to upgrade stack from source
stack upgrade --git --git-branch stable
Let's leave this issue open for a while and point people to it when they encounter this error.
I have verified that we will be able to get persistent-sqlite into the build plan just as soon as the following PRs (or equivalent changes) are merged and released:
The way I verified this was like so:
stack upgrade --git --git-branch stable
stack unpack persistent-sqlite-2.8.1.2 && cd persistent-sqlite-2.8.1.2
edit stack.yaml # add the following stack.yaml
stack test
resolver: nightly-2018-03-14
extra-deps:
- monad-logger-0.3.28.2
- persistent-2.8.1
- resource-pool-0.2.3.2
- blaze-html-0.9.0.1
- blaze-markup-0.8.2.0
- conduit-extra-1.3.0
- fast-logger-2.4.11
- path-pieces-0.2.1
- auto-update-0.1.4
- easy-file-0.2.1
- streaming-commons-0.2.0.0
- unix-time-0.3.8
- uri-bytestring-0.3.1.1
- persistent-template-2.5.4
# - blaze-builder-0.4.0.2
- git: [email protected]:sjakobi/blaze-builder
commit: 909cd51964ac425c1d12359dfe6950a2f673283d
# - haskell-src-meta-0.8.0.2
- git: [email protected]:varosi/haskell-src-meta
commit: 5b6deee14f7834495a0a7c66537e6dc9b959dd76
# - http-api-data-0.3.8
- git: [email protected]:phadej/http-api-data
commit: 740d50235de1d3320128ac1b53fed04a6649356a
The result was
Finished in 0.0144 seconds
4 examples, 0 failures
persistent-sqlite-2.8.1.2: Test suite test passed
2 of 3 PRs merged and uploaded! I've asked the Hackage trustees to revise the third. https://github.com/haskell-infra/hackage-trustees/issues/143
On Windows 10 x64 after: stack upgrade --git --git-branch stable
I got:
CreateDirectory ".stack-work\dist\ca59d0ab\build\.stack-work\dist\ca59d0ab\build\Hackage\Security": does not exist (The filename or extension is too long.)
I tried twice and the error is the same. It's strange that there is .stack-work twice here.
The revision has been made, and everything is lined up for persistent-sqlite to be included in the next nightly. Therefore, we anticipate that users will no longer experience this issue with nightly-2018-03-16 (which will be published in a few hours) and onwards.
nightly-2018-03-16 has been published, which works around this issue by including persistent-sqlite in the snapshot. Using this nightly or later, users should no longer be hitting this problem.
Most helpful comment
[edit] Solution: use nightly-2018-03-16 or later
Correct. This is a bug in stack, which has been fixed on github, but not yet released: https://github.com/commercialhaskell/stack/pull/3916
The problem is that
persistent-sqlitewas used by stack itself, but is not present in the recent nightlies (waiting on transitive depblaze-builderto be updated).A workaround for those who wish to use these nightlies is to upgrade stack from source
stack upgrade --git --git-branch stableLet's leave this issue open for a while and point people to it when they encounter this error.