Skip to content

feat(parser): Properly support semantic versions#43

Open
hairyhenderson wants to merge 1 commit intonikunjy:masterfrom
hairyhenderson:support-semantic-versions
Open

feat(parser): Properly support semantic versions#43
hairyhenderson wants to merge 1 commit intonikunjy:masterfrom
hairyhenderson:support-semantic-versions

Conversation

@hairyhenderson
Copy link
Copy Markdown

Fixes #42, potentially.

After I realized that the VERSION grammar didn't support anything other than x.y.z form versions, the issues I've been having with prerelease identifiers make much more sense!

I've made a few changes to fix this:

  • took the BNF grammar from semver.org and done a direct translation to ANTLR in SemverGrammar.g4
  • updated parser/gen.sh to support either antlr4 or antlr commands (it's the latter on my system, but can't assume the same elsewhere)
  • added a few new unit tests to confirm correct semver comparison behaviours
  • updated dependency to github.com/blang/semver/v4

Hopefully this all makes sense, and can be merged quickly!

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
@hairyhenderson
Copy link
Copy Markdown
Author

@nikunjy I see you've approved this PR - is there anything blocking it from being merged?

@hairyhenderson
Copy link
Copy Markdown
Author

@nikunjy any chance you can merge this? It's still causing issues

thomaspoignant added a commit to thomaspoignant/go-feature-flag that referenced this pull request Feb 12, 2026
…dling

Resolve #4736. Use hairyhenderson/rules fork until nikunjy/rules#43 is merged.

Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
kodiakhq Bot pushed a commit to thomaspoignant/go-feature-flag that referenced this pull request Feb 12, 2026
…elease handling (#4808)

* fix(wasm): add replace for nikunjy/rules to fix semver prerelease handling

Resolve #4736. Use hairyhenderson/rules fork until nikunjy/rules#43 is merged.

Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>

* tidy

Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>

---------

Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
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

Successfully merging this pull request may close these issues.

Logic error when evaluating with semvers

2 participants