While constructing the build plan, Stack encountered the following errors:
In the dependencies for hello-0.1.0.0:
large-anon needed, but the Stack configuration has no specified version (latest matching version is 0.3.0)
needed since hello is a build target.
Now, I guess it found something related to large-anon out on the internet, because it found a version number of 0.3.0, which appears to be the current version as per large-anon: Scalable anonymous records.
I’m not clear on what the error wants me to do: do I need to specify a particular version? If so, where do I do that? If not, what does the error mean?
large-anon isn’t going to be in a stack snapshot so you need to specify the specific version - which it is then not going to find, but will give you a line to add to your extra-deps section in your stack.yaml file.
EDIT:
Here are the steps I took:
Added large-anon to package.yaml
Pinned it to 0.3.0 with - large-anon-0.3.0 in the extra-deps section of stack.yaml
Stack complained about a number of other missing dependencies (again because they are not in the stack snapshot), so in stack.yaml I added the following:
... the Stack configuration ... is a bit terse in that error message. It means ... the set of package versions that Stack is configured to use .... I’ll look into whether that message could be improved, without becoming too wordy.
The tutorial-style part of Stack’s online documentation here aims to walk through this distinction between (a) dependency packages specified in a package’s Cabal file and (b) the snapshot (the curated set of package versions, extended/amended by extra-deps or trimmed with drop-packages) specified in Stack’s project-level configuration file (stack.yaml).
How about an alternative message like the following?
In the dependencies for hello-0.1.0.0:
large-anon needed, but no version is in the specified snapshot
or extra-deps (latest matching version is 0.3.0)
needed since hello is a build target.
‘Snapshot’ and ‘extra-deps’ are explained in Stack’s online glossary.
The master branch version of Stack (if you are not using GHCup to manage Stack: stack upgrade --source-only --git) now has a more descriptive approach to this message. Rather than repeating the description in each item, I’ve added it to the introduction, when it is relevant.