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
...and a self-executing script that references that package, called script.hs:
#!/usr/bin/env stack
-- stack runhaskell --package cloud-seedermain::IO()
main =putStrLn"yo"
Expected
With the - optparse-applicative-0.14.0.0 line in place, running gives the expected result:
$ ./script
yo
$ stack runhaskell --package cloud-seeder ./script.hs
yo
Actual
However, if we remove - optparse-applicative-0.14.0.0, only the direct call to runhaskell returns useful error information:
$ ./script
Plan construction failed.
$ stack runhaskell --package cloud-seeder ./script.hs
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for cloud-seeder-0.1.0.0:
optparse-applicative-0.13.2.0 from stack configuration does not match >=0.14.0.0 (latest matching version is 0.14.2.0)
needed since cloud-seeder is a build target.
Some potential ways to resolve this:
* Recommended action: try adding the following to your extra-deps in /Users/marnold/Code/lambda/runhaskell-test/stack.yaml:
- optparse-applicative-0.14.2.0
* Set 'allow-newer: true' to ignore all version constraints and build anyway.
* You may also want to try using the 'stack solver' command.
Plan construction failed.
General summary/comments
Self-executing scripts don't pipe plan construction errors from
runhaskell
to terminal.Steps to reproduce
Given a
stack.yaml
that uses a package that relies on another package fromextra-deps
:...and a self-executing script that references that package, called
script.hs
:Expected
With the
- optparse-applicative-0.14.0.0
line in place, running gives the expected result:Actual
However, if we remove
- optparse-applicative-0.14.0.0
, only the direct call torunhaskell
returns useful error information:Stack version
Method of installation
The text was updated successfully, but these errors were encountered: