-
Notifications
You must be signed in to change notification settings - Fork 3
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
Take into account constraints on core libs other than base. #19
Comments
Hi, yes, that is what is happening. I can surely do it, but which packages should be considered core libs? For other packages, you can also use different versions from the boot libraries coming with Now, it looks like |
Hm, it looks like part of the trouble actually is that stm has its own upper bound on base: https://hackage.haskell.org/package/stm-2.4.5.1 probably "The Right Thing" here would be to solve the dependency graph ignoring the fact that those packages are pinned to the compiler, and then look at what versions of those packages it decided on. It doesn't look like cabal exposes the solver via the public API though, so that might be a tall order. |
The solver isn't exposed, but we could run I had something in mind to solve this, quite a bit hacky: use Unfortunately for now the thing I can suggest when
where VER is a version you recognize can fulfill the constraints cabal had most trouble with. I've found that most of the times I can get away with this. What do you think? I'd like to hear your feedback. Unfortunately, for now |
Quoting Francesco Magliocca (2019-01-20 19:12:58)
I had something in mind to solve this, quite a bit hacky: use vabal-lib
to get the list of ghc versions compatible with the constraints, then
for each ghc run cabal v2-configure, until one succedes. I also have an
implementation and it's not so bad (it won't download any ghc) but it's
quite hacky.
I can't think of anything better, and this doesn't seem to horrible to
me. It may also make sense to open up a ticket with cabal about adding a
mechanism to make this sort of thing easier.
Unfortunately for now the thing I can suggest when vabal provides an
invalid ghc is to read the error that cabal outputs, and see which is
the constraint it could not solve. If it's base, you can run:
vabal configure --with-base-version VER
where VER is a version you recognize can fulfill the constraints cabal
had most trouble with. I've found that most of the times I can get away
with this.
Thanks for pointing out the flag. It's not super hard to work around.
|
Hi, after speaking to other people I've decided that I will add a flag to enable the possibility to try the various ghc versions using the cabal solver, so that a ghc that makes configuration possible can be found reilabily. |
Sounds good. |
I recently had
vabal
fail to select a working version of ghc for a package which hadbase < 5, stm <2.5
. I think what's happening is that it's only looking at thebase
requirement, but there are other libs that are pinned to a specific compiler version, so this is insufficient.Thanks for the tool by the way; I've wanted something like this for a while.
The text was updated successfully, but these errors were encountered: