|
| 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