From 864fbc2cd2b0838f9310c757e0703dbd13df0e78 Mon Sep 17 00:00:00 2001 From: brandon s allbery kf8nh Date: Wed, 19 Jun 2024 14:18:10 -0400 Subject: [PATCH] changelog for 3.12.1.0 --- changelog.d/issue-10042 | 9 --- changelog.d/issue-10063 | 14 ----- changelog.d/issue-6750 | 13 ----- changelog.d/issue-8680 | 10 ---- changelog.d/issue-8875 | 10 ---- changelog.d/issue-9098-lexbraces | 19 ------- changelog.d/issue-9641 | 8 --- changelog.d/issue-9678 | 17 ------ changelog.d/issue-9736 | 12 ---- changelog.d/issue-9919 | 4 -- changelog.d/issue-9971 | 6 -- changelog.d/pkgconfig-once | 9 --- changelog.d/pr-10014 | 11 ---- changelog.d/pr-9766 | 11 ---- changelog.d/pr-9824 | 10 ---- changelog.d/pr-9878 | 8 --- changelog.d/pr-9950 | 21 ------- release-notes/Cabal-3.12.0.0.md | 8 ++- release-notes/Cabal-3.12.1.0.md | 56 +++++++++++++++++++ ...-3.12.x.0.md => cabal-install-3.12.1.0.md} | 50 ++++++++++++----- 20 files changed, 99 insertions(+), 207 deletions(-) delete mode 100644 changelog.d/issue-10042 delete mode 100644 changelog.d/issue-10063 delete mode 100644 changelog.d/issue-6750 delete mode 100644 changelog.d/issue-8680 delete mode 100644 changelog.d/issue-8875 delete mode 100644 changelog.d/issue-9098-lexbraces delete mode 100644 changelog.d/issue-9641 delete mode 100644 changelog.d/issue-9678 delete mode 100644 changelog.d/issue-9736 delete mode 100644 changelog.d/issue-9919 delete mode 100644 changelog.d/issue-9971 delete mode 100644 changelog.d/pkgconfig-once delete mode 100644 changelog.d/pr-10014 delete mode 100644 changelog.d/pr-9766 delete mode 100644 changelog.d/pr-9824 delete mode 100644 changelog.d/pr-9878 delete mode 100644 changelog.d/pr-9950 create mode 100644 release-notes/Cabal-3.12.1.0.md rename release-notes/{WIP-cabal-install-3.12.x.0.md => cabal-install-3.12.1.0.md} (87%) diff --git a/changelog.d/issue-10042 b/changelog.d/issue-10042 deleted file mode 100644 index e254210c028..00000000000 --- a/changelog.d/issue-10042 +++ /dev/null @@ -1,9 +0,0 @@ -synopsis: Don't recommend deprecated/removed 'extensions:' field -packages: Cabal -prs: #10044 -issues: #10042 - -description: { - When applicable, field 'default-extensions:' is recommended (rather than - deprecated/removed 'extensions:'). -} diff --git a/changelog.d/issue-10063 b/changelog.d/issue-10063 deleted file mode 100644 index 568ffe68a9b..00000000000 --- a/changelog.d/issue-10063 +++ /dev/null @@ -1,14 +0,0 @@ -synopsis: External commands now propagate exit code from child process -packages: cabal-install -prs: #10100 -issues: #10063 - -description: { - The exit code from an external command is now propagated as the exit code of - cabal-install when invoked by calling an external command. - - For example, if your external command exits with code 1, then cabal-install will - also exit with code 1. - - This mechanism can be used by an external command to signal failure. -} diff --git a/changelog.d/issue-6750 b/changelog.d/issue-6750 deleted file mode 100644 index e392258267b..00000000000 --- a/changelog.d/issue-6750 +++ /dev/null @@ -1,13 +0,0 @@ -synopsis: Make Setup copy/install succeed when there's no executable or library -packages: Cabal -prs: #9926 -issues: #6750 - -description: { - Historically the Setup copy and install steps would fail if the package didn't - contain an executable or library component. In this case there's nothing to do. - - This required workarounds for downstream users of Cabal to handle this edge case. - Now that this error has been downgraded to a warning, Cabal will succeed if - there's nothing to do. -} diff --git a/changelog.d/issue-8680 b/changelog.d/issue-8680 deleted file mode 100644 index 0511f26fe9d..00000000000 --- a/changelog.d/issue-8680 +++ /dev/null @@ -1,10 +0,0 @@ -synopsis: `cabal init` should not suggest Cabal < 2.0 -packages: Cabal -issues: #8680 -prs: #8700 - -description: { - -'cabal init' no longer suggests users to set cabal-version to less than 2.0 - -} diff --git a/changelog.d/issue-8875 b/changelog.d/issue-8875 deleted file mode 100644 index 6642609a0e6..00000000000 --- a/changelog.d/issue-8875 +++ /dev/null @@ -1,10 +0,0 @@ -synopsis: Allow whitespace in targets -packages: cabal-install -prs: #10032 -issues: #8875 - -description: { -Allow spaces in the final component of target selectors. This resolves an issue -where using absolute paths in selectors can fail if there is whitespace in the -parent directories of the project. -} diff --git a/changelog.d/issue-9098-lexbraces b/changelog.d/issue-9098-lexbraces deleted file mode 100644 index b637c08a34b..00000000000 --- a/changelog.d/issue-9098-lexbraces +++ /dev/null @@ -1,19 +0,0 @@ -synopsis: Add LexBraces lexer warning -packages: Cabal-syntax -issues: #9098 -prs: #9099 - -description: { - -LexBraces warning is issued when brace delimiting syntax is used. -This way, using `readFields'`, a low-lever consumer may decide -whether braces were used. - -(Looking for a brace character in the input is imprecise, as braces can occur inside field content). - -This warning is not propagated to parser warnings, -so e.g. readGenericPackageDescription doesn't warn about it. -This is because all parser warnings prevent uploads to Hackage, -and using braces (or not) is opinionated choice. - -} diff --git a/changelog.d/issue-9641 b/changelog.d/issue-9641 deleted file mode 100644 index 34666f0ad59..00000000000 --- a/changelog.d/issue-9641 +++ /dev/null @@ -1,8 +0,0 @@ -synopsis: offline flag applied to `source-repository-package`s -packages: Cabal-install -prs: #9771 -issues: #9641 - -description: { -`--offline` flag is already used to block access to Hackage. Now with this PR, this also applies to remote dependency `source-repository-package` in `cabal.project`. -} diff --git a/changelog.d/issue-9678 b/changelog.d/issue-9678 deleted file mode 100644 index cdcf8405311..00000000000 --- a/changelog.d/issue-9678 +++ /dev/null @@ -1,17 +0,0 @@ -synopsis: Clarify the semantics of the -package-db flag -packages: cabal-install -prs: -issues: #9678 -prs: #9683 - -description: { - -The `--package-db` flag now only applies to the default -immutable initial package stack rather than also applying to the store -package database. - -This fixes an assertion failure which was triggered when using -package-db and also -clarifies how it should interact with `--store-dir` and `--dist-dir` flags. - -} - diff --git a/changelog.d/issue-9736 b/changelog.d/issue-9736 deleted file mode 100644 index f5a9dc1abee..00000000000 --- a/changelog.d/issue-9736 +++ /dev/null @@ -1,12 +0,0 @@ -synopsis: Add support for `GHC2024` -packages: Cabal cabal-install -issues: #9736 -prs: #9791 - -description: { - -Support for the `GHC2024` language edition, introduced by GHC 9.10, has been -added. It can now be used in the `default-language` and `other-languages` -fields, and will be offered as an option by `cabal init`. - -} diff --git a/changelog.d/issue-9919 b/changelog.d/issue-9919 deleted file mode 100644 index a4fe32bbdef..00000000000 --- a/changelog.d/issue-9919 +++ /dev/null @@ -1,4 +0,0 @@ -synopsis: Fix --program-suffix resulting in invalid installation -packages: cabal-install -issues: #8823 #9919 -prs: #10056 diff --git a/changelog.d/issue-9971 b/changelog.d/issue-9971 deleted file mode 100644 index 9bfb2e4822f..00000000000 --- a/changelog.d/issue-9971 +++ /dev/null @@ -1,6 +0,0 @@ -synopsis: Renders project configuration provenance as a list of canonical paths -packages: cabal-install cabal-install-solver -prs: #9985 -issues: #9971 - -description: Removes interleaved rendering of project imports. diff --git a/changelog.d/pkgconfig-once b/changelog.d/pkgconfig-once deleted file mode 100644 index bdb8e4b511b..00000000000 --- a/changelog.d/pkgconfig-once +++ /dev/null @@ -1,9 +0,0 @@ -synopsis: PkgConfig individual calls -prs: #9134 -packages: cabal-install-solver - -description: { - -- `cabal` invokes `pkg-config` individually for each lib if querying for all doesn't return the expected result - -} diff --git a/changelog.d/pr-10014 b/changelog.d/pr-10014 deleted file mode 100644 index 541b4c72d18..00000000000 --- a/changelog.d/pr-10014 +++ /dev/null @@ -1,11 +0,0 @@ -synopsis: Update ghc args normalization and ghc option rendering -packages: Cabal -issues: #9729 -prs: #10014 - -description: { - -The flags -fdiagnostics-as-json, -fprint-error-index-lists, -fbreak-points, -dipe-stats, -ffamily-application-cache, -fprint-redundant-promotion-ticks, -fshow-error-context and -funoptimized-core-for-interpreter have been added to the flags that do not cause recompilation. - ---{enable,disable}-split-objs is not shown on in the helper for GHC >= 9.8 -} diff --git a/changelog.d/pr-9766 b/changelog.d/pr-9766 deleted file mode 100644 index 3d10abb659f..00000000000 --- a/changelog.d/pr-9766 +++ /dev/null @@ -1,11 +0,0 @@ -synopsis: Warn on missing `default-language` -packages: Cabalcabal-install -prs: #9766 -issues: #9620 - -description: { - -- To help the adoption of GHC language editions, `cabal check` will now - warn about missing `default-language`. - -} diff --git a/changelog.d/pr-9824 b/changelog.d/pr-9824 deleted file mode 100644 index 168b9c98e64..00000000000 --- a/changelog.d/pr-9824 +++ /dev/null @@ -1,10 +0,0 @@ -synopsis: Abbrevate solver rejection messages with installed versions -packages: cabal-install-solver -prs: #9824 -issues: #9823 - -description: { - -Abbreviate solver rejection messages even in the presence of installed versions. - -} diff --git a/changelog.d/pr-9878 b/changelog.d/pr-9878 deleted file mode 100644 index c4c5de13f61..00000000000 --- a/changelog.d/pr-9878 +++ /dev/null @@ -1,8 +0,0 @@ -synopsis: Add mhs as a known Haskell compiler -packages: Cabal -issues: -prs: #9878 - -description: { -This simply add MHS to the enumeration of known Haskell compilers. -} diff --git a/changelog.d/pr-9950 b/changelog.d/pr-9950 deleted file mode 100644 index a961c953639..00000000000 --- a/changelog.d/pr-9950 +++ /dev/null @@ -1,21 +0,0 @@ -synopsis: Re-instate `initialBuildSteps` -packages: Cabal -issues: #9856 -prs: #9950 - -description: { - -The `initialBuildSteps` function from `Distribution.Simple.Build`, which had -been hastily removed, has been reinstated. - -It now comes with a deprecation warning: calling that function does not suffice -to prepare the sources for a package, as there are other steps that one might -also need to perform: - - - running pre-processors (such as alex/happy) - - running pre-build hooks or custom logic - (in build-type: Hooks or build-type: Custom or Configure) - -Consumers wanting to prepare the sources of a package, e.g. in order to launch a -REPL session, are advised to run `setup repl --repl-multi-file=` instead. -} diff --git a/release-notes/Cabal-3.12.0.0.md b/release-notes/Cabal-3.12.0.0.md index 3825c9e8985..60ab5d51479 100644 --- a/release-notes/Cabal-3.12.0.0.md +++ b/release-notes/Cabal-3.12.0.0.md @@ -55,7 +55,7 @@ Cabal and Cabal-syntax 3.12.0.0 changelog and release notes `filterPackageChecksById`, this can be used by third-party tools to filter warnings. -- Add support for `GHC2024` [#9736](https://github.com/haskell/cabal/issues/9736) +- Add support for `GHC2024` [#9736](https://github.com/haskell/cabal/issues/9736) [#9791](https://github.com/haskell/cabal/pull/9791) Support for the `GHC2024` language edition, introduced by GHC 9.10, has been added. It can now be used in the `default-language` and `other-languages` @@ -73,9 +73,13 @@ Cabal and Cabal-syntax 3.12.0.0 changelog and release notes If you are dealing with a custom setup, you have to invoke `./Setup repl --repl-multi-file`. +- Cabal labeled messages + + As with GHC and Stack, Cabal and cabal-install now generate warnings and errors prefixed with error codes of the form `[Cabal-xxxxx]`. These will be documented on https://errors.haskell.org, although very few are as yet. + ### Other changes -- `cabal init` should not suggest Cabal < 2.0 [#8680](https://github.com/haskell/cabal/issues/8680) +- `cabal init` should not suggest Cabal < 2.0 [#8680](https://github.com/haskell/cabal/issues/8680) [#8700](https://github.com/haskell/cabal/pull/8700) 'cabal init' no longer suggests users to set cabal-version to less than 2.0. diff --git a/release-notes/Cabal-3.12.1.0.md b/release-notes/Cabal-3.12.1.0.md new file mode 100644 index 00000000000..6876ba837cd --- /dev/null +++ b/release-notes/Cabal-3.12.1.0.md @@ -0,0 +1,56 @@ +Cabal and Cabal-syntax 3.12.1.0 changelog and release notes +--- + + +### Significant changes + +- Update ghc args normalization and ghc option rendering [#9729](https://github.com/haskell/cabal/issues/9729) [#10014](https://github.com/haskell/cabal/pull/10014) + + The flags -fdiagnostics-as-json, -fprint-error-index-lists, -fbreak-points, -dipe-stats, -ffamily-application-cache, -fprint-redundant-promotion-ticks, -fshow-error-context and -funoptimized-core-for-interpreter have been added to the flags that do not cause recompilation. + +- Warn on missing `default-language` [#9620](https://github.com/haskell/cabal/issues/9620) [#9766](https://github.com/haskell/cabal/pull/9766) + + - To help the adoption of GHC language editions, `cabal check` will now + warn about missing `default-language`. + +- Add mhs as a known Haskell compiler [#9878](https://github.com/haskell/cabal/pull/9878) + + This simply add MHS to the enumeration of known Haskell compilers. + +- Re-instate `initialBuildSteps` [#9856](https://github.com/haskell/cabal/issues/9856) [#9950](https://github.com/haskell/cabal/pull/9950) + + The `initialBuildSteps` function from `Distribution.Simple.Build`, which had + been hastily removed, has been reinstated. + + It now comes with a deprecation warning: calling that function does not suffice + to prepare the sources for a package, as there are other steps that one might + also need to perform: + + - running pre-processors (such as alex/happy) + - running pre-build hooks or custom logic + (in build-type: Hooks or build-type: Custom or Configure) + + Consumers wanting to prepare the sources of a package, e.g. in order to launch a + REPL session, are advised to run `setup repl --repl-multi-file=` instead. + +- Cabal labeled messages + + As with GHC and Stack, Cabal and cabal-install now generate warnings and errors prefixed with error codes of the form `[Cabal-xxxxx]`. These will be documented on https://errors.haskell.org, although very few are as yet. + + This change was actually present in Cabal-3.12.0.0, but was inadvertently omitted from the changelog. + +### Other changes + +- Don't recommend deprecated/removed 'extensions:' field [#10042](https://github.com/haskell/cabal/issues/10042) [#10044](https://github.com/haskell/cabal/pull/10044) + + When applicable, field 'default-extensions:' is recommended (rather than + deprecated/removed 'extensions:'). + +- Make Setup copy/install succeed when there's no executable or library [#6750](https://github.com/haskell/cabal/issues/6750) [#9926](https://github.com/haskell/cabal/pull/9926) + + Historically the Setup copy and install steps would fail if the package didn't + contain an executable or library component. In this case there's nothing to do. + + This required workarounds for downstream users of Cabal to handle this edge case. + Now that this error has been downgraded to a warning, Cabal will succeed if + there's nothing to do. diff --git a/release-notes/WIP-cabal-install-3.12.x.0.md b/release-notes/cabal-install-3.12.1.0.md similarity index 87% rename from release-notes/WIP-cabal-install-3.12.x.0.md rename to release-notes/cabal-install-3.12.1.0.md index 34d84982806..beb9727c277 100644 --- a/release-notes/WIP-cabal-install-3.12.x.0.md +++ b/release-notes/cabal-install-3.12.1.0.md @@ -1,8 +1,4 @@ -Pre-release cabal-install 3.12.0.0/3.11.0.0 changelog and release notes. - -This file will be edited and the changes incorprated into the official -3.12.1.0 cabal-install and cabal-install-solver release notes. - +cabal-install 3.12.1.0 changelog and release notes. --- ### Significant changes @@ -36,17 +32,14 @@ This file will be edited and the changes incorprated into the official a flag which specifies which libraries should be included in the coverage report for some testsuite. -- Add `cabal path` command [#8879](https://github.com/haskell/cabal/pull/8879) +- Add `cabal path` command [#8879](https://github.com/haskell/cabal/pull/8879) [#9673](https://github.com/haskell/cabal/pull/9673) The `cabal path` command prints the file system paths used by Cabal. It is intended for use by tooling that needs to read or modify Cabal data, such that it does not need to replicate the complicated logic for respecting `CABAL_DIR`, `CABAL_CONFIG`, etc. -- Redesign `cabal path` command to account for projects [#9673](https://github.com/haskell/cabal/pull/9673) - - Previously, `cabal path` was only able to query from the global configuration file, e.g., `~/.cabal/config` or the XDG equivalent. - We take the foundations and enhance `cabal path` to take project configuration, such as `cabal.project`, into account. + It will obey a `cabal.project` if present. Additionally, we add support for multiple output formats, such as key-value pairs and json. @@ -62,7 +55,7 @@ This file will be edited and the changes incorprated into the official The json output format is versioned by the cabal-install version, which is part of the json object. Thus, all result objects contain at least the key "cabal-install-version". - We expand the `cabal path` to also produce information of the compiler that is going to be used in a `cabal build` or `cabal repl` invocation. + It also produces information of the compiler that is going to be used in a `cabal build` or `cabal repl` invocation. To do that, we re-configure the compiler program, and outputs the location, version and compiler flavour. This is helpful for downstream tools, such as HLS, to figure out the GHC version required to compile a project with, without dependency solving. @@ -121,7 +114,7 @@ This file will be edited and the changes incorprated into the official name did not match exactly. Now they will be cached even if the header's capitalization is different. -- Clarify the semantics of the `--package-db` flag [#9678](https://github.com/haskell/cabal/issues/9678) +- Clarify the semantics of the `--package-db` flag [#9678](https://github.com/haskell/cabal/issues/9678) [#9683](https://github.com/haskell/cabal/pull/9683) The `--package-db` flag now only applies to the default immutable initial package stack rather than also applying to the store @@ -257,7 +250,7 @@ This file will be edited and the changes incorprated into the official This relies on the "Project Unit Id" which is available since GHC 9.8.1, older versions of GHC do not benefit from this change. -- Add support for `GHC2024` [#9736](https://github.com/haskell/cabal/issues/9736) +- Add support for `GHC2024` [#9736](https://github.com/haskell/cabal/issues/9736) [#9791](https://github.com/haskell/cabal/pull/9791) Support for the `GHC2024` language edition, introduced by GHC 9.10, has been added. It can now be used in the `default-language` and `other-languages` @@ -273,6 +266,23 @@ This file will be edited and the changes incorprated into the official - Add language extension `TypeAbstractions` [#9496](https://github.com/haskell/cabal/issues/9496) [#9502](https://github.com/haskell/cabal/pull/9502) +- cabal-install labeled messages + + As with GHC and Stack, Cabal and cabal-install now generate warnings and errors prefixed with error codes of the form `[Cabal-xxxxx]`. These will be documented on https://errors.haskell.org, although very few are as yet. + +- offline flag applied to `source-repository-package`s [#9641](https://github.com/haskell/cabal/issues/9641) [#9771](https://github.com/haskell/cabal/pull/9771) + + `--offline` flag is already used to block access to Hackage. Now with this PR, this also applies to remote dependency `source-repository-package` in `cabal.project`. + +- Fix --program-suffix resulting in invalid installation [#8823](https://github.com/haskell/cabal/issues/8823) [#9919](https://github.com/haskell/cabal/issues/9919) [#10056](https://github.com/haskell/cabal/pull/10056) + + Formerly, using `--program-suffix` resulted in bad symlinks into the store. This has been corrected. + +- Warn on missing `default-language` [#9620](https://github.com/haskell/cabal/issues/9620) [#9766](https://github.com/haskell/cabal/pull/9766) + + - To help the adoption of GHC language editions, `cabal check` will now + warn about missing `default-language`. + ### Other changes - Script cache dir is the base16 hash of the canonical path of the script. [#9459](https://github.com/haskell/cabal/pull/9459) @@ -341,3 +351,17 @@ This file will be edited and the changes incorprated into the official The "Executing·install·plan··serially" and other similar "Executing install plan··..." outputs no longer contain double spaces. + +- Allow whitespace in targets [#8875](https://github.com/haskell/cabal/issues/8875) [#10032](https://github.com/haskell/cabal/pull/10032) + + Allow spaces in the final component of target selectors. This resolves an issue + where using absolute paths in selectors can fail if there is whitespace in the + parent directories of the project. + +- Renders project configuration provenance as a list of canonical paths [#9971](https://github.com/haskell/cabal/issues/9971) [#9985](https://github.com/haskell/cabal/pull/9985) + + Removes interleaved rendering of project imports. + +- Abbrevate solver rejection messages with installed versions [#9823](https://github.com/haskell/cabal/issues/9823) [#9824](https://github.com/haskell/cabal/pull/9824) + + Abbreviate solver rejection messages even in the presence of installed versions.