Conversation
Using Stack 2.9.1 to build a package with a dependency on `Cabal` and `process` and: ~~~yaml resolver: lts-19.25 # GHC 9.0.2 (comes with Cabal-3.4.1.0) extra-deps: - Cabal-3.8.1.0 - Cabal-syntax-3.8.1.0 - process-1.6.15.0 ~~~ yields error: ~~~ process > configure process > [1 of 2] Compiling Main ( C:\Users\mikep\AppData\Local\Temp\stack-d0efe7ccadb373e9\process-1.6.15.0\Setup.hs, C:\Users\mikep\AppData\Local\Temp\stack-d0efe7ccadb373e9\process-1.6.15.0\.stack-work\dist\d53b6a14\setup\Main.o ) process > [2 of 2] Compiling StackSetupShim ( C:\sr\setup-exe-src\setup-shim-Z6RU0evB.hs, C:\Users\mikep\AppData\Local\Temp\stack-d0efe7ccadb373e9\process-1.6.15.0\.stack-work\dist\d53b6a14\setup\StackSetupShim.o ) process > process > C:\sr\setup-exe-src\setup-shim-Z6RU0evB.hs:3:1: error: process > Ambiguous module name ‘Distribution.PackageDescription’: process > it was found in multiple packages: process > Cabal-3.4.1.0 Cabal-syntax-3.8.1.0 process > | process > 3 | import Distribution.PackageDescription (PackageDescription, emptyHookedBuildInfo) process > | ~~~ This is because `StackSetupShim` is compiled with (a) the version of `Cabal` that comes with GHC 9.0.2 and (b) the package database that includes `Cabal-syntax-3.8.1.0`, and both export modules named `Distribution.PackageDescription`. This pull request fixes that problem by specifying that the import of `Distribution.PackageDescription` is to come from the `Cabal` package.
|
For the record, another way to work around it is described here: https://hackage.haskell.org/package/Cabal-syntax-3.6.0.0 |
Member
Author
|
Hello @ulysses4ever. Did you have in mind the Cabal flag |
|
Hey there! Indeed, I didn't account for the way Stack works at all. Btw, very clever solution with the package imports! Apologies for the noise and all the best. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using Stack 2.9.1 to build a package with a dependency on
Cabalandprocessand:yields error:
This is because
StackSetupShimis compiled with (a) the version ofCabalthat comes with GHC 9.0.2 and (b) the package database that includesCabal-syntax-3.8.1.0, and both export modules namedDistribution.PackageDescription.This pull request fixes that problem by specifying that the import of
Distribution.PackageDescriptionis to come from theCabalpackage.Please also shortly describe how you tested your change. Bonus points for added tests! Tested by building and using Stack.