-
-
Notifications
You must be signed in to change notification settings - Fork 303
Description
... 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.
bnd/biz.aQute.bndlib/src/aQute/bnd/differ/Baseline.java
Lines 264 to 273 in 1cc175b
/** | |
* "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