Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: =?UTF-8?Q?Krzysztof_Skrz=C4=99tnicki?= <gtener <at> gmail.com>
Subject: ANN: package-vt-0.1.3.3, Haskell Package Versioning Tool
Newsgroups: gmane.comp.lang.haskell.cafe
Date: Friday 27th November 2009 02:43:50 UTC (over 7 years ago)
Hi!

I'm pleased to announce the first release of my program package-vt. It's
role is to detect changes between two versions of package that should cause
version bump.

Recommended versioning policy for Haskell packages is on the wiki [1].

The ultimate goal is to get as good approximation of the algorithm
specified
there as possible. Currently the tool is far from being complete: it only
detects changes to exports in .cabal and module files, but doesn't take any
types into consideration, not to mention other possible heuristics.

This tool is not meant as a replacement for developer's own brain. It can
only detect a subset of changes, and there will always be some important
changes it won't catch, like adding such line:
head (_:y:_) = y

However, it can be used for some quality checks.

Thing that needs improving is user interface. No options are currently
accepted. This, and a lot more, will change in future versions.

You can find a Git repo here [2]. The repo contains 'tests' directory with
two useful scripts. You can use them to run package-vt on anything from
Hackage.
Here are a few random usage examples:

1) Detect small change within module

package-vt packages/HCL/1.1/HCL-1.1/HCL.cabal
packages/HCL/1.2/HCL-1.2/HCL.cabal
Single changes:
ChangeABC : Entity added to module ModuleName "HCL"
---
EVar (UnQual (Ident "prompt1"))


---
Biggest change comes from:
ChangeABC : Entity added to module ModuleName "HCL"
---
EVar (UnQual (Ident "prompt1"))

2) Detect new module added to .cabal

package-vt 0.2.0/AERN-Net-0.2.0/AERN-Net.cabal
0.2.1/AERN-Net-0.2.1/AERN-Net.cabal
Single changes:
ChangeABC : Entity added to module ModuleName
"Control.ERNet.Foundations.Process"
---
EThingAll (UnQual (Ident "ERProcessAction"))


---ChangeABC : Module(s) added.(Consider AB change if new modules are
likely
to cause name collisions)
---
"Control/ERNet/Blocks/Real/LFT"


---
Biggest change comes from:
ChangeABC : Module(s) added.(Consider AB change if new modules are likely
to
cause name collisions)
---
"Control/ERNet/Blocks/Real/LFT"


---

3) Using testing script: package-vt correctly detects that
AERN-RnToRM-0.4.9
should rather be 0.5.0 because the module
Data.Number.ER.RnToRm.UnitDom.ChebyshevBase.Polynom.Field
has been removed.

./test-on-package.lhs AERN-RnToRm
--cut--
>>> Testing package-vt on AERN-RnToRm-0.4.2 and AERN-RnToRm-0.4.9
Parse error: VarSym "#" : SrcLoc {srcFilename =
"0.4.2/AERN-RnToRm-0.4.2/src/Data/Number/ER/RnToRm/Approx/DomTransl.hs",
srcLine = 174, srcColumn = 1}
Single changes:
ChangeABC : Entity added to module ModuleName
"Data.Number.ER.RnToRm.Approx"
---
EVar (UnQual (Ident "keyPointsConsistencyCheck"))
EVar (UnQual (Ident "keyPointsPointwiseConsistencyCheck"))


---ChangeABC : Entity added to module ModuleName
"Data.Number.ER.RnToRm.UnitDom.Approx"
---
EVar (UnQual (Ident "keyPointsConsistencyCheck"))
EVar (UnQual (Ident "keyPointsPointwiseConsistencyCheck"))


---ChangeAB : Module(s) removed/renamed.
---
"Data/Number/ER/RnToRm/UnitDom/ChebyshevBase/Polynom/Field"


---
Biggest change comes from:
ChangeAB : Module(s) removed/renamed.
---
"Data/Number/ER/RnToRm/UnitDom/ChebyshevBase/Polynom/Field"


---
ExitSuccess

--cut--

In case of any trouble please email me or report an issue here [3].
In the near future I'll post more specific plans about development on my
blog [4].

I hope you will find it useful.

Best regards,

Krzysztof Skrzętnicki

[1] http://www.haskell.org/haskellwiki/Package_versioning_policy
[2] http://github.com/Tener/haskell-package-vt
[3] http://github.com/Tener/haskell-package-vt/issues
[4] http://mostlycode.wordpress.com
 
CD: 4ms