Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Changes in UNRELEASED
- Infer `cabal-version: 3.0` when custom setup has sublibraries as
dependencies.
## Changes in 0.40.0
- Infer `cabal-version: 3.4` (rather than `cabal-version: 3.0`) when a section
has sublibraries as dependencies. Make the same inference when custom setup
has such dependencies.

## Changes in 0.39.6
- Add support for top-level field `codeberg`
Expand Down
2 changes: 1 addition & 1 deletion src/Hpack/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ ensureRequiredCabalVersion inferredLicense pkg@Package{..} = pkg {
hasPackageInfoModule = any (== packageInfoModule)

subLibDepsSyntaxCabalVersion :: CabalVersion
subLibDepsSyntaxCabalVersion = makeVersion [3,0]
subLibDepsSyntaxCabalVersion = makeVersion [3,4]

internalLibsCabalVersion :: Map String (Section Library) -> Maybe CabalVersion
internalLibsCabalVersion internalLibraries
Expand Down
4 changes: 2 additions & 2 deletions test/EndToEndSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ spec = around_ (inTempDirectoryNamed "my-package") $ do
Paths_my_package
build-depends:
foo:bar
|]) {packageCabalVersion = "3.0"}
|]) {packageCabalVersion = "3.4"}

it "accepts list of dependencies" $ do
[i|
Expand Down Expand Up @@ -1315,7 +1315,7 @@ spec = around_ (inTempDirectoryNamed "my-package") $ do
custom-setup:
dependencies:
- pkg:lib
|] `shouldRenderTo` customSetupWithCabalVersion "3.0" [i|
|] `shouldRenderTo` customSetupWithCabalVersion "3.4" [i|
setup-depends:
pkg:lib
|]
Expand Down
Loading