Skip to content

semver: ignore build metadata #12438

Closed

Description

@omasanori

To provide strict total ordering for semver::Version, build metadata must be ignored for equality. Which way is preferred?

  • Preserve build metadata in Version but equality checking ignores it.
    • Most of behaviors are preserved.
  • Remove build metadata field from Version and the parser ignores it.
    • format!("{}", parse("1.0.0+build.1").unwrap()) == "1.0.0"

cc #12435

Activity

  1. erickt commented on Feb 21, 2014

    @erickt
    Contributor

    I we should keep the build data and exclude it from the equality and ordering check. That way we can convert a version back into a string.

  2. omasanori commented on Feb 21, 2014

    @omasanori
    ContributorAuthor

    @erickt Sure.

  3. added a commit that references this issue on Mar 20, 2023
    7c05f55
  4. added 2 commits that reference this issue on Mar 21, 2024
    b44ab66
    7ee75f8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions