Skip to content

Commit c926d55

Browse files
ffaf1mergify[bot]
authored andcommitted
Changelogs 3.18.2.0 (#12346)
* Add changelogs for 3.18.2.0 * Remove changelog files for 3.18.2.0 (cherry picked from commit a14e7af)
1 parent f8737ad commit c926d55

7 files changed

Lines changed: 135 additions & 62 deletions

File tree

Cabal/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 3.18.2.0 [Francesco Ariis](mailto:fa-ml@ariis.it) September 2026
2+
* See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.18.2.0.md
3+
14
# 3.18.1.0 [Artem Pelenitsyn](mailto:a@pelenitsyn.top) July 2026
25
* See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.18.1.0.md
36

changelog.d/10252.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

changelog.d/12260.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

changelog.d/12276.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

changelog.d/pr-12114.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

release-notes/Cabal-3.18.2.0.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Cabal and Cabal-syntax 3.18.2.0 changelog and release notes
2+
---
3+
4+
### Significant changes
5+
6+
- Mark `CabalSpecV3_18` as the latest supported specification [#12271](https://github.com/haskell/cabal/issues/12271) [#12273](https://github.com/haskell/cabal/pull/12273)
7+
8+
`cabalSpecLatest` remained `CabalSpecV3_16` after `CabalSpecV3_18` was
9+
introduced. As a result, `cabal-install` treated a `build-type: Simple` package
10+
that declared `cabal-version: 3.18` as a future-format package. It then tried to
11+
compile an external `Setup.hs` without a Cabal setup dependency, which caused
12+
the build to fail.
13+
14+
`cabalSpecLatest` now points at `CabalSpecV3_18`. Affected packages use the
15+
in-process setup path again.
16+
17+
- Fix `renameFileWithRetry` leaving temporary files after copying [#12244](https://github.com/haskell/cabal/issues/12244) [#12246](https://github.com/haskell/cabal/pull/12246)
18+
19+
`cabal-install build` left a number of temporary (`.tmp` extension)
20+
files in the user’s temporary folder (e.g. `/tmp`). This has been fixed.
21+
22+
### Other changes
23+
24+
- Fix concurrent store creations [#11329](https://github.com/haskell/cabal/issues/11329) [#12114](https://github.com/haskell/cabal/pull/12114)
25+
26+
Previously, when several cabal processes share one `--store-dir` and that store
27+
is cold, they all race `createPackageDBIfMissing`. Precisely hitting the warning
28+
above it, noting that it is not thread-safe.
29+
30+
Fix this by using a fd-based lock, prior to attempting to create the index.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
cabal-install 3.18.2.0 changelog and release notes
2+
---
3+
4+
### Unresolved issues and Notice
5+
6+
- Cabal package not visible to build auto-generated setup.hs [#11416](https://github.com/haskell/cabal/issues/11416)
7+
8+
Upgrading from `cabal-install` 3.16.0.0 might give error on autogenerated
9+
`Setup.hs`.
10+
11+
This is fixable by running `cabal build --enable-tests`.
12+
13+
- Putting targets after the argument separator is removed [#12231](https://github.com/haskell/cabal/issues/12231) [#10487](https://github.com/haskell/cabal/pull/10487)
14+
Invoking e.g. `cabal run -- target` works no more. Put the target
15+
— and any cabal-specific option — before the hyphen (like this:
16+
`cabal run target -- <non-cabal-options>`).
17+
18+
- `cabal-install` works with semaphore version 2 only [#12306](https://github.com/haskell/cabal/issues/12306)
19+
20+
`cabal-install 3.18` includes support for version 2 of `semaphore-compat`.
21+
GHC plans to add support for v2 in releases 9.10.4, 9.12.5, 9.14.2, and
22+
10.0.1.
23+
24+
If those GHCs are not yet released or not available to you, you might
25+
consider not updating to `3.18` to keep v1 semaphore working.
26+
27+
- Windows: cannot `cabal install` `cabal-install` [#12269](https://github.com/haskell/cabal/issues/12269)
28+
29+
This is due to Windows not allowing to delete an open file.
30+
31+
Workaround: build `cabal-install` and copy it manually to the target
32+
folder.
33+
34+
- (Windows) `cabal-install` built in msys-shell links against msys env specific dlls [#12272](https://github.com/haskell/cabal/issue/12272/) [#12274](https://github.com/haskell/cabal/pull/12274/)
35+
36+
This breaks `cabal-install` on PowerShell if you build the binary
37+
with `cabal install cabal-install`.
38+
39+
Workaround: have an appropriate `cabal.project`. You can simply clone
40+
`3.18` and build from there or copy this:
41+
42+
```
43+
# cabal.project
44+
if os(windows)
45+
package zlib
46+
flags: -pkg-config +bundled-c-zlib
47+
```
48+
49+
### Important changes
50+
51+
- Fix `renameFileWithRetry` leaving temporary files after copying [#12244](https://github.com/haskell/cabal/issues/12244) [#12246](https://github.com/haskell/cabal/pull/12246)
52+
53+
`cabal-install build` left a number of temporary (`.tmp` extension)
54+
files in the user’s temporary folder (e.g. `/tmp`). This has been fixed.
55+
56+
### Other changes
57+
58+
- Fix cabal upload failure with curl chunked-encoding error [#10252](https://github.com/haskell/cabal/issues/10252) [#12211](https://github.com/haskell/cabal/pull/12211)
59+
60+
- Removed the newline character from `--write-out` curl arguments when uploading packages. Newer versions of `curl` misinterpret this newline during chunked-encoding transfers, causing upload failures
61+
62+
- Honor `--with-gcc` and program-locations when configuring the compiler [#11881](https://github.com/haskell/cabal/issues/11881) [#12260](https://github.com/haskell/cabal/pull/12260)
63+
64+
`cabal build` now respects the user-specified locations of toolchain programs
65+
such as the C compiler. Previously `--with-gcc` and the `program-locations`
66+
section of the config file were ignored, and `cabal` always used the C compiler
67+
that GHC was built with. As a result, passing `-pgmc=...` via
68+
`program-default-options` did not reliably override the C compiler either.
69+
70+
The root cause was twofold:
71+
72+
- When configuring the compiler, the user-supplied program locations were
73+
dropped before the toolchain programs (gcc, ar, ld, ...) were re-added.
74+
- The elaborated program locations gave the compiler-detected locations
75+
precedence over the user-supplied ones.
76+
77+
Now the user-supplied locations are applied to the compiler's program database
78+
and take precedence over auto-detected locations.
79+
80+
- Fix spurious "Unknown field configure-options" warning [#12245](https://github.com/haskell/cabal/issues/12245) [#12276](https://github.com/haskell/cabal/pull/12276)
81+
82+
The parsec project file parser treated every `-options` field in a `package`
83+
stanza as a program option and warned when the program name was unknown. Since
84+
`configure`, `test` and `benchmark` are not programs, valid fields like
85+
`configure-options` got spuriously flagged as unknown. The warning is now only
86+
emitted in `program-options`/`program-locations` stanzas; inside a `package`
87+
stanza the field grammar already reports unknown fields.
88+
89+
```diff
90+
$ cabal build all --dry-run
91+
- Warnings found while parsing the project file, cabal.project.local:
92+
- - cabal.project.local:2:3: Unknown field: "configure-options"
93+
Build profile: -w ghc-9.12.4 -O1
94+
```
95+
96+
- Fix concurrent store creations [#11329](https://github.com/haskell/cabal/issues/11329) [#12114](https://github.com/haskell/cabal/pull/12114)
97+
98+
Previously, when several cabal processes share one `--store-dir` and that store
99+
is cold, they all race `createPackageDBIfMissing`. Precisely hitting the warning
100+
above it, noting that it is not thread-safe.
101+
102+
Fix this by using a fd-based lock, prior to attempting to create the index.

0 commit comments

Comments
 (0)