1 Cabal 3.8.0.20220526 Changelog
4 ### Significant changes
6 - Cabal init rewrite [#1074](https://github.com/haskell/cabal/issues/1074) [#6758](https://github.com/haskell/cabal/issues/6758) [#6864](https://github.com/haskell/cabal/issues/6864) [#7251](https://github.com/haskell/cabal/issues/7251) [#7255](https://github.com/haskell/cabal/issues/7255) [#7256](https://github.com/haskell/cabal/issues/7256) [#7273](https://github.com/haskell/cabal/issues/7273)
8 - Restructures the `cabal init` command to fix historical
9 issues. All flags are preserved.
10 - Codebases for interactive and non-interactive flags
12 - Data structures now exploit relevant stanza structure
13 and formatters only care about stanza data
14 - Heuristics and prompts have a pure and impure implementation.
16 - Sets default behavior to be `--interactive` as opposed to
19 - Rewrites tests to achieve 98% coverage
20 - Golden files now test every stanza individually
21 - Every flag is covered by a unit test
22 - Interactive, simple, and non-interactive workflows are
25 - Windows: redo the fix to breakage caused by new autoconf; the wrong fix made cabal sometimes fail with old autoconf [#7494](https://github.com/haskell/cabal/issues/7494) [#7649](https://github.com/haskell/cabal/issues/7649)
27 - Reverts #7510 that failed on Windows when used with pre-generated scripts included in packages such as network, time, process.
28 - Adds a subtler fix/workaround for the deficiencies of new autoconf versions on Windows.
30 - Windows: rewrite paths to configure [#7494](https://github.com/haskell/cabal/issues/7494) [#7649](https://github.com/haskell/cabal/issues/7649)
32 - Expose `cabal-install` as library [#1597](https://github.com/haskell/cabal/issues/1597) [#3781](https://github.com/haskell/cabal/issues/3781) [#4798](https://github.com/haskell/cabal/issues/4798) [#6090](https://github.com/haskell/cabal/issues/6090) [#7224](https://github.com/haskell/cabal/issues/7224) [#7358](https://github.com/haskell/cabal/pull/7358)
34 - Enabled foreign library building on apple silicon [#7837](https://github.com/haskell/cabal/issues/7837) [#8227](https://github.com/haskell/cabal/issues/8227) [#8232](https://github.com/haskell/cabal/pull/8232)
36 - Enabled foreign library building on apple silicon
37 - Updated error message for foreign library builds on unsupported platforms
39 - Allow preprocessors to register a reordering [#55](https://github.com/haskell/cabal/issues/55) [#1906](https://github.com/haskell/cabal/issues/1906)
41 - Changes the PreProcessor type to include a field ppOrdering so that modules are presented to the preprocessor in the right order (w.r.t. dependencies)
43 - Use ghc -flink-rts option when available [#7763](https://github.com/haskell/cabal/issues/7763) [#7764](https://github.com/haskell/cabal/pull/7764) [#8111](https://github.com/haskell/cabal/pull/8111)
45 Previously Cabal did quite some headstands to link against libHSrts.
46 Note only this is complex but it couples very tightly to GHC's implementation.
47 Thankfully, as of GHC 9.0 GHC provides a -flink-rts flag for precisely this purpose.
48 Use it when available.
50 It fixed a bug which make Cabal unusable to build foreign libraries for windows and ghc 9.0 or 9.2.
51 See <https://gitlab.haskell.org/ghc/ghc/-/issues/20520>
53 - Remove the Generic instance of LicenseId [#8074](https://github.com/haskell/cabal/issues/8074) [#8117](https://github.com/haskell/cabal/pull/8117)
55 - The `Generic` instance of LicenseId is removed, due to the extraordinary amount of memory required to compile
56 the Generic instances of large sum types in GHC.
61 - Handle option argument parse errors without 'error' [#7573](https://github.com/haskell/cabal/issues/7573) [#7579](https://github.com/haskell/cabal/pull/7579)
63 - Errors parsing arguments such as `-v=3` no longer result in
65 - `Distribution.ReadE.readEOrFail` was removed.
67 - Fix bugs in filename validation [#7426](https://github.com/haskell/cabal/issues/7426) [#7429](https://github.com/haskell/cabal/pull/7429) [#7479](https://github.com/haskell/cabal/pull/7479)
69 - Relative paths starting with single-character directories are now properly allowed
70 - `cabal check` rejects paths which are invalid on Windows or in tarballs
72 - Fix test --enable-coverage for multi-package projects [#5213](https://github.com/haskell/cabal/issues/5213) [#5433](https://github.com/haskell/cabal/issues/5433) [#7200](https://github.com/haskell/cabal/issues/7200) [#7250](https://github.com/haskell/cabal/pull/7250) [#7467](https://github.com/haskell/cabal/pull/7467)
74 - Fix `cabal test --enable-coverage` for multi-package projects by invoking `hpc markup --include=` and listing only modules of libraries of the single tested package.
76 - Make cabal respect setgid permission bit when creating directories [#7560](https://github.com/haskell/cabal/issues/7560) [#7572](https://github.com/haskell/cabal/pull/7572)
78 - Previously cabal would override an admin's choice to use setgid on the
79 .cabal directory by using hardcoded file and directory modes upon
80 creation. Instead we now take what the system decides and only add to
81 that set of permissions.
83 - Handle conditionals in duplicate module checks [#4629](https://github.com/haskell/cabal/issues/4629) [#7525](https://github.com/haskell/cabal/issues/7525) [#7616](https://github.com/haskell/cabal/pull/7616)
85 Improves `cabal check` logic for duplicate modules to take into account conditional branches. If a module appears on both sides of an `if/else` clause in a cabal file, it is now correctly not reported as a duplicate.
87 - Backtrack when no pkg-config is present [#7448](https://github.com/haskell/cabal/issues/7448) [#7621](https://github.com/haskell/cabal/pull/7621)
89 When solving for pkgconfig-depends, when pkg-config is not present, the cabal solver will now backtrack and try a different automatic flag and dependency configuration, just as it does if pkg-config is present, but does not contain the specified package.
91 - Add code-generators field to test-suite stanza [#4500](https://github.com/haskell/cabal/issues/4500) [#7688](https://github.com/haskell/cabal/pull/7688)
93 Test-suite stanzas now may contain a `code-generators:` field that can be used to run executables as preprocessors which take existing locations of library code and cabal-generated ghc build flags, and output new modules for use in the test stanza. This can be used to automatically generate drivers for "discover" style tests, including doctests.
95 - Terminate subprocesses when killed [#7914](https://github.com/haskell/cabal/issues/7914) [#7921](https://github.com/haskell/cabal/pull/7921)
97 - cabal (and 'cabal run' in particular) no longer leaves children running
98 when it is killed (unix)
100 - Cleanup subprocess helpers, remove obsolete functions [#7995](https://github.com/haskell/cabal/pull/7995)
102 - Distribution.Compat.Process: Remove createProcess, runInteractiveProcess
104 - Distribution.Simple.Utils: Remove printRawCommandAndArgs,
105 printRawCommandAndArgsAndEnv and createProcessWithEnv.
107 - Allow glob-star matches with literal filenames (no extensions) [#5883](https://github.com/haskell/cabal/issues/5883) [#8005](https://github.com/haskell/cabal/pull/8005)
109 - Cabal file glob syntax extended to allow matches of the form dir/**/FileNoExtension
111 - Flatten duplicate warnings about experimental features [#8023](https://github.com/haskell/cabal/pull/8023)
113 - Make builds that use experimental Cabal language features less noisy. At -v1
114 (normal) we show just first instance of use of experimental cabal language
115 features, along with count of further occurences in the same file.
117 - Fix Cabal not finding public sublibraries of installed packages [#7270](https://github.com/haskell/cabal/issues/7270) [#8089](https://github.com/haskell/cabal/pull/8089)
119 Fix bug in lookup of installed sublibraries with nonexact dependencies (ie. when
120 not using --exact-configuration). That is the mode of operation of distribution
121 packages, so this should allow distros to package Cabal packages with multiple
124 - Make type field optional for tests and benchmarks [#7459](https://github.com/haskell/cabal/issues/7459) [#8115](https://github.com/haskell/cabal/pull/8115)
126 Allow the omission of the `type` field in `test-suite` and `benchmark` stanzas
127 when the type can be inferred by the presence of `main-is` or `test-module`.
129 - Improve error message for empty --allow-newer= [#7740](https://github.com/haskell/cabal/issues/7740) [#8140](https://github.com/haskell/cabal/pull/8140)
131 Instead of internal error, the message now explains that empty argument for
135 - Create Cabal-syntax for .cabal files [#7559](https://github.com/haskell/cabal/issues/7559) [#7620](https://github.com/haskell/cabal/pull/7620)
136 - Fix haddock command via Setup.hs for internal libraries [#1919](https://github.com/haskell/cabal/issues/1919) [#7827](https://github.com/haskell/cabal/pull/7827)
137 - `ghc-options` and `--with-gcc` are now passed to GHC when compiling C and C++ sources [#4439](https://github.com/haskell/cabal/issues/4439) [#5440](https://github.com/haskell/cabal/pull/5440) [#7874](https://github.com/haskell/cabal/pull/7874)
138 - 'cabal check' to fail when no upper bounds for base or Cabal are present in setup dependencies [#4683](https://github.com/haskell/cabal/issues/4683) [#5370](https://github.com/haskell/cabal/pull/5370) [#7409](https://github.com/haskell/cabal/pull/7409)
139 - --repl-options doesn’t split on whitespace [#6190](https://github.com/haskell/cabal/issues/6190) [#7799](https://github.com/haskell/cabal/pull/7799)
140 - '--repl-no-load' option skips startup modules load in REPL [#7541](https://github.com/haskell/cabal/issues/7541) [#7578](https://github.com/haskell/cabal/pull/7578)
141 - Add -c alias for --constraint command line flag [#7765](https://github.com/haskell/cabal/issues/7765) [#7766](https://github.com/haskell/cabal/pull/7766)
142 - Add "prompt" strategy when symlinking binaries. [#5672](https://github.com/haskell/cabal/pull/5672)
143 - Add fields extra-libraries-static and extra-lib-dirs-static [#6688](https://github.com/haskell/cabal/issues/6688) [#7399](https://github.com/haskell/cabal/issues/7399) [#7536](https://github.com/haskell/cabal/pull/7536)
144 - Paths passed to GHC are now relative to the current working directory
145 - Autoatically pipe auth from repo uris into curl transport. [#4743](https://github.com/haskell/cabal/issues/4743) [#7630](https://github.com/haskell/cabal/pull/7630)
146 - raise lower bound of process and remove compatibility shims [#7922](https://github.com/haskell/cabal/pull/7922)
147 - changes the cabal check warning about long synopsis, so it warns only synopsis bigger than the set size [#7932](https://github.com/haskell/cabal/issues/7932) [#7933](https://github.com/haskell/cabal/pull/7933)
148 - Remove bootstrapping plan files from version control, and simplify bootstrap update Makefile targets. [#7949](https://github.com/haskell/cabal/pull/7949)
149 - Remove deprecated file finding functions [#7955](https://github.com/haskell/cabal/pull/7955)
150 - Support GHC 9.4's `clang`-based Windows toolchain [#8062](https://github.com/haskell/cabal/pull/8062)
151 - Add support for the 64-bit S390X architecture [#8065](https://github.com/haskell/cabal/pull/8065)
152 - Add wasm32-wasi to recognized arch/os [#8096](https://github.com/haskell/cabal/pull/8096)
153 - Unmarked "visibility: public" and "build-depends: pkg:lib" syntaxes as experimental, allowing Hackage upload of packages exposing or using multiple public libraries [#6801](https://github.com/haskell/cabal/issues/6801) [#7286](https://github.com/haskell/cabal/issues/7286) [#8089](https://github.com/haskell/cabal/pull/8089)
154 - Sync repo darcs [#7137](https://github.com/haskell/cabal/pull/7137)
156 - *Cabal-syntax* Derive Eq for DependencyMap [#7849](https://github.com/haskell/cabal/issues/7849) [#8061](https://github.com/haskell/cabal/pull/8061)
157 - *Cabal-syntax* Allow trailing whitespace after flags in cabal.project [#7279](https://github.com/haskell/cabal/issues/7279) [#8006](https://github.com/haskell/cabal/pull/8006)
158 - *Cabal-syntax* Update the SPDX License List to version 3.16 [#8126](https://github.com/haskell/cabal/issues/8126) [#8127](https://github.com/haskell/cabal/pull/8127)
160 The LicenseId and LicenseExceptionId types are updated to reflect the SPDX License List version 3.16 (2022-02-06).
162 - *Cabal-syntax* Future compat for liftA2 being exported from Prelude [#8823](https://github.com/haskell/cabal/pull/8823)
164 - liftA2 will be exported from Prelude in the future(see https://github.com/haskell/core-libraries-committee/issues/50).
165 Cabal-syntax was future-proofed to have no warnings when that happens.
167 - *Cabal-syntax* cabal init -n: avoid extra blank lines [#8236](https://github.com/haskell/cabal/issues/8236) [#8292](https://github.com/haskell/cabal/pull/8292)
169 - Added fields :pkg-field:`extra-libraries-static` and
170 :pkg-field:`extra-lib-dirs-static` to allow Haskell libraries to remember
171 linker flags needed for fully static linking of system libraries into executables. [#7536](https://github.com/haskell/cabal/pull/7536)
173 - The existing field :pkg-field:`pkgconfig-depends` can used to append the relevant
174 output of ``pkg-config --libs --static`` to these new fields automatically.
175 When :pkg-field:`extra-libraries-static` is not given, it defaults to
176 :pkg-field:`extra-libraries`. When :pkg-field:`extra-lib-dirs-static` is not
177 given, it defaults to :pkg-field:`extra-lib-dirs`. [#7536](https://github.com/haskell/cabal/pull/7536)
179 - Remove the GHC version upper bound when deciding whether to filter GHC arguments
181 - Previously, for unknown new versions of GHC, it was not filtering GHC arguments at all, while now it filters them in the same way as for the last known GHC version. This seems a better default and it's one less place to update at release time. Perhaps erroring out or emitting a warning would be safer, but we already emit a general warning elsewhere.