-
Notifications
You must be signed in to change notification settings - Fork 53
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 resolution picks very old packages #7
Comments
Thanks for the thorough bug report! It has helped me reproduce the problem. It's a really weird bug and I haven't solved it yet. I did create another branch of the buildpack that helps for debugging because it preserves What's confusing is that all the new stuff is in there, so I don't know why it tries to install the old stuff. If you want to examine the output as well, create your app like this |
It may be worth bringing someone from the Cabal team in here. I don't know that it's a bug that the dependencies were solved this way, but it's certainly strange behavior. |
I saw this behaviour too, albeit with an older version of the buildpack before @begriffs cleaned it up. I was deploying a nontrivial Yesod app and had to add a lot of explicit version constraints before it would work. (Then I hit the 15 minute limit and gave up :)) Unfortunately this was a while ago so I don't have much of diagnostic use, but given the Heisenbuggy nature of this issue, I thought even a "me too" would help to understand just how edgy an edge case this is. |
A workaround to this problem, or perhaps even a compelling solution would be to freeze all of the dependencies for a project to the exact versions that have been selected locally. As this build pack requires at least cabal-install 1.18, this can be done by providing a complete and exact set of dependencies in the Determining the complete and exact set of dependencies manually would be at best tiresome and frustrating. However, I've just uploaded Details of how to use it can be found on its hackage page and on its Github repo page. Hopefully, this will help resolve this issue for you. I'd love to hear any feedback from its use. And of course if you have any issues with it please open an issue on the |
Thanks @benarmston this is ingenious! I am having trouble using it, however. Here's what happens: $ cabal-constraints dist/dist-sandbox-e94ad5c0/setup-config
You need to re-run the 'configure' command. The version of Cabal being used has changed (was Cabal-1.18.0, now Cabal-1.18.1.2).
$ cabal --version
cabal-install version 1.18.0.2
using version 1.18.0 of the Cabal library |
The version of For the first option,
|
Problem solved! I installed the newest cabal in my sandbox then put .cabal-sandbox/bin earlier in my path and I'll add a section to the README to describe this process for other people. Is there a way to relax the exact cabal version matching? I feel like that might be a complicated thing to explain. |
Glad to hear your problems solved! There may be a way to relax the exact I had also been working on adding a As such I'm rather reluctant to invest too much time in trying to fix the UX problems with Of course an updated README better explaining how to use the tool would be much appreciated. Perhaps a paragraph in the install section detailing 1) how to find the version of |
Thanks @benarmston, you really saved the day. 👍 |
In trying to build a bare-bones Happstack example using this buildpack I ran into an issue where during dependency installation Cabal would pick outrageously old packages. This is legal as I wasn't specifying any versions explicitly in my
.cabal
file, but it's divergent behavior from my localcabal install --only-dependencies
.The behavior is all captured in some commits at tel/happstack-heroku-test. In particular, my initial
.cabal
file washttps://github.com/tel/happstack-heroku-test/blob/a17d56baf4a03b9fd5b7ee8f21e582dc23ec667e/hktest.cabal
and the build failed due to trying to install
happstack-server-0.5.0.5
which depends on an old version of HaXml that failed to build. I then added an explicithappstack-server
constrainthttps://github.com/tel/happstack-heroku-test/blob/01ce7ebf07f0b2acf34b2e5dd56c0801c55365e5/hktest.cabal
which caused a modern happstack to be build (avoiding the HaXml dep) but failed due to an older
mtl-2.0.1.0
. I then constrainedmtl
as wellhttps://github.com/tel/happstack-heroku-test/blob/e26170a526d446ebba91b7c2305a90601eb5ea59/hktest.cabal
which built successfully.
The text was updated successfully, but these errors were encountered: