Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest new version #8

Open
agrafix opened this issue Dec 22, 2016 · 6 comments
Open

Suggest new version #8

agrafix opened this issue Dec 22, 2016 · 6 comments

Comments

@agrafix
Copy link

agrafix commented Dec 22, 2016

Nice tool! :-) It would be really nice if the tool could also suggest the next version, maybe even with a flag for selecting either PVP or SemVer?

@blitzcode
Copy link
Owner

Glad you like it!

I don't understand what 'next version' should be suggested?

@agrafix
Copy link
Author

agrafix commented Dec 22, 2016

Currently, I can call the tool with hackage-diff conduit 1.1.5 ~/tmp/conduit-1.1.6/dist/doc/html/conduit/conduit.txt to see the API diff between conduit 1.1.5 and the local conduit 1.1.6. What I would like to do would be to call hackage-diff --pvp-version conduit 1.1.5 ~/my-local-unreleased-conduit and the tool outputs something like this:

Based on this diff:

+ Data.Serialize.IEEE754
  + getFloat32be :: Get Float
  + getFloat32le :: Get Float
  + getFloat64be :: Get Double
  + getFloat64le :: Get Double
  + putFloat32be :: Float -> Put
  + putFloat32le :: Float -> Put
  + putFloat64be :: Double -> Put
  + putFloat64le :: Double -> Put
× Data.Serialize
  + instance Serialize a => GSerialize (K1 i a)
[...]

we can see a BREAKING CHANGE. Thus, the new version for ~/my-local-unreleased-conduit must be at least 2.0.0

@blitzcode
Copy link
Owner

Hm, not sure I find that terribly useful. I mean, it's basically if breakingChange then bumpMajor else bumpMinor? That just seems like it would require zero mental effort to do yourself and copy & pasting the version number from the output (and / or typing --pvp-version) might actually be more work than to just +1 an integer in the .cabal file 'manually'.

@agrafix
Copy link
Author

agrafix commented Dec 23, 2016 via email

@blitzcode
Copy link
Owner

Would it perhaps be even better then to have the process exit code indicate no changes / no breaking changes / breaking changes? Easiest to integrate into a script (no parsing).

@agrafix
Copy link
Author

agrafix commented Dec 24, 2016

Yes, that sounds great! Then everything else can be implemented around it via script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants