hpc-codecov 0.6.2.0 → 0.6.3.0
raw patch · 4 files changed
+31/−7 lines, 4 filesdep ~timePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: time
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- hpc-codecov.cabal +3/−2
- test/Test/Main.hs +22/−4
- test/data/project1/stack.yaml +1/−1
CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for hpc-codecov +## 0.6.3.0 -- 2025-07-25++- Modify the version range of ``time`` package to support 1.14, which+ is shipped with ghc 9.12.+ ## 0.6.2.0 -- 2024-07-09 - Support searching under the build directory made by
hpc-codecov.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.0 name: hpc-codecov-version: 0.6.2.0+version: 0.6.3.0 synopsis: Generate reports from hpc data license: BSD3 license-file: LICENSE@@ -69,6 +69,7 @@ , GHC == 9.6.5 , GHC == 9.8.2 , GHC == 9.10.1+ , GHC == 9.12.2 library hs-source-dirs: src@@ -89,7 +90,7 @@ , directory >= 1.3.0 && < 1.4.0 , filepath >= 1.4.1 && < 1.6 , hpc >= 0.6 && < 0.8- , time >= 1.9 && < 1.13+ , time >= 1.9 && < 1.15 default-language: Haskell2010 ghc-options: -Wall
test/Test/Main.hs view
@@ -370,7 +370,14 @@ let t = buildAndTestWith Stack withProject name act = case getAcquireAndRelease Stack name [] of (a,r) -> withResource a r (const act)- in testGroup "discover_stack"+ do_nothing _ = pure ()+ rmdir_in_project1 dir =+ removeDirectoryRecursiveIfExist (testData "project1" </> dir)+ remove_stack_build_dirs =+ mapM_ rmdir_in_project1 [".stack-work", "dot-stack-work"]+ cleanUpDirs tree =+ withResource remove_stack_build_dirs do_nothing (\_ -> tree)+ in cleanUpDirs $ testGroup "discover_stack" [ testGroup "plain" [ t "project1" [ "--root=" ++ testData "project1"@@ -404,6 +411,7 @@ , "--verbose" , "--format=cobertura" , "--out=project1.xml"+ , "--exclude=Paths_project1" , "stack:project1-test"] [] ]@@ -452,7 +460,11 @@ let t = buildAndTestWith Cabal withProject name act = case getAcquireAndRelease Cabal name [] of (a,r) -> withResource a r (const act)- in testGroup "discover_cabal"+ cabal_clean =+ callProcessIn (testData "project1") "cabal" ["clean"]+ cleanUpDirs tree =+ withResource cabal_clean (const $ pure ()) (const tree)+ in cleanUpDirs $ testGroup "discover_cabal" [ t "project1" [ "--root=" ++ testData "project1" , "--verbose"@@ -565,10 +577,16 @@ Just Stack -> pure ".hpc_codecov_test_tmp_stack" Just Cabal -> pure ".hpc_codecov_test_tmp_cabal_v2" _ -> error "Cannot determine build tool"- exists <- doesDirectoryExist dir- when exists $ removeDirectoryRecursive dir+ removeDirectoryRecursiveIfExist dir pure dir release _ = return ()++-- | Simple wrapper to remove directory recursively. Does not catch+-- exceptions.+removeDirectoryRecursiveIfExist :: FilePath -> IO ()+removeDirectoryRecursiveIfExist dir = do+ exist <- doesDirectoryExist dir+ when exist $ removeDirectoryRecursive dir -- | Pass the HUnit test when an exception was thrown, otherwise a -- test failure.
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.28+resolver: lts-24.1 # User packages to be built. # Various formats can be used as shown in the example below.