criterion 1.5.12.0 → 1.5.13.0
raw patch · 5 files changed
+54/−7 lines, 5 filesdep ~aesondep ~optparse-applicativePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson, optparse-applicative
API changes (from Hackage documentation)
Files
- Criterion/Main/Options.hs +2/−1
- Criterion/Main/Options/Internal.hs +38/−0
- changelog.md +4/−0
- criterion.cabal +7/−4
- examples/criterion-examples.cabal +3/−2
Criterion/Main/Options.hs view
@@ -25,6 +25,7 @@ import Control.Monad (when) import Criterion.Analysis (validateAccessors)+import Criterion.Main.Options.Internal (tabulate) import Criterion.Types (Config(..), Verbosity(..), measureAccessors, measureKeys) import Data.Char (isSpace, toLower)@@ -34,7 +35,7 @@ import Data.Version (showVersion) import GHC.Generics (Generic) import Options.Applicative-import Options.Applicative.Help (Chunk(..), tabulate)+import Options.Applicative.Help (Chunk(..)) import Options.Applicative.Help.Pretty ((.$.)) import Options.Applicative.Types import Paths_criterion (version)
+ Criterion/Main/Options/Internal.hs view
@@ -0,0 +1,38 @@+{-# LANGUAGE CPP #-}++-- |+-- Module : Criterion.Main.Options.Internal+-- Copyright : (c) 2022 Ryan Scott+--+-- License : BSD-style+-- Maintainer : bos@serpentine.com+-- Stability : experimental+-- Portability : GHC+--+-- Provides a shim on top of @optparse-applicative@'s 'Options.tabulate'+-- function that is backwards-compatible with pre-@0.17.*@ versions of+-- @optparse-applicative@. This is deliberately kept separate from the rest of+-- "Criterion.Main.Options" because this function requires CPP to define, and+-- there is a Haddock comment in "Criterion.Main.Options" that will cause the+-- CPP preprocessor to trigger an \"unterminated comment\" error. Ugh.+--+-- TODO: When we support @optparse-applicative-0.17@ as the minimum, remove+-- this module and simply inline the definition of 'tabulate' in+-- "Criterion.Main.Options".+module Criterion.Main.Options.Internal (tabulate) where++import qualified Options.Applicative.Help as Options+import Options.Applicative.Help (Chunk, Doc)++#if MIN_VERSION_optparse_applicative(0,17,0)+import Options.Applicative (ParserPrefs(..), defaultPrefs)+#endif++-- | A shim on top of 'Options.tabulate' from @optparse-applicative@ that is+-- backwards-compatible with pre-@0.17.*@ versions of @optparse-applicative@.+tabulate :: [(Doc, Doc)] -> Chunk Doc+#if MIN_VERSION_optparse_applicative(0,17,0)+tabulate = Options.tabulate (prefTabulateFill defaultPrefs)+#else+tabulate = Options.tabulate+#endif
changelog.md view
@@ -1,3 +1,7 @@+1.5.13.0++* Allow building with `optparse-applicative-0.17.*`.+ 1.5.12.0 * Fix a bug introduced in version 1.5.9.0 in which benchmark names that include
criterion.cabal view
@@ -1,5 +1,5 @@ name: criterion-version: 1.5.12.0+version: 1.5.13.0 synopsis: Robust, reliable performance measurement and analysis license: BSD3 license-file: LICENSE@@ -27,8 +27,9 @@ GHC==8.4.4, GHC==8.6.5, GHC==8.8.4,- GHC==8.10.4,- GHC==9.0.1+ GHC==8.10.7,+ GHC==9.0.2,+ GHC==9.2.1 data-files: templates/*.css@@ -74,6 +75,7 @@ Criterion.Types other-modules:+ Criterion.Main.Options.Internal Criterion.Monad.Internal other-modules:@@ -102,7 +104,8 @@ js-chart >= 2.9.4 && < 3, mtl >= 2, mwc-random >= 0.8.0.3,- optparse-applicative >= 0.13,+ -- TODO: Depend on optparse-applicative-0.17 as the minimum (see #258)+ optparse-applicative >= 0.13 && < 0.18, parsec >= 3.1.0, statistics >= 0.14 && < 0.16, text >= 0.11,
examples/criterion-examples.cabal view
@@ -20,8 +20,9 @@ GHC==8.4.4, GHC==8.6.5, GHC==8.8.4,- GHC==8.10.4,- GHC==9.0.1+ GHC==8.10.7,+ GHC==9.0.2,+ GHC==9.2.1 flag conduit-vs-pipes default: True