Masterminds / Masterminds/semver

Issue with tilde constraint

Open
#156 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
1.4k
Forks
168
PR merge metrics
No merged PRs in 30d

Description

It seems that there is an issue with tilde constraints. Version "0.1.0" matches "~0.0.0" although it should not.

Adding the following test cases causes a failure:

https://github.com/cagataygurturk/semver/commit/32e10671da3fbb7110f79679587e6799945c27ef#diff-38863e0a01899c69c60ca35df3a357eb9839bc41ea818352ee5240c728234920

Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the test cases in the linked commit and trace the tilde-constraint matching logic in the Go package. Run the relevant Go tests, reproduce that version "0.1.0" matches "~0.0.0", and confirm the added cases pass without regressing other constraint comparisons.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.