Use in-tree Cabal library for cabal-install tests with custom setup.#9671
Conversation
e73d236 to
93bd6bf
Compare
cabal-install tests with custom setup.cabal-install tests with custom setup.
93bd6bf to
8ee4abe
Compare
30e8104 to
0a364fb
Compare
|
This implements #9681. |
|
BTW is this ready for review (I don't see the label)? |
|
I have been concentrating so far on getting CI working for the normal CI configurations, which it now does. There are some further things I want to work on:
But I think it would be good to merge this firstly. |
|
I see. Great. That's normally signalled by setting the review_needed labels, which is why I ask. Let me set it instead. |
Mikolaj
left a comment
There was a problem hiding this comment.
That looks great. However, is there a possibility this breaks somebody's workflow? If so, can we mitigate that, give some porting hints, deprecate things in advance? If not, why?
|
I think by default, no there isn't. Because if you run the tests locally then the same behaviour will happen as before (using the boot Cabal version rather than the in-tree one). Perhaps that is confusing in itself. You have to explicitly pass a flag to |
|
I added some documentation now so I think this first step is ready to merge after #9671 is merged. |
Is it possible to update the PR title and description in accordance with the actual changes? |
a873ea8 to
feb0f68
Compare
|
I have rebased and this patch is ready to merge. |
alt-romes
left a comment
There was a problem hiding this comment.
This is a great improvement to the testsuite. I've been very confused myself regarding changes to Cabal not working as intended in the testsuite because of this (and going mad...). Thanks!
|
I'm afraid there are conflicts to solve before this can auto-merge. |
…s with custom setup. The idea here is to pass a `--package-db` flag to `cabal-install` which contains just `Cabal` and `Cabal-syntax` of the specific version. This allows `cabal-install` tests to use the in-tree `Cabal` version, something which you can easily run into and get very confused about when writing tests. There are a few options which can be passed to `cabal-tests` executable to control which Cabal library you will test against. 1. --boot-cabal-lib specifies to use the Cabal library bundled with the test compiler, this is the default and existing behaviour of the testsuite. 2. --intree-cabal-lib=<root_dir> specifies to use Cabal and Cabal-syntax from a specific directory, and `--test-tmp` indicates where to put the package database they are built with. 3. --specific-cabal-lib=<VERSION> specifies to use a specific Cabal version from hackage (ie 3.10.2.0) and installs the package database into --test-tmp=<DIR> The end result is that changes in the Cabal library can be tested with cabal-install tests in the testsuite. There have been a number of confusing issues with people writing tests for changes in the Cabal library which never ran because of cabal-install tests always used the boot Cabal library (see haskell#9425 for one). Fixes haskell#9681
feb0f68 to
716b109
Compare
|
@Mergifyio backport 3.12 |
✅ Backports have been createdDetails
|
Use in-tree Cabal library for `cabal-install` tests with custom setup. (backport #9671)
Allow using different Cabal library versions for
cabal-installtests with custom setup.