hashicorp / hashicorp/go-version
Comparison to github.com/Masterminds/semver
- Dominant language
- Go
- Stars
- 1.8k
- Forks
- 165
- Avg merge
- 23h 42m
- Merged PRs (30d)
- 2
Description
@mitchellh Here is the comparison to [github.com/Masterminds/semver](https://github.com/Masterminds/semver) we spoke about.
- [x] On the `Version` type being able to access the Major, Minor, and Patch parts by name.
- [ ] Constraints support the `||` operator. For example, `>= 1.2.3, < 2 || >= 4.0.0`. The or operator separates groups of and operators.
- [ ] Support `~` for patch level equals in addition to `~>` on constraints.
- [ ] Support `^` for major version equality on constraints.
- [ ] Support a range syntax like `1.2.3 - 1.3.4` on constraints.
- [ ] A validator that provides reasons why a constraint failed (note, this is a PR for `semver` that should land soon).
I think this is a good start. These features, except the last, are all in use today. The last line was a feature request for a project outside of mine.
Please let me know what you think about these.
Contributor guide
Research direction
Start by reviewing the Version type and the constraint handling described in the issue, then compare the unchecked operators and range syntax with github.com/Masterminds/semver. Done means deciding which listed features belong in this library and implementing or explicitly resolving the requested constraint behaviors, including validation failure reasons.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100