Skip to content

Switch between version parsers

Fabien Catteau requested to merge v3-parser-switch into v3

What does this MR do?

  • Add new method SemverDialects.parse_version. It uses the dedicated version parser if any, and falls back to the existing parser.
  • Swap arguments of IntervalParser.parse for consistency.

This has been successfully tested on top of Maven support (!59 - merged), allowing to resolve all specs of expectations/version_sat/maven.yml but one.

In the future we might remove the fall back mechanism after declaring VersionParser.parse for every supported type. These might reuse SemanticVersion.new, Semver2::VersionParser or any other parser.

What are the relevant issue numbers?

gitlab-org/gitlab#386070 (closed)

Does this MR meet the acceptance criteria?

Edited by Fabien Catteau

Merge request reports