|
| 1 | +Cabal and Cabal-syntax 3.12.0.0 changelog and release notes |
| 2 | +--- |
| 3 | + |
| 4 | + |
| 5 | +### Significant changes |
| 6 | + |
| 7 | +- Add support for asm, cmm, and js sources in executable components [#8639](https://github.com/haskell/cabal/issues/8639) [#9061](https://github.com/haskell/cabal/pull/9061) |
| 8 | + |
| 9 | + Executable components now support the inclusion of asm, cmm, and js source |
| 10 | + files in a cabal file using the same syntax as is used for these sources |
| 11 | + in library components, similar to how c and c++ sources are supported in |
| 12 | + both types of components. This syntax was already parsed in cabal files, |
| 13 | + but was silently ignored in the build step, so no changes to syntax are |
| 14 | + made. |
| 15 | + |
| 16 | +- Add `--haddock-output-dir` flag to `cabal haddock`. [#8720](https://github.com/haskell/cabal/issues/8720) [#8788](https://github.com/haskell/cabal/pull/8788) |
| 17 | + |
| 18 | + This flag gives the user full control over the directory where the documentation is placed. It allows both relative and absolute paths. |
| 19 | + |
| 20 | +- Add `--semaphore` option to `./Setup build` interface [#8557](https://github.com/haskell/cabal/pull/8557) |
| 21 | + |
| 22 | + When `./Setup build --semaphore <SEM>` is called, `ghc` will be called |
| 23 | + with the `-jsem` option. It is the responsibility of the caller of |
| 24 | + `./Setup build` to manage the semaphore according to the GHC Jobserver |
| 25 | + Protocol. |
| 26 | + |
| 27 | + This low level interface is intended to be called by a high-level tool |
| 28 | + such as `cabal-install` which can create and manage the semaphore |
| 29 | + appropriately. |
| 30 | + |
| 31 | + The protocol is specified by [GHC Proposal #540](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0540-jsem.rst). |
| 32 | + |
| 33 | +- Add `--promised-dependency` flag to `./Setup configure` interface [#8726](https://github.com/haskell/cabal/pull/8726) |
| 34 | + |
| 35 | + There is a new flag `--promised-dependency`to allow users to configure a |
| 36 | + package *without* having previously built the dependency. Instead, we |
| 37 | + promise to the configure phase that we will have built it by the time we |
| 38 | + build the package. This allows us to configure all the packages we intend |
| 39 | + to load into the repl without building any dependenices which we will load |
| 40 | + in the same session, because the promise is satisifed due to loading the |
| 41 | + package and it's dependency into one multi-session which ensures the |
| 42 | + dependency is built before it is needed. |
| 43 | + |
| 44 | + A user of ./Setup configure specifies a promised dependency by using the |
| 45 | + "--promised-dependency" flag with a normal dependency specification. For |
| 46 | + example: |
| 47 | + |
| 48 | + ``` |
| 49 | + '--promised-dependency=cabal-install-solver=cabal-install-solver-3.9.0.0-inplace' |
| 50 | + ``` |
| 51 | +
|
| 52 | +- Add `--ignore` to `cabal check` [#8587](https://github.com/haskell/cabal/issues/8587) [#9442](https://github.com/haskell/cabal/pull/9442) |
| 53 | +
|
| 54 | + - `Distribution.PackageDescription.Check.Warning` now exports |
| 55 | + `filterPackageChecksById`, this can be used by third-party |
| 56 | + tools to filter warnings. |
| 57 | +
|
| 58 | +- Add support for `GHC2024` [#9736](https://github.com/haskell/cabal/issues/9736) |
| 59 | +
|
| 60 | + Support for the `GHC2024` language edition, introduced by GHC 9.10, has been |
| 61 | + added. It can now be used in the `default-language` and `other-languages` |
| 62 | + fields, and will be offered as an option by `cabal init`. |
| 63 | +
|
| 64 | +### Other changes |
| 65 | +
|
| 66 | +- `cabal init` should not suggest Cabal < 2.0 [#8680](https://github.com/haskell/cabal/issues/8680) |
| 67 | +
|
| 68 | + 'cabal init' no longer suggests users to set cabal-version to less than |
| 69 | + 2.0 |
| 70 | +
|
| 71 | +- Remove Distribution.Utils.TempTestDir module from Cabal library [#9453](https://github.com/haskell/cabal/issues/9453) [#9454](https://github.com/haskell/cabal/pull/9454) |
| 72 | +
|
| 73 | + This library was only used by internal tests, and now lives in the |
| 74 | + `Cabal-tests` library which is shared across test components. |
| 75 | +
|
| 76 | +- Distinguish `powerpc64le`, by adding `PPC64LE` constructor to type `Arch` [#9534](https://github.com/haskell/cabal/issues/9534) [#9535](https://github.com/haskell/cabal/pull/9535) |
| 77 | +
|
| 78 | + Adds constructor `PPC64LE` to type `Arch` to distinguish architecture |
| 79 | + powerpc64le from powerpc64. Existing constructor `PPC64` now exclusively |
| 80 | + represents powerpc64. |
| 81 | +
|
| 82 | +- PkgConfig individual calls [#9134](https://github.com/haskell/cabal/pull/9134) |
| 83 | +
|
| 84 | + `cabal` invokes `pkg-config` individually for each lib if querying for all |
| 85 | + doesn't return the expected result |
| 86 | +
|
| 87 | +- Split up `Distribution.Simple.Setup` [#8130](https://github.com/haskell/cabal/pull/8130) |
| 88 | +
|
| 89 | + The external interface of 'Distribution.Simple.Setup' has been kept the |
| 90 | + same, but internally it has been broken up into smaller modules. This |
| 91 | + improves build times in two ways: |
| 92 | +
|
| 93 | + 1. GHC is superlinear in the size of files, meaning that splitting up a |
| 94 | + large file can reduce overall compile times. |
| 95 | + 2. Breaking up the module allows dependent modules to refine their imports |
| 96 | + to just the parts they require, allowing them to start buildling quicker |
| 97 | + when GHC is run in parrallel make mode ('--ghc-options -j'). |
| 98 | +
|
| 99 | +- Reimplementing `cabal check` [#7423](https://github.com/haskell/cabal/issues/7423) [#8427](https://github.com/haskell/cabal/pull/8427) |
| 100 | +
|
| 101 | + - `checkPackage` signature has been simplified, |
| 102 | + you do not need to pass a specific configuration of the package, since |
| 103 | + we do not flatten GenericPackageDescription no more. |
| 104 | + - `checkPackageFileNames` has been removed, |
| 105 | + use `checkPackageFiles` instead. |
| 106 | + - `checkPackageFilesGPD` has been introduced, |
| 107 | + a function similar to `checkPackageFiles` that works on |
| 108 | + `GenericPackageDescription`. You do not need to use |
| 109 | + `flattenPackageDescription` anymore. |
| 110 | +
|
| 111 | +- Installation of extra-compilation-artifacts directory [#8662](https://github.com/haskell/cabal/pull/8662) |
| 112 | +
|
| 113 | + GHC plugins now can store custom data in the 'extra-compilation-artifacts' directory which gets installed with the package. |
| 114 | +
|
| 115 | +- Add option to ./Setup repl to write repl arguments to file [#8726](https://github.com/haskell/cabal/pull/8726) |
| 116 | +
|
| 117 | + The `./Setup repl` command is modified to allow a user to defer starting |
| 118 | + the repl and instead instruct the command to write the necessary build |
| 119 | + flags to a directiory. The option is called `--repl-multi-file <DIR>`. |
| 120 | +
|
| 121 | + This is useful when starting multi-component sessions as we want to query |
| 122 | + Setup.hs for the arguments which are needed to build each component but |
| 123 | + not for ./Setup to start the repl itself. |
| 124 | +
|
| 125 | +- Add Haiku as a known platform [#9006](https://github.com/haskell/cabal/pull/9006) |
| 126 | +
|
| 127 | + Cabal: Distribution now recognises Haiku as a valid platform, and also |
| 128 | + implements Haiku's unique directory layout. |
| 129 | +
|
| 130 | +- Installation of .hie files [#8685](https://github.com/haskell/cabal/issues/8685) [#9019](https://github.com/haskell/cabal/pull/9019) |
| 131 | +
|
| 132 | + Hie files generated by GHC are now stored in the |
| 133 | + `extra-compilation-artifacts` directory which gets installed with the |
| 134 | + package. |
| 135 | +
|
| 136 | +- Include the GHC "Project Unit Id" in the cabal store path [#8114](https://github.com/haskell/cabal/issues/8114) [#9326](https://github.com/haskell/cabal/pull/9326) |
| 137 | +
|
| 138 | + This allows the use of several **API incompatible builds of the same |
| 139 | + version of GHC** without corrupting the cabal store. |
| 140 | +
|
| 141 | + This relies on the "Project Unit Id" which is available since GHC 9.8.1, |
| 142 | + older versions of GHC do not benefit from this change. |
| 143 | +
|
| 144 | +- Fix the platform string for GNU/Hurd [#9434](https://github.com/haskell/cabal/pull/9434) |
| 145 | +
|
| 146 | + Depending whom you ask, GNU/Hurd will be labelled "gnu" or "hurd". The |
| 147 | + autotools use "gnu", so ghc follows this for installed files, even if the |
| 148 | + ghc source code uses OSHurd. We thus need to add the translation between |
| 149 | + the two. |
| 150 | +
|
| 151 | +- Use linker capability detection to improve linker use [#9443](https://github.com/haskell/cabal/pull/9443) |
| 152 | +
|
| 153 | + Previously the GHC version number and platform were used as a proxy for |
| 154 | + whether the linker can generate relocatable objects. |
| 155 | +
|
| 156 | + Now, the ability of the linker to create relocatable objects is detected. |
| 157 | +
|
| 158 | +- Merge globbing implementations [#5349](https://github.com/haskell/cabal/issues/5349) [#9673](https://github.com/haskell/cabal/pull/9673) |
| 159 | +
|
| 160 | + The common aspects of the globbing functionality between `Cabal` and |
| 161 | + `cabal-install` have been factored out. The only change in the user-facing |
| 162 | + API is that we now record when a glob does not match exactly, but matches |
| 163 | + a directory with that same name, with the new constructor |
| 164 | + `GlobMatchesDirectory` of `GlobResult`. |
| 165 | +
|
| 166 | + To illustrate, this change means that when `foo/dir` is a directory, the |
| 167 | + glob `*/dir/` matches exactly `foo/dir` (as before), but now `*/dir` |
| 168 | + produces `GlobMatchesDirectory` instead of failing. This allows callers |
| 169 | + to decide whether to allow or discard such inexact matches. |
| 170 | +
|
| 171 | +- Document `remote-repo-cache` as implemented. [#8737](https://github.com/haskell/cabal/issues/8737) [#8738](https://github.com/haskell/cabal/pull/8738) |
| 172 | +- Deduplicate LD_LIBRARY_PATH when running tests [#8728](https://github.com/haskell/cabal/pull/8728) |
| 173 | +- Add support for the 64-bit RISC-V architecture [#9062](https://github.com/haskell/cabal/pull/9062) |
| 174 | +- Add support for 64-bit LoongArch architecture [#9215](https://github.com/haskell/cabal/pull/9215) |
| 175 | +- Don't report `index.html` file as created, if not created by Haddock [#5120](https://github.com/haskell/cabal/issues/5120) [#9332](https://github.com/haskell/cabal/pull/9332) |
| 176 | +- Enable using $ORIGIN in RPATH on GNU/Hurd [#9441](https://github.com/haskell/cabal/pull/9441) |
| 177 | +- Add support for 64-bit SPARC as a separate architecture [#9445](https://github.com/haskell/cabal/pull/9445) |
| 178 | +
|
| 179 | +- Make check comply with Hackage requirements [#8897](https://github.com/haskell/cabal/pull/8897) |
| 180 | +
|
| 181 | + - `cabal check` will only return exitcode 1 when the package is not fit |
| 182 | + for Hackage. E.g. it will not error anymore when your `synopsis:` is |
| 183 | + larger than `description:`, just emit a warning. |
| 184 | + - Cabal: Distribution.Client.Check now exports `isHackageDistError`, for |
| 185 | + third-party tools to know if a specific error will preclude a package |
| 186 | + from being uploaded to Hacakge. |
| 187 | +
|
| 188 | +- Add language extension ExtendedLiterals [#8992](https://github.com/haskell/cabal/pull/8992) |
| 189 | +
|
| 190 | + Adds support for the ExtendedLiterals language extension (GHC proposal #451) |
| 191 | +
|
| 192 | +- Warn about inconsistent indentation [#8975](https://github.com/haskell/cabal/pull/8975) |
| 193 | +
|
| 194 | + - Make Cabal warn about inconsistent indentation in .cabal files. For |
| 195 | + example warn about somewhat common decreasing indentation like in |
| 196 | +
|
| 197 | + ```cabal |
| 198 | + library |
| 199 | + default-language: Haskell2010 |
| 200 | + build-depends: base |
| 201 | + ghc-options: -Wall |
| 202 | + ``` |
| 203 | +
|
| 204 | + The change is `readFields` function. |
| 205 | +
|
| 206 | + This is an effect of using `indentOfAtLeast` method/approach: any |
| 207 | + indentation greater than current offset is accepted. |
| 208 | +
|
| 209 | + That behavior is desirable to parsing multiline field contents, but it is |
| 210 | + a bit surprising for fields in sections, which we expect to be aligned. |
| 211 | +
|
| 212 | + Such insonsistency seems to be always a mistake, and it's easy to fix once |
| 213 | + a machine points it out. |
| 214 | +
|
| 215 | +- Add LexBraces lexer warning [#8577](https://github.com/haskell/cabal/issues/8577) |
| 216 | +
|
| 217 | + LexBraces warning is issued when brace delimiting syntax is used. This |
| 218 | + way, using `readFields'`, a low-lever consumer may decide whether braces |
| 219 | + were used. |
| 220 | +
|
| 221 | + (Looking for a brace character in the input is imprecise, as braces can |
| 222 | + occur inside field content). |
| 223 | +
|
| 224 | + This warning is not propagated to parser warnings, so e.g. |
| 225 | + readGenericPackageDescription doesn't warn about it. This is because all |
| 226 | + parser warnings prevent uploads to Hackage, and using braces (or not) is |
| 227 | + opinionated choice. |
| 228 | +
|
| 229 | +- Distinguish `powerpc64le`, by adding `PPC64LE` constructor to type `Arch` [#9534](https://github.com/haskell/cabal/issues/9534) [#9535](https://github.com/haskell/cabal/pull/9535) |
| 230 | +
|
| 231 | + Adds constructor `PPC64LE` to type `Arch` to distinguish architecture |
| 232 | + powerpc64le from powerpc64. Existing constructor `PPC64` now exclusively |
| 233 | + represents powerpc64. |
| 234 | +
|
| 235 | +- PkgConfig individual calls [#9134](https://github.com/haskell/cabal/pull/9134) |
| 236 | +
|
| 237 | + `cabal` invokes `pkg-config` individually for each lib if querying for all doesn't return the expected result |
| 238 | +
|
| 239 | +- Add language extension ListTuplePuns [#8854](https://github.com/haskell/cabal/pull/8854) |
| 240 | +
|
| 241 | + Adds support for the `ListTuplePuns` language extension (GHC proposal #475) |
| 242 | +
|
| 243 | +- Add `mkVersionIntervals` for creating a `VersionIntervals` from a list [#9034](https://github.com/haskell/cabal/pull/9034) |
| 244 | +
|
| 245 | + If external tools want to change the version intervals of dependencies, they |
| 246 | + need to be able to create a `VersionRange` from a `[VersionInterval]` list. Adding |
| 247 | + the function `mkVersionIntervals` makes this possible again. |
| 248 | +
|
| 249 | +- Add language extension `TypeAbstractions` [#9496](https://github.com/haskell/cabal/issues/9496) [#9502](https://github.com/haskell/cabal/pull/9502) |
| 250 | +
|
| 251 | +- Add support for the 64-bit RISC-V architecture [#9062](https://github.com/haskell/cabal/pull/9062) |
| 252 | +- Add support for 64-bit LoongArch architecture [#9215](https://github.com/haskell/cabal/pull/9215) |
| 253 | +- Add support for 64-bit SPARC as a separate architecture [#9445](https://github.com/haskell/cabal/pull/9445) |
| 254 | +
|
| 255 | +- Update SPDX License List to version `3.23 2024-02-08` [#9818](https://github.com/haskell/cabal/pull/9818) |
| 256 | +
|
| 257 | + - LicenseId and LicenseExceptionId now conform to SPDX License List |
| 258 | + version 3.23 2024-02-08. |
0 commit comments