cabal-plan 0.6.2.0 → 0.7.0.0
raw patch · 4 files changed
+33/−11 lines, 4 filesdep ~Cabaldep ~ansi-terminaldep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: Cabal, ansi-terminal, base, optparse-applicative
API changes (from Hackage documentation)
+ Cabal.Plan: RepoLocalNoIndex :: !FilePath -> Repo
Files
- ChangeLog.md +11/−0
- cabal-plan.cabal +7/−6
- src-exe/LicenseReport.hs +9/−1
- src/Cabal/Plan.hs +6/−4
ChangeLog.md view
@@ -1,5 +1,16 @@ # Revision history for `cabal-plan` +## 0.7.0.0++### `lib:cabal-plan` Libraru++* Support `local+noindex` style repositories: New `Repo` constructor: `RepoLocalNoIndex`.+* Support newer versions of dependencies (GHC-8.10, aeson-1.5, optics-core-0.3)++### `exe:cabal-plan` Executable++* Support `Cabal-3.2`+ ## 0.6.2.0 ### `lib:cabal-plan` Library
cabal-plan.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: cabal-plan-version: 0.6.2.0+version: 0.7.0.0 synopsis: Library and utility for processing cabal's plan.json file description: {@@ -38,7 +38,8 @@ build-type: Simple tested-with:- GHC==8.8.1,+ GHC==8.10.1+ GHC==8.8.3, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2,@@ -76,8 +77,8 @@ RecordWildCards exposed-modules: Cabal.Plan - build-depends: base (>= 4.6 && <4.10) || ^>= 4.10 || ^>=4.11 || ^>=4.12 || ^>=4.13- , aeson ^>= 1.2.0 || ^>= 1.3.0 || ^>=1.4.0.0+ build-depends: base (>= 4.6 && <4.10) || ^>= 4.10 || ^>=4.11 || ^>=4.12 || ^>=4.13 || ^>=4.14+ , aeson ^>= 1.2.0 || ^>= 1.3.0 || ^>=1.4.0.0 || ^>=1.5.0.0 , bytestring ^>= 0.10.0 , containers ^>= 0.5.0 || ^>= 0.6.0.1 , text ^>= 1.2.2@@ -113,7 +114,7 @@ , async ^>= 2.2.2 , ansi-terminal ^>=0.10 , base-compat ^>=0.11- , optics-core ^>= 0.2+ , optics-core ^>= 0.2 || ^>= 0.3 , optparse-applicative ^>= 0.15.0.0 , parsec ^>= 3.1.13 , process ^>= 1.4.3.0 || ^>=1.6.3.0@@ -125,7 +126,7 @@ , vector ^>= 0.12.0.1 if flag(license-report)- build-depends: Cabal ^>= 2.2.0.1 || ^>= 2.4.0.1 || ^>= 3.0.0.0+ build-depends: Cabal ^>= 2.2.0.1 || ^>= 2.4.0.1 || ^>= 3.0.0.0 || ^>=3.2.0.0 , tar ^>= 0.5.1.0 , zlib ^>= 0.6.2 , filepath ^>= 1.4.1.1
src-exe/LicenseReport.hs view
@@ -36,6 +36,10 @@ import Prelude () import Prelude.Compat +#if MIN_VERSION_Cabal(3,2,0)+import Distribution.Utils.ShortText (fromShortText)+#endif+ -- | Read tarball lazily (and possibly decompress) readTarEntries :: FilePath -> IO [Tar.Entry] readTarEntries idxtar = do@@ -156,7 +160,11 @@ gpd <- maybe (fail "parseGenericPackageDescriptionMaybe") pure $ parseGenericPackageDescriptionMaybe x - let desc = escapeDesc $ synopsis $ packageDescription gpd+ let desc = escapeDesc+#if MIN_VERSION_Cabal(3,2,0)+ $ fromShortText+#endif+ $ synopsis $ packageDescription gpd lic = license $ packageDescription gpd -- cr = copyright $ packageDescription gpd lfs = licenseFiles $ packageDescription gpd
src/Cabal/Plan.hs view
@@ -119,6 +119,7 @@ = RepoLocal !FilePath | RepoRemote !URI | RepoSecure !URI+ | RepoLocalNoIndex !FilePath deriving (Show,Eq,Ord) -- | Equivalent to @Cabal@\'s @Distribution.Client.Types.Repo@@@ -282,10 +283,11 @@ parseJSON = withObject "Repo" $ \o -> do ty <- o .: "type" case ty :: Text of- "local-repo" -> RepoLocal <$> o .: "path"- "remote-repo" -> RepoRemote <$> o .: "uri"- "secure-repo" -> RepoSecure <$> o .: "uri"- _ -> fail "invalid Repo \"type\""+ "local-repo" -> RepoLocal <$> o .: "path"+ "remote-repo" -> RepoRemote <$> o .: "uri"+ "secure-repo" -> RepoSecure <$> o .: "uri"+ "local-repo-no-index" -> RepoLocalNoIndex <$> o .: "path"+ _ -> fail "invalid Repo \"type\"" instance FromJSON SourceRepo where parseJSON = withObject "SourceRepo" $ \o -> do