You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using custom snapshot.yaml resolver does not appear to be working properly if git locations are specified for a newer version
of a hackage project.
(I have tested this with a checked-in cabal files as well, so this does not seem to be related to #5210 ).
run stack build (will fail suggesting to add typed-encoding-0.4.2.0 to stack.yaml even though the snapshot has git hash
with package.yaml pointing to 0.4.9.0
STACK_YAML=stack-works.yaml stack build will work just fine - this replays the same configuration directly in stack-works.yaml
reverting to stack v1.9.3 will also work.
Alternatively
Fork a project that has been uploaded to hackage.
Create a branch with newer version in package.yaml and push it to github
Use that project as your dependency. Specify this dep in some custom snapshot (resolver=mysnapshot.yaml) and specify your git commit hash in that snapshot.
Similar steps have been listed in old #3714
see DanBurton commented on Jan 5, 2018 with unordered containers.
Expected
Dependency will be picked up from the custom snapshot
Actual
Stack ignores snapshot dependency and suggest adding the wrong dependency found in hackage.
Example output
$ stack build
Cloning 9078a21d2d0ac745aa48a8d065e1dc4c0369ff45 from [email protected]:rpeszek/dag-check
Cloning e938fcb63f5f18bf1dda5e5aad0ac0be660b18d1 from [email protected]:rpeszek/typed-encoding
DEPRECATED: The package at Repo from [email protected]:rpeszek/typed-encoding, commit e938fcb63f5f18bf1dda5e5aad0ac0be660b18d1 does not include a cabal file.
Instead, it includes an hpack package.yaml file for generating a cabal file.
This usage is deprecated; please see https://github.com/commercialhaskell/stack/issues/5210.
Support for this workflow will be removed in the future.
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for test-stack-snapshot-0.1.0.0:
typed-encoding needed, but the stack configuration has no specified version (latest matching version is 0.4.2.0)
needed since test-stack-snapshot is a build target.
Some different approaches to resolving this:
* Recommended action: try adding the following to your extra-deps in /.../test-stack-snapshot/stack.yaml:
- typed-encoding-0.4.2.0@sha256:8b92de5f695ccf295990365e9f46bd2d904ec15e1c9c3e0578e4eb56b1ee27ff,5217
Plan construction failed.
General summary/comments (optional)
Using custom snapshot.yaml resolver does not appear to be working properly if git locations are specified for a newer version
of a hackage project.
(I have tested this with a checked-in cabal files as well, so this does not seem to be related to #5210 ).
This appears to be a regression
See #3714
Things work fine if specified project was never uploaded to hackage.
Steps to reproduce
I have create a test project to demonstrate this.
stack build
(will fail suggesting to add typed-encoding-0.4.2.0 to stack.yaml even though the snapshot has git hashwith package.yaml pointing to 0.4.9.0
STACK_YAML=stack-works.yaml stack build
will work just fine - this replays the same configuration directly in stack-works.yamlAlternatively
resolver=mysnapshot.yaml
) and specify your git commit hash in that snapshot.Similar steps have been listed in old #3714
see DanBurton commented on Jan 5, 2018 with unordered containers.
Expected
Dependency will be picked up from the custom snapshot
Actual
Stack ignores snapshot dependency and suggest adding the wrong dependency found in hackage.
Example output
Stack version
Method of installation
curl -sSL https://get.haskellstack.org/ | sh
(with possibly
stack upgrade
)The text was updated successfully, but these errors were encountered: