Skip to content

"Cannot satisfy" errors when copying precompiled packages with custom snapshots #1103

Closed
@hesselink

Description

@hesselink

We have custom snapshots that we treat as immutable and rename when upgrading. Stack sees that packages are the same and copies precompiled versions. However, this seems to lead to errors like this:

> stack build --test --bench
...
aeson-0.9.0.1: copying precompiled package
...
    <command line>: cannot satisfy -package-id aeson-0.9.0.1-b5b185082465176d844de3bc8c6b4b08:
        aeson-0.9.0.1-b5b185082465176d844de3bc8c6b4b08 is unusable due to missing or recursive dependencies:
          vector-0.10.12.3-4a6464d91c95dd62d2822a0831fdfc6b

This makes sense, because the hash for vector in this sandbox is different:

> stack exec -- ghc-pkg describe vector

name: vector
version: 0.10.12.3
id: vector-0.10.12.3-3f8182e905e7fa382a931cb4031c9dd2

It turns out the hash is from the previous snapshot:

<switch back to old code>
> stack exec ghc-pkg describe vector

name: vector
version: 0.10.12.3
id: vector-0.10.12.3-4a6464d91c95dd62d2822a0831fdfc6b

This is after I completely wiped by ~/.stack and all .stack-work directories in the project. I can reproduce by unregistering all the packages stack exec -- ghc-pkg check reports as broken, and trying again: it copies the package again, and gives the same error.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions