
Hi Simon, I see, you triggered another feature/bug of cabal install, namely when you are in a project directory, project settings affect solving process. And when there's a .cabal file, it's a project. So cabal tried to find an install plan containing local packages (that makes sense, if you try to install local lhs2tex for example!) Solution is to change directory (cd) somewhere else and try again. (There's also cabal install -z flag feature request, -z to ignore local project; but it's not yet merged). - Oleg On 31.5.2019 11.02, Simon Peyton Jones wrote:
Thanks Oleg
my first guess is that: when working on the unsaturated type families paper, you did `cabal install --lib report`; or something similar. `report` is probably some internal library to that paper / project.
I am confident I did nothing like that. But there is a file called report.cabal in the directory where I did the ‘cabal install lhs2tex’ command.
To confirm, check what is in your ~/.ghc/x86_64-linux-8.6.5/environments/default (or similar), is some `package-id report-0.1.0.0-hexhash` line there?
There is no such file:
bash$ ls ~/.ghc
ghci_history x86_64-linux-8.9.0.20190414 x86_64-linux-8.9.0.20190508
x86_64-linux-8.6.4 x86_64-linux-8.9.0.20190430 x86_64-linux-8.9.0.20190527
bash$ ls ~/.ghc/x86_64-linux-8.6.4/
package.conf.d
Simon
*From:*Oleg Grenrus
*Sent:* 30 May 2019 20:19 *To:* Simon Peyton Jones ; cabal-devel@haskell.org *Subject:* Re: Cabal install Hi Simon,
my first guess is that: when working on the unsaturated type families paper, you did `cabal install --lib report`; or something similar. `report` is probably some internal library to that paper / project.
In that case, you are hitting the unfortunate cabal bug [1].
To confirm, check what is in your ~/.ghc/x86_64-linux-8.6.5/environments/default (or similar), is some `package-id report-0.1.0.0-hexhash` line there? If so, the simplest fix is to remove that environment file.
- [1] https://github.com/haskell/cabal/issues/5888 https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhaskell%2Fcabal%2Fissues%2F5888&data=02%7C01%7Csimonpj%40microsoft.com%7C5a4d4dc3dc214b29d8f408d6e533b91b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636948407671672464&sdata=OH3R%2Fl9xP6d2w8OUQ8V%2FUa%2Bp%2FEpDeqyy%2FWWBxTJ7Q%2BQ%3D&reserved=0https://github.com/haskell/cabal/issues/5559 https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhaskell%2Fcabal%2Fissues%2F5559&data=02%7C01%7Csimonpj%40microsoft.com%7C5a4d4dc3dc214b29d8f408d6e533b91b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636948407671682461&sdata=%2Fo%2FL6ZWU%2Bt2fA1CDGqjHL7RU1FFHGbIJacPzLNctZyE%3D&reserved=0
Cheers, Oleg
On 30.5.2019 16.50, Simon Peyton Jones wrote:
Dear friendly Cabal folk
Here’s what happened to me today
bash$ cabal install lhs2tex
cabal: Could not resolve dependencies:
[__0] next goal: report (user goal)
[__0] rejecting: report-0.1.0.0 (conflict: requires UnsaturatedTypeFamilies)
[__0] fail (backjumping, conflict set: report)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: report
Crumbs. What is ‘report’? Why does it need UnsaturatedTypeFamilies? I’m totally lost.
Then, in an inspired moment, I thought to change to a different directory, ~/tmp.
Then quite different things happened – it downloaded and built relevant libraries.
I think that there just happened to be a .cabal file in the original directory I was in at the time. That appears to affect what ‘cabal install’ does in a truly radical way.
My point is this: this is terribly confusing for the user (at least for this on). I’d be shocked if ‘apt install blah’ behaved utterly differently in different directories. I’m going to make a little empty directory somewhere, and cd to it before invoking cabal in future. But that just feels like a workaround, not a solution.
I’m not saying it’s wrong – just giving you a data point that it had one user completely stumped
Simon
_______________________________________________
cabal-devel mailing list
cabal-devel@haskell.org mailto:cabal-devel@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fcabal-devel&data=02%7C01%7Csimonpj%40microsoft.com%7C5a4d4dc3dc214b29d8f408d6e533b91b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636948407671692458&sdata=vRr6UoW69Y0U7rGrYHm1XtbAH2jlFsArh21E7i0o6ko%3D&reserved=0