-
Notifications
You must be signed in to change notification settings - Fork 54
Choco install of cabal 3.2 fails in connection with ghc 9.6.1 #202
Comments
On Windows GHC 9.4+ mandates Cabal 3.8+ for correct linking, so I’d say this is more of an accidental feature than a bug. |
Agreed, I thought that in general new major releases of ghc always need a new cabal. But I wasn't sure so didn't mention it earlier :) |
- structure matrix entries `ghc` & `cabal` as `plan` - populate with "resonable" plans (matching ghc/cabal versions) - bump stack 1.9.1 (2018) to less older 2.3.3 (2020) - fix typo in `outputs.failed` check
In #204 I switch off the unlucky triple Windows/ghc-9.6/cabal-3.2 and in general pair ghcs with their matching cabal. |
@Mistuke: In the CI https://github.com/haskell/actions/actions/runs/4402374805/jobs/7709470944 for PR #204 any attempt to install cabal<3.10 on Windows fails. Well except for this run https://github.com/haskell/actions/actions/runs/4402374805/jobs/7709471152 where just the use of cabal fails with a parsing error on the Weird, because yesterday something still worked on the same image: https://github.com/haskell/actions/actions/runs/4399819678/jobs/7704611067 |
Do you cache the folder with the cabal config in it by chance? |
Don't think so. The only caching mentioned is for npm: actions/.github/workflows/workflow.yml Lines 25 to 29 in 132416f
|
Could you run |
Oh I see the problem.. with So now installing GHC 9.2.7 will also get you
Since you want specific versions of GHC and cabal your recipe should be this.
This will allow you do mix and match as before, and also avoid the need to use the It will also be faster as it doesn't reconfigure the package only to replace it. |
Is this related to haskell/cabal#8841? |
no, this is related to cabal 3.10.1 seemingly having added a backwards incompatible change to the global config file format. So when cabal 3.10.1 is used you cannot use any older cabal version again without removing the global config. |
@andreasabel I have temporarily unlisted It will still be installed when someone installs GHC 9.6.1, but it won't be default for older ones. Let me know when I can list it again. |
In case it's related (unlikely), we had a problem with our cabal CI as well: https://github.com/haskell/cabal/actions/runs/4400882899/jobs/7706599146, probably stemming from the XGD switch:
and a possible explanation:
|
Unlikely, I've unlisted the |
Just to be completely clear. since the title mentions chocolatey, this is a restriction from cabal. e.g.
So this is cabal. Once you use 3.10.1.0 you can never go back to earlier versions without completely wiping your configuration file. and cabal 3.10.1.0 cannot coexist with any other cabal version. |
That's a correct clarification. BTW, is it common that people use the same CI cache for different GHC or cabal versions instead of one cache for each combination? Am I right that with separate caches, this is not a problem (you never go back to pre-3.10 in your cache of 3.10 builds)? |
previously it wouldn't be much of an issue since inside the cache you had separate folders for different GHC versions. There are two things here:
now the problem can be solved as I mentioned above by telling chocolatey not to install the cabal dependency automatically. this then allows you to install any other cabal version. So this should be easy to workaround with the instructions I gave in #202 (comment) But if an end user find a bug now in cabal 3.10, they can't downgrade ghc and cabal without losing their configs. Which is ok, but the changelog for cabal 3.10.1.0 don't mention that this is a one way upgrade. |
I think this statement is slightly too strong in a few ways. First, it is "once you user-config init in 3.10.1.0" you cannot go back. (I.e. if you have an existing user config you don't update/overwrite its fine). Second, I think you could simply delete that line and then go back? And finally, I think that therefore a bunch of cabal versions can coexist, including 3.10.1.0, but we just have the constraint that the default config file generated by 3.10.1.0 does not fall in the set of config files that allow such coexistence? |
The statement is perfectly correct. For one it has nothing to do with user-config, Just simply using cabal is enough.
So trying to nuance it to "if you use user-config" is incorrect. Secondly both chocolatey and ghcup have to configure msys2 in order for Haskell on Windows to be useful for the majority of users. So this is the standard configuration as far as I know. Third I don't think neither me or ghcup maintainers want to sed config files, that defeats the point of So no, I think the statement that you cannot use 3.10.1.0 and other cabal versions concurrently is perfectly correct. and similarly that once you go to 3.10.1.0 you can't go back without removing the config file, or modifying the config file in such a way that installers can't automate safely. |
@Mistuke wrote:
Ok, I can give it a try. |
Following recipe given by @Mistuke in #202 (comment) : ``` choco install chocolatey-core.extension choco install ghc --ignore-dependencies choco install cabal ```
@andreasabel well you're overriding the dependencies anyway afterwards 😉 Hmm what may also work is this: install cabal before ghc. Yeah, just checked, if you install So for instance installing |
@andreasabel yeah, that's probably what you want, just flip the order of the installs. install cabal before ghc, and as long as you don't violate the constraints (which you shouldn't for a working cabal+ghc) then it'll work fine. |
@Mistuke : I had already implemented the Released main branch as |
Got it! I think I understand the confusion -- and i wasn't trying to minimize the problem, just be clear on scope. I had misread your statement as a general one, and instead you're naturally concerned specifically with automation here, and, in that setting what you're saying makes a lot of sense. I think going forward, cabal should still be able to add/change flags in the config, but it should really try to avoid doing it in a way that has backwards incompat settings written by default. |
@gbaz aye I'm not arguing that cabal shouldn't be able to make changes. But an unknown field shouldn't be fatal. That older cabals don't recognize the field also means they can't use it so it's irrelevant to them. |
Implementing @Mistuke's suggestion to install Lines 161 to 187 in 86bd3ed
|
Remaining bit in |
Lifted from:
cabal-3.2.0.0
seemingly cannot be installed by chocolatey in connection withghc-9.6.1
:https://github.com/haskell/actions/actions/runs/4398118597/jobs/7704243235#step:3:121
It works with other GHC versions.
Run with more debug info: https://github.com/haskell/actions/actions/runs/4398118597/jobs/7704278660#step:3:2234
@Mistuke writes:
The text was updated successfully, but these errors were encountered: