packages feed

pandoc-plot 1.2.1 → 1.2.2

raw patch · 4 files changed

+63/−69 lines, 4 filesdep +gitrevdep +unixdep −githashPVP ok

version bump matches the API change (PVP)

Dependencies added: gitrev, unix

Dependencies removed: githash

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -2,9 +2,13 @@ 
 pandoc-plot uses [Semantic Versioning](http://semver.org/spec/v2.0.0.html)
 
-Release 1.2.1
--------------
+## Release 1.2.2
 
+* Executables are now built using GHC 9.0.1
+* The executables are now built with Pandoc 2.14. Pandoc 2.11, 2.12, and 2.13 are still supported.
+
+## Release 1.2.1
+
 * Added the ability to save plots as LaTeX directly from the GNUplot toolkit. To do this, simply set the output format to `latex`. The figure content will be embedded in the output document, which only makes sense for final conversion to LaTeX. For example:
 
   ````markdown
@@ -14,8 +18,7 @@   ````
   This patch was contributed by Saku Laesvuori.
 
-Release 1.2.0
--------------
+## Release 1.2.0
 
 * Fixed an issue where code blocks nested in other structures were detected properly. For example, in the following LaTeX snippet, plots would not be detected properly:
 ```latex
@@ -29,14 +32,12 @@ 
 * The executables are now built with Pandoc 2.13. Pandoc 2.11 and Pandoc 2.12 are still supported.
 
-Release 1.1.1
--------------
+## Release 1.1.1
 
 * Error messages now include the source script and line numbers.
 * The executables are now built with Pandoc 2.12. Pandoc 2.11 is still supported.
 
-Release 1.1.0
--------------
+## Release 1.1.0
 
 * Added the [PlantUML](https://plantuml.com) toolkit (#18). Diagrams can be generated like so:
 
@@ -51,14 +52,12 @@   ````
 * Changed versioning scheme to match more common Major.Minor.Bugfix.
 
-Release 1.0.2.1
----------------
+## Release 1.0.2.1
 
 * `pandoc-plot` will now only render at most `N` figures in parallel, where `N` is the number of available CPU cores.
 * Fixed an issue where error message would get mangled in strict-mode.
 
-Release 1.0.2.0
----------------
+## Release 1.0.2.0
 
 * Added the ability to run `pandoc-plot` in **strict mode**. By default, `pandoc-plot` leaves code blocks unchanged if a figure fails to be rendered.  In strict mode, `pandoc-plot` will immediately halt if it encounters a problem, such as a missing toolkit. You can activate strict mode via configuration:
 
@@ -87,43 +86,36 @@ * Fixed an issue where invoking the `plotsjl` toolkit on Windows would sometimes fail with the error: Unknown system error 50.
 * Fixed an issue with R-based toolkits on Windows not being detected properly.
 
-
-Release 1.0.1.0
----------------
+## Release 1.0.1.0
 
 * Added the ability to change the "Source code" label to other languages via configuration.
 * Added syntax highlighting to the linked source code.
 * Fixed an issue where code blocks with unicode symbols (e.g. greek letters) would trip up pandoc-plot (#16).
 
-Release 1.0.0.0
----------------
+## Release 1.0.0.0
 
 * Added support for Pandoc 2.11. Unfortunately, there is no way to support prior versions of Pandoc at the same time.
 * With release 1.0.0.0, `pandoc-plot` has stabilized. The Haskell library API will not change until version 2+. 
 
-Release 0.9.4.0
----------------
+## Release 0.9.4.0
 
 * Fixed an issue where the current working directory was changed. This prevented users from referring to files in scripts with relative paths (#2).
 
-Release 0.9.3.0
----------------
+## Release 0.9.3.0
 
 * Added executable caching: repeated usage of a particular toolkit will be faster because executables are only looked-for once.
 * Reverting the change from 0.8.1.0: internal machinery of `pandoc-plot` has been moved to the `Text.Pandoc.Filter.Plot.Internal` module, where there is no guarantee of backwards-compatibility after 1.0.0.
 * Removed the `makePlot` function, which could not take advantage of multithreading and other key features of `pandoc-plot`.
 * Fixed an issue where files required for tests were missing from source tarballs (#13).
 
-Release 0.9.2.0
----------------
+## Release 0.9.2.0
 
 * Fixed an issue where executables located on paths with spaces would not be invoked correctly (#12).
 * Fixed an issue where R-paths were not normalized correctly.
 * Fixed an issue where executables specified in configuration that did not exist would crash `pandoc-plot`.
 * Fixed an issue where some R-based toolkits appeared to be available, but were not.
 
-Release 0.9.1.0
----------------
+## Release 0.9.1.0
 
 * Added the `file` parameter, which allows the user to read figure content from a file instead of using the code block content in documents. This is especially useful for complex figures, where you might want to have the help of your tooling in an IDE, for instance. Here's an example:
 
@@ -137,8 +129,7 @@ * Cleaning output directories with `pandoc-plot clean` now follows configuration values for logging. 
 * Fixed an issue where configuration in metadata did not get parsed properly.
 
-Release 0.9.0.0
----------------
+## Release 0.9.0.0
 
 * The `bokeh` toolkit now supports exporting plots as SVGs (#8).
 * Interactive plots relying on javascript scripts will now defer loading the scripts (#9). 
@@ -147,15 +138,13 @@ * Added support for the `dpi` parameter in `graphviz` and `mathematica`.
 * Added support for MATLAB's new `exportgraphics` function introduced in MATLAB 2020a. Older versions fallback to using `saveas`.
 
-Release 0.8.1.0
----------------
+## Release 0.8.1.0
 
 * The module `Text.Pandoc.Filter.Plot.Internal` is no longer exposed; instead, everything relevant is exposed by the `Text.Pandoc.Filter.Plot` module.
 * Fixed an issue where script errors would be logged as debug messages.
 * Interactive plots are now embedded directly in output (#7).
 
-Release 0.8.0.0
----------------
+## Release 0.8.0.0
 
 * Added a new output format, HTML, to produce interactive plots. Not all renderers support it. You can try with Plotly/Python and Plotly/R as follows:
 
@@ -174,26 +163,22 @@ * Separated the detailed information from `README.md` and into a proper `MANUAL.md`. This is now the information which will be shown with `pandoc-plot --manual`.
 * Exposed the `pandoc-plot` version via `Text.Pandoc.Filter.Plot.pandocPlotVersion`.
 
-Release 0.7.2.1
----------------
+## Release 0.7.2.1
 
 * Fixed an issue where the `pandoc` version was not parsed properly, giving rise to errors when running `pandoc-plot`.
 * Fixed an issue where logging errors were not always displayed.
 
-Release 0.7.2.0
----------------
+## Release 0.7.2.0
 
 * Removed dependency on `open-browser` package.
 * Starting with this version, `pandoc` 2.8 and 2.9 are **no longer supported** due to a breaking API change in `pandoc` 2.10.
 * Executables are now built with GHC 8.10.1.
 
-Release 0.7.1.0
----------------
+## Release 0.7.1.0
 
 * Better multi-threaded logging. Only one thread (the logging thread) performs IO on the log file. This prevents hang-ups when working on large documents. 
 
-Release 0.7.0.0
----------------
+## Release 0.7.0.0
 
 * Added documentation on using `pandoc-plot` with LaTeX documents as well.
 * Added preliminary support for logging to `pandoc-plot`. You can turn on this feature in the configuration as follows:
@@ -212,15 +197,13 @@ 
 * Removed dependencies `turtle`, `temporary`, `deepseq`, and `data-default-class`, resulting in improved build times by ~10%, and makes the executable smaller by 15-20%!
 
-Release 0.6.1.0
----------------
+## Release 0.6.1.0
 
 * Made the functions `availableToolkits` and `unavailableToolkits` public.
 * Minor documentation fixes.
 * Executables are now built with GHC 8.8.3.
 
-Release 0.6.0.0
----------------
+## Release 0.6.0.0
 
 New toolkits:
 * Added support for the Plotly/R plotting library.
@@ -249,8 +232,7 @@ ```
 * Added the ability to specify configuration file to the `pandoc-plot clean` and `pandoc-plot toolkits` commands.
 
-Release 0.5.0.0
----------------
+## Release 0.5.0.0
 
 * The `pandoc-plot` executable will now process documents in parallel. This should dramatically speed up processing of large documents with lots of figures. 
 This happens automatically through the function `plotTransform`.
@@ -258,13 +240,11 @@ * Added `defaultConfiguration` so that people don't have to install the `data-default` package to get access to default configuration values. 
 * Added a check for the `matplotlib` toolkit, preventing users from using `matplotlib.pyplot.show` in figures. This would halt `pandoc-plot`.
 
-Release 0.4.0.1
----------------
+## Release 0.4.0.1
 
 * Fixed an issue where the `pandoc-plot` executable could not be built outside of its git repository.
 
-Release 0.4.0.0
----------------
+## Release 0.4.0.0
 
 * Updated documentation.
 * Added a `--full-version` flag to the executable, which includes which version of pandoc/pandoc-types was used, as well as the git revision.
@@ -273,33 +253,28 @@ * Added the top-level function `cleanOutputDir` to clean output of pandoc-plot. This is only accessible if `pandoc-plot` is used as a library.
 * Added a distinction between failure to render a figure because of a mistake, and failing to render a figure because the toolkit is not installed. `pandoc-plot` will give better error messages in the latter case.
 
-Release 0.3.0.0
----------------
+## Release 0.3.0.0
 
 * Added more examples.
 * Added MacOS binaries built via Azure pipelines.
 * BREAKING CHANGE: Parsing captions based on source file was not working. Captions format can be specified in the configuration file. This unfortunately changes the type signature of a few high-level functions.
 
-Release 0.2.2.0
----------------
+## Release 0.2.2.0
 
 * Fixed an issue where paths with spaces would not work (issue #2).
 * Added Linux binaries built via Azure pipelines.
 
-Release 0.2.1.0
----------------
+## Release 0.2.1.0
 
 * Improved documentation.
 
-Release 0.2.0.0
----------------
+## Release 0.2.0.0
 
 * Added support for gnuplot.
 * Added more tests for all toolkits.
 
 * Fixed an issue where the package could not be installed because a source file was not included in the cabal file.
 
-Release 0.1.0.0
----------------
+## Release 0.1.0.0
 
 * Initial release
executable/Main.hs view
@@ -14,9 +14,9 @@ import qualified Data.Text.IO as TIO
 import Data.Version (parseVersion, showVersion)
 import qualified Data.Version as V
+import Development.GitRev (gitHash)
 import ExampleConfig (embedExampleConfig)
 import GHC.IO.Encoding (setLocaleEncoding, utf8)
-import GitHash as Git (giHash, tGitInfoCwdTry)
 import ManPage (embedManualHtml)
 import OpenFile (openFile)
 import Options.Applicative
@@ -259,7 +259,7 @@ showFullVersion :: IO ()
 showFullVersion = do
   putStrLn $ "pandoc-plot " <> V.showVersion pandocPlotVersion
-  putStrLn $ "Git revision " <> gitrev
+  putStrLn $ "Git revision " <> $gitHash
   putStrLn $
     mconcat
       [ "Compiled with pandoc ",
@@ -269,10 +269,6 @@         " using GHC ",
         TOOL_VERSION_ghc -- Constant defined by CPP
       ]
-  where
-    -- In certain environments (e.g. Hackage when building documentation),
-    -- there is no git information.
-    gitrev = either (const "unknown") Git.giHash ($$tGitInfoCwdTry)
 
 showAvailableToolkits :: Maybe FilePath -> IO ()
 showAvailableToolkits mfp = do
pandoc-plot.cabal view
@@ -1,6 +1,6 @@ cabal-version:  2.2
 name:           pandoc-plot
-version:        1.2.1
+version:        1.2.2
 synopsis:       A Pandoc filter to include figures generated from code blocks using your plotting toolkit of choice.
 description:    A Pandoc filter to include figures generated from code blocks. 
                 Keep the document and code in the same location. Output is 
@@ -14,7 +14,7 @@ license:        GPL-2.0-or-later
 license-file:   LICENSE
 build-type:     Simple
-tested-with:    GHC == 8.10.4
+tested-with:    GHC == 8.10.4, GHC == 9.0.1
 extra-source-files:
     CHANGELOG.md
     LICENSE
@@ -109,6 +109,8 @@         , typed-process      >= 0.2.1 && < 1
         , yaml               >= 0.8   && < 1
         , mtl                >= 2.2   && < 3
+    if !os(windows)
+        build-depends:  unix >= 2.4 && < 2.8
     default-language: Haskell2010
 
 executable pandoc-plot
@@ -129,7 +131,7 @@         , containers
         , directory
         , filepath
-        , githash               >= 0.1.3.0 && < 1
+        , gitrev                >= 1    && < 2
         , optparse-applicative  >= 0.14 && < 1
         , pandoc
         , pandoc-plot
stack.yaml view
@@ -1,11 +1,32 @@ resolver: lts-17.9 # GHC 8.10.4
+compiler: ghc-9.0.1
 
 packages:
 - .
 
 extra-deps:
-- pandoc-2.13
+- pandoc-2.14
 - hslua-module-path-0.1.0.1@sha256:1fe319f18315618491260c912e85b6f73e406499c8fe2fa505e59036a4ff78fd,2502
+- citeproc-0.4@sha256:e198157aec60dbce1e6c1e29592ec6ded69ee5a79ea6645164356bd89458953e,5602
+- commonmark-0.2@sha256:ee873331ff496060dd9becdfaf7f1f4e0fd0688463f5d1f61481a60ed661af45,3426
+- commonmark-extensions-0.2.1.1@sha256:447bda074904ea765c51c73eeb086bbcff936d984366330f9f8506afeefc5ee5,3486
+- commonmark-pandoc-0.2.1@sha256:7c5db787c15c7a80aa66f5874023386e9b07c134ce24ef9f3aaebe9f52b6f817,1151
+- haddock-library-1.10.0@sha256:2a6c239da9225951a5d837e1ce373faeeae60d1345c78dd0a0b0f29df30c4fe9,4098 
+- jira-wiki-markup-1.4.0@sha256:2fdb7b50bd270d7d388b31df1c746c2864326b68bdd44045323c4f81fd6d5283,3851 
+- texmath-0.12.3@sha256:7560c097a483e69af99d38aab590924f4b2ab066da35fc5b68c01accd8b65190,6570
+- unicode-collation-0.1.3@sha256:4e92a82fff19e26e1ee46d7c945b3a4939a32c0c7e6beadbff9a91f1e16b5295,5122
+- xml-conduit-1.9.1.1@sha256:7213a64462d669f5ca55534a78a9b19c1d3757a605756e1f5065fa7c611493c1,3010
+
+# Specifically for GHC 9+
+- basement-0.0.12
+- memory-0.16.0
+- hslua-1.3.0.1
+- cryptonite-0.29
+- unix-2.7.2.2@sha256:ddb8fc5d5eede81dfad7846eceb65267fe4cf8b4f324bc74542f694a32335ef2,3496
+- Cabal-3.4.0.0@sha256:74ca2bc93297dc20b291c8dc721055278aa4a7942b0b5aca86766d407e3cbe5f,30533
+- directory-1.3.6.2@sha256:6e5f3e0adfe94483d5754d97d741b7d23a5e085d47176075b1955d4fa78f37aa,2811      
+- process-1.6.11.0@sha256:472c51a8903b55b1b423e7e4050facd1dce5e323fd81e5953f02ca500bb9d58c,2819       
+- time-1.10@sha256:536801b30aa2ce66da07cb19847827662650907efb2af4c8bef0a6276445075f,5738
 
 # For development
 - git: https://github.com/owickstrom/pandoc-include-code.git