policeman: Haskell PVP version adviser

[ cabal, development, library, mpl, package-management, program, pvp ] [ Propose Tags ] [ Report a vulnerability ]

Policeman assists to properly choose the next version number according to PVP (Packaging Version Policy) for the Haskell packages based on the semantical changes to the interface.


[Skip to Readme]

Modules

  • Policeman
    • Policeman.Cabal
    • Policeman.Cli
    • Policeman.ColorTerminal
    • Core
      • Policeman.Core.Diff
      • Policeman.Core.Hie
      • Policeman.Core.Package
      • Policeman.Core.Version
    • Policeman.Diff
    • Download
      • Policeman.Download.Common
      • Policeman.Download.Hackage
    • Policeman.Evaluate
    • Policeman.Hie
    • Policeman.Run

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.0.0
Change log CHANGELOG.md
Dependencies ansi-terminal (>=0.10 && <0.11), base (>=4.13.0.0 && <4.14), Cabal (>=3.0.0.0 && <3.1), containers (>=0.6.2 && <0.7), dir-traverse (>=0.2.2.2 && <0.3), directory (>=1.3 && <1.4), filepath (>=1.4 && <1.5), ghc (>=8.8 && <8.9), gitrev (>=1.3 && <1.4), mtl (>=2.2.2 && <2.3), optparse-applicative (>=0.15 && <0.16), policeman, relude (>=0.6.0.0 && <0.7), shellmet (>=0.0.3.0 && <0.1), text (>=1.2.4 && <1.3), transformers (>=0.5.6 && <0.6), unordered-containers (>=0.2.10 && <0.3) [details]
Tested with ghc ==8.8.1
License MPL-2.0
Copyright 2020 Kowainik
Author Kowainik
Maintainer Kowainik <xrom.xkov@gmail.com>
Category PVP, Package Management, Cabal, Development
Home page https://github.com/kowainik/policeman
Bug tracker https://github.com/kowainik/policeman/issues
Source repo head: git clone https://github.com/kowainik/policeman.git
Uploaded by vrom911 at 2020-01-29T23:31:04Z
Distributions
Executables policeman
Downloads 505 total (9 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2020-01-30 [all 2 reports]

Readme for policeman-0.0.0.0

[back to package description]

Policeman

logo

GitHub CI Hackage MPL-2.0 license

👮 Policeman is the Kowainik's Bristol Haskell Hackathon project.

🏗 The current status is MVP, though it could already be used on ordinary cases.

Policeman assists to properly choose the next version number according to PVP (Packaging Version Policy) for the Haskell packages based on the semantical changes to the interface.

For a better understanding of the project basis and implementation details please refer to the following blog post:

Prerequisites

Policeman heavily uses some modern features of the Haskell compiler GHC. Therefore, in order to start using Policeman on the projects, you are required to have the following set:

  • Global GHC version 8.8 and higher
  • Support of GHC 8.8 and higher in your current project and the version you wish to compare to
  • cabal build tool version 3.0 or higher installed on your machine

Installation

The initial beta version of Policeman is already available on Hackage. To install it locally you need to execute the following commands:

cabal update
cabal install policeman

Alternatively, you can install the Policeman tool from the sources. For achieving that, you have a couple of options.

First one is to fetch the repo using cabal:

cabal get -s policeman

Or, you can clone the directory directly from GitHub:

git clone https://github.com/kowainik/policeman.git

The next steps are identical in both option. You need to step into the directory:

cd policeman

And finally, build and install the tool using cabal:

cabal install policeman:exe:policeman

How to use

By default, Policeman aims to compare your local version with the latest available Hackage version of the package. It grabs the information about your package automatically, so no need to provide that. That means that the simplest command looks like this:

policeman

It will output the suggested new version (if applicable) based on your local changes compared to the Hackage version.

Alternatively, you can provide the Hackage version you are willing to compare against. For that purpose, you can use -p | --previous option. For example:

policeman --previous "0.1.0.0"

Acknowledgement

Icons made by Freepik from [www.flaticon.com](https://www.flaticon.com/) is licensed by CC 3.0 BY.