packages feed

hpc-codecov 0.6.1.0 → 0.6.2.0

raw patch · 6 files changed

+22/−25 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for hpc-codecov +## 0.6.2.0 -- 2024-07-09++- Support searching under the build directory made by+  ``cabal-install`` 3.12.1.0.+ ## 0.6.1.0 -- 2024-05-29  - Suppress warning messages when compiling with ghc 9.10.
hpc-codecov.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.0 name:                hpc-codecov-version:             0.6.1.0+version:             0.6.2.0 synopsis:            Generate reports from hpc data license:             BSD3 license-file:        LICENSE@@ -68,6 +68,7 @@                      , GHC == 9.4.8                      , GHC == 9.6.5                      , GHC == 9.8.2+                     , GHC == 9.10.1  library   hs-source-dirs:      src
src/Trace/Hpc/Codecov/Discover.hs view
@@ -233,7 +233,9 @@          then do            let f xs = [mix </> x| x <- xs, x `notElem` ignored]            contents <- f <$> listDirectory mix-           return (mb_tix, contents ++ dirs)+           -- From cabal-install 3.12, the 'mix' directory itself is+           -- used as the root directory of .mix files.+           return (mb_tix, mix : contents ++ dirs)          else return (mb_tix, dirs)     else return acc 
src/Trace/Hpc/Codecov/Options.hs view
@@ -198,14 +198,14 @@       -- argument at this point, to show help and version messages       -- without specifying ".tix" file.       let opts0 = foldr ($) emptyOptions flags-          opts1 = fillDefaultIfNotGiven opts0+          opts1 = fillDefaultsIfNotGiven opts0       in  case rest of             []      -> Right opts1             (tix:_) -> Right (opts1 {optTix = tix})     (_, _, errs)  -> Left errs -fillDefaultIfNotGiven :: Options -> Options-fillDefaultIfNotGiven opts = opts+fillDefaultsIfNotGiven :: Options -> Options+fillDefaultsIfNotGiven opts = opts   { optMixDirs = fillIf null optMixDirs   , optSrcDirs = fillIf null optSrcDirs   }@@ -260,10 +260,9 @@         , reportExprOnly = optExprOnly opt         , reportIgnoreDittos = optIgnoreDittos opt         }-      tix = optTix opt       verbose = optVerbose opt   format <- parseFormat (optFormat opt)-  target <- parseTarget tix+  target <- parseTarget (optTix opt)   case target of     TixFile path -> pure (rpt1 {reportTix = path                                ,reportFormat = format})
test/Test/Main.hs view
@@ -11,10 +11,10 @@ import           System.Environment          (getExecutablePath, lookupEnv,                                               setEnv, unsetEnv, withArgs) import           System.Exit                 (ExitCode)+import           System.Info                 (os) import           System.IO                   (IOMode (..), hClose,                                               hGetContents, openBinaryFile,                                               openTempFile)-import           System.Info                 (os)  #if !MIN_VERSION_base(4,11,0) import           Data.Monoid                 ((<>))@@ -28,7 +28,6 @@ -- directory import           System.Directory            (canonicalizePath,                                               doesDirectoryExist,-                                              listDirectory,                                               removeDirectoryRecursive,                                               removeFile,                                               withCurrentDirectory)@@ -246,6 +245,7 @@ data SRA =   SRA { sra_tix      :: FilePath       , sra_mixs     :: [FilePath]+      , sra_build    :: Maybe FilePath       , sra_excludes :: [String]       , sra_verbose  :: Bool       , sra_format   :: Format@@ -256,6 +256,7 @@ emptySRA = SRA { sra_tix = ""                , sra_mixs = []                , sra_excludes = []+               , sra_build = Nothing                , sra_verbose = False                , sra_format = Codecov                , sra_out = Nothing }@@ -321,20 +322,8 @@ getSelfReportCabalArgs :: (FilePath -> IO ()) -> FilePath -> IO SRA getSelfReportCabalArgs setup bd = do   setup bd-  mb_tix <- findUnder (\p -> takeFileName p == "test-main.tix") bd-  putStrLn $ "tix: " ++ show mb_tix-  mb_vanilla <- findUnder (\p -> takeFileName p == "vanilla") bd-  putStrLn $ "vanilla: " ++ show mb_vanilla-  case (mb_tix, mb_vanilla) of-    (Nothing, Nothing) -> error "failed to find tix and vanilla"-    (Nothing, _) -> error "failed to find tix"-    (_, Nothing) -> error "failed to find vanilla"-    (Just tix, Just vanilla) -> do-      let mixdir = vanilla </> "mix"-      mixs <- map (mixdir </>) <$> listDirectory mixdir-      return emptySRA { sra_tix = tix-                      , sra_mixs = mixs-                      , sra_excludes = ["Main", "Paths_hpc_codecov"] }+  pure emptySRA { sra_tix = "cabal:test-main"+                , sra_build = Just bd }  selfReport :: IO SRA -> TestTree selfReport getArgs = testGroup "self"@@ -367,7 +356,7 @@                  shouldFail (sraMain args'))   ]   where-    tixOnly sra = emptySRA { sra_tix = sra_tix sra }+    tixOnly _sra = emptySRA { sra_tix = "test-main.tix" }   -- ------------------------------------------------------------------------@@ -551,6 +540,7 @@     args =       map ("--mix=" ++) (sra_mixs sra) ++       map ("--exclude=" ++) (sra_excludes sra) +++      maybe [] (\d -> ["--build=" ++ d]) (sra_build sra) ++       maybe [] (\p -> ["--out=" ++ p]) (sra_out sra) ++       ["--verbose" | sra_verbose sra] ++       ["--format=" ++ asFormat (sra_format sra)] ++
test/data/project1/stack.yaml view
@@ -17,7 +17,7 @@ # # resolver: ./custom-snapshot.yaml # resolver: https://example.com/snapshots/2018-01-01.yaml-resolver: lts-22.23+resolver: lts-22.28  # User packages to be built. # Various formats can be used as shown in the example below.