Skip to content

Commit 3917567

Browse files
ffaf1ulidtkomergify[bot]
authored
Add migration guide for #9718 (#10578)
* Remove duplicated “Other changes” subtitle * Add migration guide for #9718 PR #9718 and related PRs reshuffled and refactored Cabal API. This patch adds a simple migration guide for Cabal library users. Authored-by: Maxim Ivanov * Update release-notes/Cabal-3.14.0.0.md Co-authored-by: Maxim Ivanov <[email protected]> --------- Co-authored-by: Maxim Ivanov <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 8144494 commit 3917567

File tree

1 file changed

+52
-2
lines changed

1 file changed

+52
-2
lines changed

release-notes/Cabal-3.14.0.0.md

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ Cabal and Cabal-syntax 3.14.0.0 changelog and release notes
1414

1515
* `extra-doc-files`: Copied by Haddock to the html directory.
1616

17-
### Other changes
18-
1917
- Include package version when passing `--promised-dependency` flag [#10166](https://github.com/haskell/cabal/issues/10166) [#10248](https://github.com/haskell/cabal/pull/10248)
2018

2119
The `--promised-dependency` flag now expects an argument in the format
@@ -157,6 +155,58 @@ Cabal and Cabal-syntax 3.14.0.0 changelog and release notes
157155
configure"). This has recently caught out even Cabal devs. Clarify these
158156
messages. [#9476](https://github.com/haskell/cabal/pull/9476)
159157

158+
- In [#9718](https://github.com/haskell/cabal/pull/9718) constructors
159+
`PackageDB`: `GlobalPackageDB`, `UserPackageDB`, `SpecificPackageDB` have
160+
been moved to an auxiliary datatatype `PackageDBX`.
161+
162+
Change imports:
163+
164+
```haskell
165+
import Distribution.Simple.Compiler
166+
(PackageDB, PackageDBX (GlobalPackageDB,
167+
UserPackageDB,
168+
SpecificPackageDB))
169+
```
170+
171+
- **Fields of `ConfigFlags`, `BuildFlags`, `InstallFlags`, `TestFlags`,
172+
`BenchmarkFlags`, `HaddockFlags`, `HscolourFlags`, `SDistFlags`,
173+
`CopyFlags`, `RegisterFlags`, `CleanFlags`, `ReplFlags`**
174+
175+
These fields have partially moved to `CommonFlags`. Use corresponding
176+
pattern synonyms and/or Monoid instance of `CommonSetupFlags`.
177+
178+
Example for haddock command:
179+
180+
```diff
181+
import Distribution.Simple.Setup (HaddockFlags(..))
182+
+import Distribution.Simple.Setup.Common (CommonSetupFlags(..))
183+
184+
example =
185+
someHaddockFlags
186+
- { haddockVerbosity = a
187+
- , haddockTargets = b
188+
+ { haddockCommonFlags = mempty
189+
+ { setupVerbosity = a
190+
+ , setupTargets = b
191+
+ }
192+
}
193+
```
194+
195+
- **Additions to `SymbolicPath`, `RelativePath`**
196+
197+
Module
198+
[Distribution.Utils.Path](https://hackage.haskell.org/package/Cabal-syntax-3.14.0.0/docs/Distribution-Utils-Path.html),
199+
now provides more nuanced API that Cabal uses to keep track of filepath
200+
locations. (Hopefully, avoiding confusion which things should go where and
201+
how.)
202+
203+
In your specific circumstance, you'll need to decide how much of that nuance
204+
to keep. The function `getSymbolicPath` discards all of it, getting back the
205+
raw `FilePath`; but see the linked module's haddocks for caveats and less
206+
drastic options.
207+
208+
It may help to introduce a `CompatSymPath` typeclass.
209+
160210
- Update the SPDX License List to version 3.25
161211

162212
The LicenseId and LicenseExceptionId types are updated to reflect the SPDX

0 commit comments

Comments
 (0)