-
Notifications
You must be signed in to change notification settings - Fork 689
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
ghc-pkg: cannot create: dist/package.conf.inplace already exists #2320
Comments
@ezyang I guess this is due to switching away from single-file package DBs? |
Trying to install local packages from a specified .cabal file always fails with this error, and there appears to be no directory I can delete to make it work. |
@rcallahan can you please give steps to reproduce? |
Removing ~/.cabal worked. Before that, I could delete everything in that directory, create a new sandbox, and I would still get the ghc-pkg error. I don't know what might have been cached in ~/.cabal that would interfere in this way, and it's probably not worth trying to reproduce. |
Right now I have a package with a directory named dist/package.conf.inplace dated December 22nd created by Cabal.1.21.1.0. I now have Cabal-1.18.1.3 installed (that is, 1.21.1.0 has been removed) and if I runhaskell Setup build I get the message Setup: dist/package.conf.inplace: inappropriate type. I think just creating that directory and running "runhaskell Setup build" in almost any cabal tree will give you this error. I think that in general we need code that removes the file if it is a file and recursively removes the directory if it is a directory in Distribution.Simple.Build.createInternalPackageDB. |
Yeah, the fix for inplace should be simple, cooking it up. The situation if your .cabal database is single-file is more delicate. |
@rcallahan So, are you sure you deleted your |
This keeps happening to me, seemingly randomly, whenever I
I upgraded cabal from 1.20.0.3. I tried deleting (well, moving) my |
I think we have a fix in the pipeline for Cabal-1.22.0.1, due later this On Mon, Jan 12, 2015 at 12:19 PM, Callum Rogers notifications@github.com
|
I installed the master version of cabal but still doesn't work for me. Although I'm starting to suspect it's because my IDE starts up two |
Instead of cabal build && cabal install where this issue pops up a direct cabal install after a clean and or clean and configure is a quick work around. Hope that makes sense? |
I'm running the latest HEAD of 1.22, but I'm still getting these errors, or something similar. What seems to be happening is:
Is there any way to fix this? It seems that either old Cabal versions would have to know how to use the directory versions of the |
Hmm, I don't think there is a way around this. Probably the best thing we can do is release a minor version update for old versions of Cabal that add directory support. Let me explain why our hands are tied:
Best to clear the setup cache and try again. |
Clearing the setup cache doesn't work, because it will just recreate the files next time. The only thing that matters is the version of the Cabal library that is installed/in scope. Currently that's 1.20 for me, since I'm on GHC 7.8; I installed cabal-install 1.22 via a sandbox. I thought about having a point release for 1.20 (and older) to add this support, but I'm not sure it would help much. The biggest reason to keep using the old Cabal library is that it's tied to ghc (in 7.8 and older, at least). If you're installing a new version of it anyway, you might as well install 1.22. Only people who use packages incompatible with 1.22 would benefit from point releases. I'll leave it up to the cabal devs if that's worth it. It would have been nice to have spread this change out over two GHC/cabal releases: one to add support for the inplace directory databases to cabal (but also keep support for the old format), and one to remove support for the old format. That would have made for a much easier upgrade path. |
OK, here's an alternate suggestion: Cabal should version test GHC to determine if it does a single file or multi file database. |
That makes a lot of sense. Who has time to look into it?
|
…haskell#2320 some more. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Needs testing. |
OK, seems to DTRT. Waiting for Travis to go green. |
@ezyang is this still something that needs to be fixed in 1.22? |
I think this is good now. |
@ezyang Good as in "everything that's needed is already on the 1.22 branch"? |
According to the discussion on the PR, that seems to be the case. I haven't tested 1.22. |
Actually, I don't see the Version test in the commit list you recently sent out. |
Halcyon includes a workaround for this issue. |
Build directories (
dist
) created with cabal-install 1.20.0.3 are not usable with cabal-install 1.22.0.0.While removing the build directory is a viable workaround, the underlying issue may be manifesting itself in other ways. #2301 seems related.
The text was updated successfully, but these errors were encountered: