From 56c5430763bfd4478195f6c8ca52607ea0912671 Mon Sep 17 00:00:00 2001 From: poscat Date: Sun, 5 Jan 2025 21:48:42 +0800 Subject: [PATCH] Bump Cabal-syntax from 3.12 to 3.14 --- CHANGELOG.md | 3 +++ extract-hackage-info/extract-hackage-info.cabal | 2 +- ormolu.cabal | 6 +++--- src/Ormolu/Utils/Cabal.hs | 6 +++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 783e96306..bb3bd5f18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,9 @@ * Correctly format non-promoted type-level tuples with `NoListTuplePuns`. [Issue 1146](https://github.com/tweag/ormolu/issues/1146). +* Updated to `Cabal-syntax-3.14`. [Issue + 1152](https://github.com/tweag/ormolu/issues/1152). + ## Ormolu 0.7.7.0 * Use single-line layout for parens around single-line content. [Issue diff --git a/extract-hackage-info/extract-hackage-info.cabal b/extract-hackage-info/extract-hackage-info.cabal index 756d69bc6..fe849d482 100644 --- a/extract-hackage-info/extract-hackage-info.cabal +++ b/extract-hackage-info/extract-hackage-info.cabal @@ -16,7 +16,7 @@ executable extract-hackage-info -Wunused-packages build-depends: - Cabal-syntax >=3.12 && <3.13, + Cabal-syntax >=3.14 && <3.15, aeson >=2.2 && <3, base >=4.12 && <5, binary >=0.8 && <0.9, diff --git a/ormolu.cabal b/ormolu.cabal index bb8e929fe..0e97b2f9f 100644 --- a/ormolu.cabal +++ b/ormolu.cabal @@ -93,7 +93,7 @@ library other-modules: GHC.DynFlags default-language: GHC2021 build-depends: - Cabal-syntax >=3.12 && <3.13, + Cabal-syntax >=3.14 && <3.15, Diff >=0.4 && <2, MemoTrie >=0.6 && <0.7, ansi-terminal >=0.10 && <1.2, @@ -131,7 +131,7 @@ executable ormolu autogen-modules: Paths_ormolu default-language: GHC2021 build-depends: - Cabal-syntax >=3.12 && <3.13, + Cabal-syntax >=3.14 && <3.15, base >=4.12 && <5, containers >=0.5 && <0.8, directory ^>=1.3, @@ -182,7 +182,7 @@ test-suite tests default-language: GHC2021 build-depends: - Cabal-syntax >=3.12 && <3.13, + Cabal-syntax >=3.14 && <3.15, QuickCheck >=2.14, base >=4.14 && <5, choice >=0.2.4.1 && <0.3, diff --git a/src/Ormolu/Utils/Cabal.hs b/src/Ormolu/Utils/Cabal.hs index af1f0b553..0541a6f95 100644 --- a/src/Ormolu/Utils/Cabal.hs +++ b/src/Ormolu/Utils/Cabal.hs @@ -189,17 +189,17 @@ getExtensionAndDepsMap cabalFile GenericPackageDescription {..} = extractFromLibrary Library {..} = extractFromBuildInfo (ModuleName.toFilePath <$> exposedModules) libBuildInfo extractFromExecutable Executable {..} = - extractFromBuildInfo [modulePath] buildInfo + extractFromBuildInfo [getSymbolicPath modulePath] buildInfo extractFromTestSuite TestSuite {..} = extractFromBuildInfo mainPath testBuildInfo where mainPath = case testInterface of - TestSuiteExeV10 _ p -> [p] + TestSuiteExeV10 _ p -> [getSymbolicPath p] TestSuiteLibV09 _ p -> [ModuleName.toFilePath p] TestSuiteUnsupported {} -> [] extractFromBenchmark Benchmark {..} = extractFromBuildInfo mainPath benchmarkBuildInfo where mainPath = case benchmarkInterface of - BenchmarkExeV10 _ p -> [p] + BenchmarkExeV10 _ p -> [getSymbolicPath p] BenchmarkUnsupported {} -> []