diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index b03b1b99ada..8303a65e7d5 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -271,7 +271,7 @@ preProcessInternalDeps specVer gpd transformD :: Dependency -> [Dependency] transformD (Dependency pn vr ln) - | pn == thisPn = + | pn == thisPn && specVer < CabalSpecV3_0 = if LMainLibName `NES.member` ln then Dependency thisPn vr mainLibSet : sublibs else sublibs @@ -282,9 +282,12 @@ preProcessInternalDeps specVer gpd ] transformD d = [d] + -- Always perform transformation for mixins as syntax was only introduced in 3.4 + -- This guard is uncessary as no transformations take place when cabalSpec < CabalSpecV3_4 but + -- it more clearly signifies the intent. transformM :: Mixin -> Mixin transformM (Mixin pn (LSubLibName uqn) inc) - | pn == thisPn = + | pn == thisPn && specVer < CabalSpecV3_4 = mkMixin (unqualComponentNameToPackageName uqn) LMainLibName inc transformM m = m diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.format b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.format index d209d572be0..255c71de998 100644 --- a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.format +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.format @@ -6,7 +6,7 @@ library default-language: Haskell2010 build-depends: base, - sublib + issue:sublib library sublib default-language: Haskell2010 @@ -15,10 +15,10 @@ executable demo-a main-is: Main.hs build-depends: issue, - sublib + issue:sublib executable demo-b main-is: Main.hs build-depends: issue, - sublib + issue:sublib diff --git a/cabal-validate/src/Main.hs b/cabal-validate/src/Main.hs index 7164f3f8cc4..bf5e30a26c2 100644 --- a/cabal-validate/src/Main.hs +++ b/cabal-validate/src/Main.hs @@ -290,7 +290,7 @@ runHackageTests opts let -- See #10284 for why this value is pinned. - hackageTestsIndexState = "--index-state=2024-08-25" + hackageTestsIndexState = "--index-state=2025-01-12" hackageTest args = timedWithCwd