zafarkhaja / jsemver

Java implementation of the SemVer Specification
MIT License
429 stars 82 forks source link

implement non-strict-alternative to valueOf factory method #14

Closed fabianbuch closed 9 years ago

fabianbuch commented 9 years ago

in essence exposing VersionParser::parseVersionCore()

Reason:

Input version-strings might not always be valid semver style even if i want a valid semver in the end. 0.7.2 wasn't as strict in that regard, so it'd be nice to have a lenient parsing version that ignores everything apart from the parseable version-core (NormalVersion).

zafarkhaja commented 9 years ago

Thanks for the contribution, @fabianbuch.

I have a somewhat similar idea but with a little bit different approach to implementation. I want to keep the Version and the VersionParser as close to the SemVer specification as possible. At the same time, I know that there are plenty of widely adopted and used versioning systems that are not completely SemVer-compliant but could be made SemVer-compatible with little or no effort.

This could be achieved through extensions which I'm planning to introduce to the library as of version 1.0.0 (#12) and for that I'll have to rewrite the VersionParser (#9) to make it more flexible.

What you think?

P.S. I've implemented pretty much all the planned functionality so it won't take long to ship 1.0.0.