Skip to content

Allow Baselining for 0.x versions #6771

@chrisrueger

Description

@chrisrueger

... baselining to also work on 0.x packages.

Originally posted by @peterkir in #6702 (comment)

Currently in the baseline feature there is a special handling for versions < 1.0
From: https://bnd.bndtools.org/chapters/180-baselining.html#setting-up-a-project-for-baselining

the bundle/package version must be 1.0.0 or above. If the version is less (i.e. major version being 0) no baselining is possible, the purpose is to allow the primordial baseline to be established without errors.

In the discussions in #6702 it was suggested that this special handling should be removed and baselining should work for all versions including 0.x

History

The following issue and commit seem to be how this feature was created.

/**
* "Major version zero (0.y.z) is for initial development. Anything may
* change at any time. The public API should not be considered stable."
*
* @see <a href="https://semver.org/#spec-item-4">SemVer</a>
*/
private boolean mismatch(Version older, Version newer) {
return older.getMajor() > 0 && newer.getMajor() > 0;
}

Configurability

TODO this needs to be discussed. Probably this new behavior should be opt in, to be backwards compatible

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