Open StevePoling opened 6 years ago
I also had this error. Once allowing newer versions I was met with the following error:
/tmp/stack28325/stack-run-0.1.1.4/src/Main.hs:18:1: error:
Could not find module ‘Distribution.PackageDescription.Parse’
Perhaps you meant
Distribution.PackageDescription.Parsec (from Cabal-2.2.0.1)
Distribution.PackageDescription.Check (from Cabal-2.2.0.1)
Distribution.PackageDescription.Quirks (from Cabal-2.2.0.1)
Use -v to see a list of the files searched for.
|
18 | import Distribution.PackageDescription.Parse
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Edit: I'm running Linux Ubuntu
Same problem on windows 10x64. Would be nice if this is fixed, it's been around for a while.
Getting the exact same issue on a fresh install of Ubuntu 18.04.1!
I have the same problem when running stack install stack-run
on Win10. After adding tons of extra-deps
I was eventually left with the same error:
Could not find module ‘Distribution.PackageDescription.Parse’
Same here on Ubuntu
I have the same problem when running
stack install stack-run
on Win10. After adding tons ofextra-deps
I was eventually left with the same error:Could not find module ‘Distribution.PackageDescription.Parse’
Getting this same issue, also on Win10
extra-deps:
- conduit-1.2.13.1
- conduit-extra-1.1.17
- resourcet-1.1.11
- streaming-commons-0.1.19
Has anyone found a workaround for this issue?
Missing deps are easy to fix. But Could not find module ‘Distribution.PackageDescription.Parse’ is killing me.
I found a workaround.
Create a file: ~/.stack/global-project/stack-cabal-1.24.yaml
flags: {}
extra-package-dbs: []
packages: []
extra-deps: []
resolver: lts-8.24
Basically it's using an old stack lts that was from around the time the last update to stack-run
was made.
Then just run this:
stack --stack-yaml ~/.stack/global-project/stack-cabal-1.24.yaml install stack-run
and it should work (did for me, at least)
Can confirm that this works for me on Ubuntu 18.04.1!
This seems to install GHC 8.0.2 although 8.4.3 is already present. Which version will the installed stack-run
use?
Afaik the problem is that the stack-run
version doesn't work with the newest GHC version, so this forces the version used for installation. The runtime-semantics of stack-run
should be indentical - specially because the functionality is fairly simple.
This is still an issue. With a fresh install of stack on a mac.
Please check if pull request #22 fixes your problem.
Still an issue with latest haskell platform. @Magicloud , if you can help with instructions on how to use that pull request when running those commands, happy to check.
@ashvds Hi, you can pull it from the source and build. https://github.com/Magicloud/stack-run
@Magicloud , my understanding from further googling is that stack-run has been deprecated, in favour of the stack command run
i.e. "stack run" which is supposed to do the same.
Do you concur?
@ashvds Yes, there is a new run command.
@Magicloud @StevePoling , then wouldn't the solution to this issue just be to close it and use the run
command?
@ashvds I guess so. Just did not pay attention on this.
@XertroV You save my evening I was in verge to give up :D
@Akanoa , don't waste time trying to make stack-run work when stack run does the same and works out of the box.
@ashvds Oh :O I didn't read the bottom of the thread ^^' I manage to run my first main.hs yesterday so I'm happy. But how can I undo the previous installation with stack install intero QuickCheck stack-run
? The uninstall parameter seems to do nothing and the ghc-pkg command doesn't exist ( cf: https://stackoverflow.com/a/38639959 )
@Akanoa , I would remove the dependencies on old libs that you set in the below, and run stack update
, and then stack install intero QuickCheck
It should rebuild everything with the latest dependencies and resolver.
I found a workaround.
Create a file:
~/.stack/global-project/stack-cabal-1.24.yaml
flags: {} extra-package-dbs: [] packages: [] extra-deps: [] resolver: lts-8.24
Basically it's using an old stack lts that was from around the time the last update to
stack-run
was made.Then just run this:
stack --stack-yaml ~/.stack/global-project/stack-cabal-1.24.yaml install stack-run
and it should work (did for me, at least)
You no longer need to install stack-run. Haskelly no longer actually depends on it, but instead uses the built in stack run
, as evidenced here:
https://github.com/haskelly-dev/Haskelly/blob/597a8e9408701791e05c00819db0f4d0e9cc8caa/src/Basic/commands.ts#L59
@detuur , It is a simply a doco problem, there is a pull request to fix it.
Hi, I performed these steps on both my MacBook and Windows 10 laptops:
stack build stack build intero stack install QuickCheck stack install stack-run
The last step fails on both machines with the same message.
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for stack-run-0.1.1.4: conduit-1.3.0.3 from stack configuration does not match >1.1 && <1.3 (latest matching version is 1.2.13.1) conduit-extra-1.3.0 from stack configuration does not match >=1.1 && <1.2 (latest matching version is 1.1.17) needed since stack-run is a build target.
Some different approaches to resolving this:
Set 'allow-newer: true' to ignore all version constraints and build anyway.
Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint errors, but results may be unpredictable.
Recommended action: try adding the following to your extra-deps in C:\Users\Steve\source\Workspaces\Haskell\MyFirstHaskellProject\stack.yaml:
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for stack-run-0.1.1.4: conduit-1.3.0.3 from stack configuration does not match >1.1 && <1.3 (latest matching version is 1.2.13.1) conduit-extra-1.3.0 from stack configuration does not match >=1.1 && <1.2 (latest matching version is 1.1.17) needed since stack-run is a build target.
Some different approaches to resolving this:
Set 'allow-newer: true' to ignore all version constraints and build anyway.
Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint errors, but results may be unpredictable.
Recommended action: try adding the following to your extra-deps in C:\Users\Steve\source\Workspaces\Haskell\MyFirstHaskellProject\stack.yaml:
Plan construction failed.
So, I edited the stack.yaml as directed and the build of stack-run-0.1.1.4 fails though it fails slightly differently in OSX vs Win10. Suggestions? Can I provide more detailed info?