Masterminds / Masterminds/semver
Find subset within the constraints
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
Let's assume the following scenario:
c1, _ := semver.NewConstraint(">=1.4.0")
c2, _ := semver.NewConstraint("^1")
res, _ := c2.Satisfies(c1)
With the current APIs, it seems that achieving this is not possible.
@mattfarina, if it’s feasible, could you please provide some guidance on whether this can be done with the existing package? I’m happy to contribute to this change if you can share how the package currently parses version ranges as I have very less idea about this.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with semver.NewConstraint and the existing Constraint.Satisfies API, then trace how the package parses version ranges. Determine whether the requested subset relationship can be supported with the current APIs; done means the feasible approach and expected behavior are agreed and covered by the package.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100