# Just released: cabal 3.10.1.0

**URL:** <https://discourse.haskell.org/t/just-released-cabal-3-10-1-0/5978>\
**Category:** Announcements\
**Created:** [March 13, 2023, 10:42am UTC](https://discourse.haskell.org/t/just-released-cabal-3-10-1-0/5978 "2023-03-13T10:42:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikolaj](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mikolaj/32/1041_2.png) [@Mikolaj](https://discourse.haskell.org/u/Mikolaj)\
**Post date:** [March 13, 2023, 10:42am UTC](https://discourse.haskell.org/t/just-released-cabal-3-10-1-0/5978/1 "2023-03-13T10:42:01Z")

</div>

Dear cabal users and contributors,

The cabal team is proud to announce the release of cabal 3.10.1.0. This is mainly a bugfix release, but it has some new features and enhancements as well. The changelogs and release notes are at

> <https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.10.1.0.md>

and, if your code depends on the Cabal library, at

[https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.1.0.md](https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.1.0.md)

Two backward (in)compatibility notes may be of particular interest: the XDG Base Directory Specification (conditionally) replacing ~/.cabal and the `--enable-documentation` option by default added to all `cabal haddock` invocations. Please look them up at the links above.

Let me finish by thanking our esteemed benefactors, past and present, contributing code, devops, testing, feedback, comments. Representing these are the authors of all PRs included in the 3.10.1.0 release, honourably mentioned in the list of fame below.

Abastro  
Alexander Biehl  
Alexey Radkov  
amigalemming  
Andrea Bedini  
Andreas Abel  
Andreas Klebinger  
Artem Pelenitsyn  
Ben Gamari  
Bodigrim  
Brandon Chinn  
Bryan Richter  
Byron Johnson  
Cheng Shao  
chowells79  
Cmdv  
Colton Clemmer  
cydparser  
Daniel Gröber  
deltaspace0  
Evgenii Akentev  
fendor  
Francesco Ariis  
Francesco Gazzetta  
Gautier DI FOLCO  
Georgi Lyubenov  
Gershom Bazerman  
Guillaume Genestier  
Hécate Moonlight  
Ikko Ashimine  
instinctive  
Jade Lovelace  
James Hobson  
Jan Synáček  
Jappie Klooster  
Javier Neira  
John Ericson  
Kobayashi  
Marcin Szamotulski  
Martijn Bastiaan  
Matthew Pickering  
Max Amanshauser  
Miezhiko  
Mike Pilgrem  
Musab Guma’a  
Patrick Dougherty  
Paweł Dybiec  
Pierre Le Marre  
Robert Vollmert  
Ross Paterson  
Saad Ahmed  
Sergey Vinokurov  
sheaf  
Sören Tempel  
Sylvain Henry  
Tom McLaughlin  
Troels Henriksen  
Vilius Panevėžys  
Vladislav Zavialov  
Wismill

---

<div class="post-metadata">

**Author:** ![Mikolaj](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mikolaj/32/1041_2.png) [@Mikolaj](https://discourse.haskell.org/u/Mikolaj)\
**Post date:** [March 13, 2023, 10:44am UTC](https://discourse.haskell.org/t/just-released-cabal-3-10-1-0/5978/2 "2023-03-13T10:44:23Z")

</div>

Here are links to two issues with cabal 3.10.1.0 discovered just after the release, with some discussion and potential workarounds (the latter potentially affects any multi-GHC CI):

> <https://github.com/haskell/cabal/issues/8841#issuecomment-1465296533>
>
> \*\*Describe the bug\*\*
> Copied from IRC:
> 
> \> \*\*maerwald:\*\*
> \> windows cabal test… consistently fails: https://github.com/haskell/ghcup-metadata/actions/runs/4396989936/jobs/7699817403#step:3:14665
> \>
> \> the same test works with 3.6.2.0: https://github.com/haskell/ghcup-metadata/actions/runs/4397003656/jobs/7699838528
> \> 
> \> D:\\a\\\_temp\\foobarbaz\\ghcup\\ghc\\9.4.4\\lib\\../mingw/bin/llvm-ar.exe: error: C:\\\\cabal\\\\script-builds\\\\ff17c4bce8853274ef8c5beb95175084fb96425f714475e54f50bdf49f3b33c6\\\\dist-newstyle\\\\build\\\\x86\_64-windows\\\\ghc-9.4.4\\\\fake-package-0\\\\x\\\\cabal-script-main.hs\\\\build\\\\cabal-script-main.hs\\\\cabal-script-main.hs-tmp\\Main.p\_o.tmp: No such file or directory
> \> 
> \> yes, there's a regression with long paths on windows
> 
> \> \*\*Artem:\*\*
> \> any way to check if it works with 3.8.1.0? or how to repro it in general? 'Cause it seems like it \`cabal run\`s \`print $ 1+1\`, which 3.10 is definitely capable of (even on Windows!). Do I just put the script in a folder with a long path (like above)?
> 
> \> \*\*maerwald:\*\*
> \> just make sure you don't have CABAL\_DIR set and it should reproduce
> 
> \*\*To Reproduce\*\*
> 
> No idea.
> 
> \*\*System information\*\*
> - Operating system: Windows
> - \`cabal\`, \`ghc\` versions: 3.10.1.0, 9.4.4

> <https://github.com/haskell/actions/issues/202#issuecomment-1465822109>
>
> Lifted from: 
> \- https://github.com/Mistuke/GhcChoco/issues/20#issuecomment-1465…314317
> 
> \`cabal-3.2.0.0\` seemingly cannot be installed by chocolatey in connection with \`ghc-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 GHCs have a dependency on cabal they're expected to work with. In this case installing 9.6.1 installs cabal 3.10.1 as well and configures it. \[...\] the config file created by 3.10.1 cannot be read by 3.2 and so it fails. \[...\] it's failing while updating the config file.
> \> \[...\] you can install ghc with \`--ignore-dependencies\` to not install the new cabal.
> \> \[...\] the update fails after 3.10.1 creates the config:
> \> \`\`\`
> \> cabal.exe: Error parsing config file C:\\cabal\\config:24:
> \> Parse of field 'nix' failed (\<viewAsFieldDescr\>disable): disable
> \> \`\`\`
> \> \[...\] 3.2 and 3.10 cannot coexist

---

<div class="post-metadata">

**Author:** ![Mikolaj](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mikolaj/32/1041_2.png) [@Mikolaj](https://discourse.haskell.org/u/Mikolaj)\
**Post date:** [March 13, 2023, 7:43pm UTC](https://discourse.haskell.org/t/just-released-cabal-3-10-1-0/5978/3 "2023-03-13T19:43:23Z")

</div>

There is a third issue we are aware of ([`cabal update` is not run? · Issue #203 · haskell/actions · GitHub](https://github.com/haskell/actions/issues/203)), manifesting in CI with a cache, namely that due to XDG backward compatibility behaviour it’s safer to perform `cabal update` after cache is restored, not before.

All the three issues will probably be addressed in cabal 3.10.2.0 (at least via explicit recommendations in release notes, perhaps via fixes), but at this point we don’t know the details yet, so for the time being we offer workarounds and gather feedback.

---

<div class="post-metadata">

**Author:** ![Mikolaj](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mikolaj/32/1041_2.png) [@Mikolaj](https://discourse.haskell.org/u/Mikolaj)\
**Post date:** [March 17, 2023, 11:12am UTC](https://discourse.haskell.org/t/just-released-cabal-3-10-1-0/5978/4 "2023-03-17T11:12:14Z")

</div>

Some news on the three issues in cabal 3.10.1.0:

1. [cabal run fails on windows due to the long path issue · Issue #8841 · haskell/cabal · GitHub](https://github.com/haskell/cabal/issues/8841)

Thanks to @jneira, this “long paths” crash was determined to affect only `cabal run` on Windows and only in some circumstances. It turns out it was introduced in cabal 3.8.1.0. We are looking at potential fixes, but I’d downgrade its severity. Please let us know if it affects you and especially if you don’t have a good workaround.

1. [Fresh ~/.cabal/config written by cabal 3.10 crashes any older cabal · Issue #8864 · haskell/cabal · GitHub](https://github.com/haskell/cabal/issues/8864) (originally reported in [Choco install of cabal 3.2 fails in connection with ghc 9.6.1 · Issue #202 · haskell/actions · GitHub](https://github.com/haskell/actions/issues/202))

Thanks to @sclv, we now understand the problem that cabal 3.10.1.0 writes ~/.cabal/config file that older cabal versions can’t read. It’s an unintended compatibility break and we want to fix it in cabal 3.10.2.0. It affects people that want to go back to an older cabal version, but preserve their manually edited config file created by cabal 3.10.1.0. (If preserving the config file is not required, wiping it out makes old cabal binaries work fine, since they promptly generate a fresh file they parse without issues.)

The workarounds include not letting cabal 3.10.1.0 write a fresh config file (e.g., one can generate the file with old cabal or copy an old file) and removing the offending “nix” line, after which the old cabal binaries can parse the config file fine.

1. [`cabal update` is not run? · Issue #203 · haskell/actions · GitHub](https://github.com/haskell/actions/issues/203)

Thanks to @andreasabel, the missing `cabal update` in CI problem is now well understood and worked around in Github Actions (and doesn’t seem to affect the CI scripts generated by haskell-ci). We will update cabal 3.10.1.0 release notes with a recommendation to place `cabal update` after CI cache restoration in any custom CI scripts in order to correctly trigger the XDG backward compatibility mechanism. That’s probably as much as needs to be done here. Please let us know if there are any corner cases we’ve missed.
