packages feed

hackage-cli 0.2.0.0 → 0.3.0.0

raw patch · 7 files changed

+49/−71 lines, 7 filesdep +cabal-adddep ~Cabaldep ~aesondep ~basePVP ok

version bump matches the API change (PVP)

Dependencies added: cabal-add

Dependency ranges changed: Cabal, aeson, base, bytestring, containers, deepseq, directory, filepath, http-io-streams, io-streams, microlens, microlens-mtl, microlens-th, optparse-applicative, pretty, tar, tasty, text, time, zlib

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,11 +1,21 @@ # Changelog for hackage-cli +## 0.3.0.0++_Andreas Abel, 2026-08-23_++- Remove `--message` option from `add-bound` command and make it work with `common` stanzas+  (Bodigrim, PR [#76](https://github.com/hackage-trustees/hackage-cli/pull/76)).+- Dropped support for GHC < 9.4.8.++Builds with `Cabal 3.8 - 3.16` and `GHC 9.4.8 - 9.14.1`.+ ## 0.2.0.0  _Andreas Abel, 2026-04-18_  - Remove `push-candidate` command-  (PR [#79](https://github.com/hackage-trustees/hackage-cli/pull/79)).+  (PR [#71](https://github.com/hackage-trustees/hackage-cli/pull/71)).  Builds with `Cabal 3.4 - 3.16` and `GHC 8.2 - 9.14.1`. 
hackage-cli.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.4 name:                hackage-cli-version:             0.2.0.0+version:             0.3.0.0  synopsis:            CLI tool for Hackage description:@@ -24,14 +24,6 @@   GHC == 9.8.4   GHC == 9.6.7   GHC == 9.4.8-  GHC == 9.2.8-  GHC == 9.0.2-  -- -- 2026-04-18: Stop testing GHC 8 on CI-  -- GHC == 8.10.7-  -- GHC == 8.8.4-  -- GHC == 8.6.5-  -- GHC == 8.4.4-  -- GHC == 8.2.2  extra-doc-files:   CHANGELOG.md@@ -43,8 +35,6 @@   -- Supported GHC versions when building with stack:   stack-9.12.yaml   stack-9.10.yaml-  stack-9.8.yaml-  stack-9.6.yaml  source-repository head   Type:     git@@ -56,13 +46,14 @@   hs-source-dirs:      lib   ghc-options:         -Wall -Wcompat +  -- lower bounds from lts-21.25 (GHC 9.4.8)   build-depends:-    , base         >= 4.10.0.0 && < 5-    , bytestring   >= 0.10.4.0 && < 0.13-    , Cabal        >= 3.4      && < 3.17-    , containers   >= 0.5.0.0  && < 1+    , base         >= 4.17.2.1 && < 5+    , bytestring   >= 0.11.5.3 && < 0.13+    , Cabal        >= 3.8.1.0  && < 3.17+    , containers   >= 0.6.7    && < 1     , mtl          >= 2.2.2    && < 2.3   || >= 2.3.1 && < 2.4-    , pretty      ^>= 1.1.2+    , pretty      ^>= 1.1.3.6    exposed-modules:     Distribution.Server.Util.CabalRevisions@@ -78,10 +69,10 @@     , bytestring     , Cabal     , cabal-revisions-    , tasty         >= 1.0      && < 1.6+    , tasty         >= 1.4.3    && < 1.6         -- tasty-1.0 for stack-8.2.2.yaml     , tasty-golden ^>= 2.3.2-    , filepath      >= 1.4.0.0  && < 1.6+    , filepath      >= 1.4.2.2  && < 1.6  executable hackage-cli   default-language:    Haskell2010@@ -116,26 +107,26 @@     , mtl    build-depends:-    , aeson                  >= 1.2.4.0  && < 2.3-        -- aeson-1.2.4.0 for stack-8.2.2.yaml+    , aeson                  >= 2.1.2.1  && < 2.4     , base-compat            >= 0.13.0   && < 1         -- base-compat for applyWhen (added to base in 4.18)-    , deepseq               ^>= 1.4.0.0 || ^>= 1.5.0.0-    , directory             ^>= 1.2.0.1 || ^>= 1.3.0.0-    , filepath               >= 1.4.0.0  && < 2-    , http-io-streams       ^>= 0.1.0.0-    , io-streams            ^>= 1.5.0.1-    , microlens              >= 0.4.8.3  && < 4.13-    , microlens-mtl          >= 0.1.11.1 && < 0.3-    , microlens-th           >= 0.4.1.3  && < 0.5+    , cabal-add              >= 0.2      && < 0.3+    , deepseq                >= 1.4.8.0  && < 1.6+    , directory              >= 1.3.7.1  && < 1.4+    , filepath               >= 1.4.2.2  && < 2+    , http-io-streams        >= 0.1.6.3  && < 0.2+    , io-streams             >= 1.5.2.2  && < 1.6+    , microlens              >= 0.4.13.1 && < 0.6+    , microlens-mtl          >= 0.2.0.3  && < 0.3+    , microlens-th           >= 0.4.3.14 && < 0.5     , netrc                 ^>= 0.2.0.0-    , optparse-applicative   >= 0.14     && < 1+    , optparse-applicative   >= 0.17.1.0 && < 1     , process-extras        ^>= 0.7.4     , stringsearch          ^>= 0.3.6     , tagsoup               ^>= 0.14-    , tar                    >= 0.5      && < 1-    , text                   >= 1.2      && < 2.2-    , time                   >= 1.5.0.1  && < 2-    , zlib                   >= 0.6.1    && < 0.8+    , tar                    >= 0.5.1.1  && < 1+    , text                   >= 2.0.2    && < 2.2+    , time                   >= 1.12.2   && < 2+    , zlib                   >= 0.6.3.0  && < 0.8    ghc-options: -Wall -Wcompat -threaded
src/Main.hs view
@@ -81,6 +81,7 @@  -- import Cabal +import           Distribution.Client.Add import           Distribution.Server.Util.CabalRevisions  ( diffCabalRevisions, Change(Change) ) import           IndexShaSum                              ( IndexShaSumOptions(IndexShaSumOptions), run ) import           CabalEdit                                ( PkgRev, cabalEditXRev )@@ -441,7 +442,6 @@   { optABPackageName  :: C.PackageName   , optABVersionRange :: C.VersionRange   , optForce          :: Bool              -- ^ Disable the check whether bound is subsumed by existing constraints.-  , optABMessage      :: [String]   , optABFiles        :: a                 -- ^ One or several files.   } deriving (Show, Functor) @@ -512,7 +512,6 @@     addboundParser = AddBound <$> (AddBoundOptions <$> OA.argument prsc (metavar "DEPENDENCY")                                                    <*> OA.argument prsc (metavar "VERSIONRANGE")                                                    <*> OA.switch (long "force" <> help "Add bound even if it is already subsumed by existing constraints.")-                                                   <*> many (OA.option str (OA.short 'm' <> OA.long "message" <> metavar "MSG" <> help "Use given MSG as a comment. If multiple -m options are given, their values are concatenated with 'unlines'."))                                                    <*> some (OA.argument str (metavar "CABALFILES..." <> action "file")))      oParser@@ -814,29 +813,21 @@ -- Non-fatal errors (like parse errors) are reported in the Except monad. -- addBound :: AddBoundOptions' FilePath -> ExceptT String IO ()-addBound AddBoundOptions{ optABPackageName, optABVersionRange, optForce, optABMessage, optABFiles = fp } = do+addBound AddBoundOptions{ optABPackageName, optABVersionRange, optForce, optABFiles = fp } = do    old <- liftIO $ BS.readFile fp--  -- idea is simple:-  -- - .cabal is line oriented file-  -- - find "library" section start-  -- - bonus: look of an indentation used from the next field/section there-  -- - insert data into a bytestring "manually"   fs <- either (\ err -> throwError $ unwords ["Parsing", fp, "failed:", show err]) return $       C.readFields old-  (lin, indent) <- maybe-      (throwError $ "Cannot find library section in " ++ fp)-      return-      (findLibrarySection fs)--  let msgLines  = map ("-- " ++) optABMessage-      bdLine    = "build-depends: " ++ C.prettyShow optABPackageName ++ " " ++ C.prettyShow optABVersionRange-      midLines  = [ BS8.pack $ replicate indent ' ' ++ l-                  | l <- msgLines ++ [bdLine]-                  ] ++ [""] -- also add an empty line separator-      (preLines, postLines) = splitAt lin $ BS8.lines old-      new = BS8.unlines (preLines ++ midLines ++ postLines)+  let addConfig = AddConfig+        { cnfOrigContents = old+        , cnfFields = fs+        , cnfComponent = Right (C.CLibName C.LMainLibName)+        , cnfTargetField = BuildDepends+        , cnfAdditions = pure $ BS8.pack $ C.prettyShow optABPackageName ++ " " ++ C.prettyShow optABVersionRange+        }+  new <- case executeAddConfig (\_ _ -> True) addConfig of+    Just x -> pure x+    Nothing -> throwError $ "Cannot find library section in " ++ fp    -- interpretation of version ranges   let oldGpd = parseGenericPackageDescription' old
stack-9.10.yaml view
@@ -1,6 +1,4 @@-resolver: lts-24.37-compiler: ghc-9.10.2-compiler-check: match-exact+resolver: lts-24.55  flags:   HsOpenSSL:
stack-9.12.yaml view
@@ -1,6 +1,4 @@-resolver: nightly-2026-04-15-compiler: ghc-9.12.2-compiler-check: match-exact+resolver: nightly-2026-08-16  flags:   HsOpenSSL:
− stack-9.6.yaml
@@ -1,5 +0,0 @@-resolver: lts-22.44--flags:-  HsOpenSSL:-    use-pkg-config: true
− stack-9.8.yaml
@@ -1,5 +0,0 @@-resolver: lts-23.28--flags:-  HsOpenSSL:-    use-pkg-config: true