-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cabal Build Error: Module ‘Distribution.Package’ does not export ‘PackageName(PackageName)’ #4137
Comments
Well, that error looks like distributive's custom setup is being linked against Cabal HEAD, which made an API-breaking change to the signature of |
I currently have a stop gap, which is pretty simple:
|
@ezyang ,
|
That definitely doesn't seem like the right way to go to workaround. A more robust workaround would be to vendor Maybe another way to solve the problem is to only build But it's worth figuring out why the wrong version of Cabal is being selected. |
Hey @ezyang , could u plz check ur IRC client ? I sent u soe msgs ? |
Update: the above workaround I suggested doesn't work! neither does the ones suggested by @ezyang (at least, not for me. but maybe, I misunderstood him and made mistakes while applying his suggestions.) What worked for me in the end, was to just checkout The reason for the failure might be the fact that there's some kind of global state being kept based on the folder path. |
Hmm, did you have a |
No, I didn't. |
Anyway, the issue is being resurfaced anytime I make a change to |
The issue here seems to be that |
What's a bit weird here is that |
Would be really good to avoid breaking changes to APIs that are likely to be imported in Setup.hs . Can the re-export of PackageName be re-added, or is the type wholly gone on Cabal 2.0? It'd be nice to at least get older versions of these @ekmett packages building. Perhaps the signatures of the Cabal API should be monitored to avoid such breaking changes? Alternatively, have a test-suite that builds lots of hackage packages that have custom Setup? |
@mgsloan |
I see, thanks for the info! Maybe stack should have similar logic. Should it be fairly reliable to mix and match Cabal library versions in the same package DB / build plans? I suppose since package DBs are quite mutable for cabal-install and used between versions, it probably should indeed be safe to mix and match Cabal versions within a single build plan. |
Fwiw, https://matrix.hackage.haskell.org/package/semigroupoids looks perfectly fine. |
@hvr That's very curious. Is the matrix using Cabal-1.24 or Cabal-2.0? When looking at the matrix, how can you tell the build plan that was successful? |
Is there any movement on this? |
@IvanMalison Can you reproduce this issue? |
I couldn't reproduce the issue. I checked out cabal from around the date of this issue (8744e30) and tried to build that version of cabal using itself, with GHC 8.0.1 and the command I did notice that #3939 lowered the bound on Cabal from 2.0 to 1.25, so maybe this issue occurred with cabal-install built before #3939 used to build the project after #3896. |
Closing, since this issue probably only affected an unreleased version of cabal. |
Creating package registration file:
I keep getting this error when trying to build cabal with
cabal new-build cabal-install
:The text was updated successfully, but these errors were encountered: