-
Notifications
You must be signed in to change notification settings - Fork 714
Warn when external Setup uses old Cabal #3801
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
Conversation
Looks good! |
LGTM |
This (apparently) exposes a bug on Linux with GHC < 8; I will investigate. |
Turns out it's not a problem with GHC < 8, but rather with running the integration tests outside of |
So, the situation is that when we call "cabal" from the custom/plain.sh test, it uses the default package databases (the global and the user). That means that when the setup script is built, it is built using the Cabal from the user database. I tried some junky hack to get the database to the right place but for some reasons the GHC versions mismatched; not sure what's going on! |
Isn't that the correct database?
How are you setting the database? Also, is the problem that |
Not when we use new-build to build the Cabal package. In that case, the inplace Cabal install is in dist-newstyle/packagedb (with dependencies on packages in .cabal/store). An inplace package is never installed to the user database. Note that package-tests (in Cabal) does some fancy footwork to compute where the inplace Cabal is, but that code isn't in integration-tests.
I tried passing cabal some
Not sure what you mean by bootstrap tests, but I suspect plain.sh is the only test which has checked stderr, which is why it is failing. (In fact, one of the custom setup tests specifically makes sure that it picks up the system Cabal, and not some other Cabal that a user happens to have in the user database.) |
Yes, but it only fails when invoked directly, as in EDIT: No, this can't merely be due to |
That's because the bootstrap strip also installs the Cabal library in the user database, which is why it gets picked up. |
96f0f94
to
9707798
Compare
Is there some alternate hacky fix we can do to get this PR unfrozen? @ttuegel |
The only way to get this PR moving again is to fix the test suite. I took a stab at it, but I couldn't figure it out. |
Fixes #707.