Re: [tycho-dev] Reproducible version qualifier without Git-based timestamp
On 2013-09-17 12:46 PM, Mickael Istria wrote:
I'm looking at the code right now, and I'm making some refactorings to
use components as BaselineValidators and let user choose the component
he wants (similar to BuildTimestampProviders).
I have a question on this topic: Is it safe that having
BaselineMode.disable <=> BaselineReplace.none <=> No Baseline validator?
I am not sure what you are asking here. Not all combinations of
BaselineMode and BaselineReplace are it is possible Tycho does not
validate this in all cases.
I've thought of the following related refactorings:
Iteration #1, no change for users:
* Make BaselineValidator an interface, rename current BaselineValidator
* Use components with Role BaselineValidator. Current implementation
would have a hint such as "exact-version".
* Introduce a "baselineStrategy" property to select the component to use
for baseline. Default value would be "exact-version" to not change
* Implement a NoBaselineValidator which does nothing
(baselineStrategy="none"), independently of baselineMode and
I'll comment in gerrit
Iteration #2: Make it useful without breaking anything
* Implement a compatible-version-with-same-content strategy, comparing
content of bundles with same x.y.z (ignoring qualifier) and replace by
baseline when there is no change worth producing a new bundle.
At the end of this iteration, we should be able to consume "compatible"
bundles from baseline just by setting
Now thinking about this, what you want may require massive changes to
how dependency resolution works and it may be a good idea to wait until
we fix move dependency resolution to proper build phase.
Currently all build fully qualified versions are determined and all
dependencies are resolved before the actual build starts. If later
during the build project artifacts are replaced with baseline and get
different fully qualified version, I this there is currently no
mechanism to propagate the new version of other projects that depend on
Iteration #3: Make it shine, but this would contain breaking change:
* Move the support of the BaselineMode and BaselineReplace to an
abstract class, since it seems like they'll be handled the same way by
various BaselineValidator. It appears that this abstract class would
probably consume some "deltas" provided by implementations.
* Make default behavior being using baselineStrategy="none" (would force
current users to set baselineStrategy="exact-version")
* Remove BaselineMode.disable and BaselineReplace.none in favor of using
no baseline (baselineStrategy=none will select a baseline validator that
I think internal changes are fine. I am not sure I like changes to the
configuration and default behaviour, but we can discuss these when we
I am also not convinced you'll be able to implement reliable
compare-without-version-qualifier logic, so the new strategy will have
to live outside of main tycho tree until it proves working correctly.