simple-cabal 0.2.1 → 0.2.2
raw patch · 4 files changed
+25/−10 lines, 4 filesdep ~CabalPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: Cabal
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- LICENSE +1/−1
- simple-cabal.cabal +2/−2
- src/SimpleCabal.hs +18/−7
ChangeLog.md view
@@ -2,6 +2,10 @@ `simple-cabal` uses [PVP Versioning](https://pvp.haskell.org) +## 0.2.2 (2026-11-18, @juhp)+- support Cabal 3.18 (with local normalVerb)+- allBuildInfo: drop the haddock annotation+ ## 0.2.1 (2026-02-08, @juhp) - mark allBuildInfo deprecated - add readFinalPackageDescription' (fixes #4)
LICENSE view
@@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2019, Jens Petersen+Copyright (c) 2019-2026, Jens Petersen All rights reserved. Redistribution and use in source and binary forms, with or without
simple-cabal.cabal view
@@ -1,6 +1,6 @@ cabal-version: >= 1.10 name: simple-cabal-version: 0.2.1+version: 0.2.2 synopsis: Cabal compatibility wrapper library description: Find and read .cabal files, and a Cabal dependency compatibility layer.@@ -15,7 +15,7 @@ build-type: Simple extra-source-files: README.md , ChangeLog.md-tested-with: GHC == 9.14.1, GHC == 9.12.3, GHC == 9.10.2, GHC == 9.8.4,+tested-with: GHC == 9.14.1, GHC == 9.12.4, GHC == 9.10.3, GHC == 9.8.4, GHC == 9.6.7, GHC == 9.4.8, GHC == 9.2.8, GHC == 9.0.2, GHC == 8.10.7, GHC == 8.8.4, GHC == 8.6.5, GHC == 8.4.4, GHC == 8.2.2, GHC == 8.0.2
src/SimpleCabal.hs view
@@ -19,7 +19,7 @@ setupDependencies, testsuiteDependencies, - allBuildInfo, -- ^ deprecated by allLibraries et al+ allBuildInfo, -- deprecated by allLibraries et al allLibraries, BuildInfo (..), Library(..),@@ -191,8 +191,11 @@ import Distribution.Text (simpleParse) -import Distribution.Verbosity (normal, Verbosity- )+import Distribution.Verbosity (normal, Verbosity,+#if MIN_VERSION_Cabal(3,18,0)+ mkVerbosity, defaultVerbosityHandles+#endif+ ) #if MIN_VERSION_Cabal(2,2,0) import Distribution.Pretty (prettyShow)@@ -241,12 +244,20 @@ filter (\ f -> takeExtension f == ext && listToMaybe f /= Just '.') <$> getDirectoryContents dir +normalVerb :: Verbosity+normalVerb =+#if MIN_VERSION_Cabal(3,18,0)+ mkVerbosity defaultVerbosityHandles normal+#else+ normal+#endif+ -- | Get the package name-version from the .cabal file in the current directory. -- -- @since 0.0.0.1 getPackageId :: IO PackageIdentifier getPackageId = do- gpd <- findCabalFile >>= readGenericPackageDescription' normal+ gpd <- findCabalFile >>= readGenericPackageDescription' normalVerb return $ package $ packageDescription gpd #if MIN_VERSION_Cabal(2,2,0)@@ -300,7 +311,7 @@ readFinalPackageDescription :: [(FlagName, Bool)] -> FilePath -> IO PackageDescription readFinalPackageDescription flags cabalfile =- readGenericPackageDescription' normal cabalfile >>=+ readGenericPackageDescription' normalVerb cabalfile >>= makeFinalPackageDescription flags -- | like readFinalPackageDescription but with a verbose parameter@@ -327,7 +338,7 @@ #else (compiler, _) <- configCompiler #endif- (Just GHC) Nothing Nothing defaultProgramDb normal+ (Just GHC) Nothing Nothing defaultProgramDb normalVerb #if MIN_VERSION_Cabal(1,22,0) return (compilerInfo compiler) #else@@ -408,7 +419,7 @@ #if MIN_VERSION_Cabal(3,14,0) do file <- withCurrentDirectory dir $- interpretSymbolicPath Nothing <$> DSU.tryFindPackageDesc normal Nothing+ interpretSymbolicPath Nothing <$> DSU.tryFindPackageDesc normalVerb Nothing return $ dir </> file #elif MIN_VERSION_Cabal(3,0,0) DSU.tryFindPackageDesc normal dir