Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 396245 - something is a miss with examples source feature versioning
Summary: something is a miss with examples source feature versioning
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Releng (show other bugs)
Version: 4.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Releng-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-11 03:06 EST by David Williams CLA
Modified: 2013-03-04 00:25 EST (History)
0 users

See Also:


Attachments
comparing 3.8.x to 4.2.x (8.39 KB, text/plain)
2013-01-04 12:19 EST, David Williams CLA
no flags Details
comparing 4.2.x to 4.3.x (8.44 KB, text/plain)
2013-01-04 12:22 EST, David Williams CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Williams CLA 2012-12-11 03:06:55 EST
Bug 396009 was about a specific case where the examples source feature did not adequately describe its contents. The root cause of that is that the source feature is not getting assigned a suffix. For example, from a recent run .. 

$ ls -1 features
org.eclipse.sdk.examples_3.5.101.v20121211-005349-81FCDFcgFLWk78APnnpFnu5GoM.jar
org.eclipse.sdk.examples.source_3.5.101.v20121211-005349.jar

Notice the prefix part is the same ... when it was last touched in source repository. The suffix is made up by changes in contents, so if example bundles change, the suffix will change, but ... the source feature itself will forever keep the same version, since it has no suffix. 

v20121211-005349-81FCDFcgFLWk78APnnpFnu5GoM
v20121211-005349

I just wanted to document the general issue here. I'm sure it can be fixed, but it may not be worth too much effort, since the Tycho based builds will use a non-suffix technique and thus should no have this problem. 

In the mean time, if a source bundle is touched, even if to fix a pom file, we need to remember to "touch" the feature so its qualifier will increment. I've "turned on" the comparator even for these examples, so should be easier to spot when it happens (though, won't be quite automatic, at least for a while).
Comment 1 David Williams CLA 2013-01-04 12:19:36 EST
Created attachment 225226 [details]
comparing 3.8.x to 4.2.x

After encountering this general issue a couple of times, in as many weeks, I at least looked at a little more detail at our "example repo" ... doing a diff of contents. 

I was surprised at how many changes there are (implied by the qualifier changes).
Comment 2 David Williams CLA 2013-01-04 12:22:30 EST
Created attachment 225227 [details]
comparing 4.2.x to 4.3.x

similar number of differences from 4.2.x to 4.3.x. If there are really "changes" being made to examples, that's fine, but, I wonder if the large number of changed qualifiers is an artifact, of some sort?, related to the way we build them, rather changes to the code itself.
Comment 3 David Williams CLA 2013-01-04 12:47:26 EST
Just some quick observations on what I've discovered about the "oddities" of examples. 

First, I've discovered there is a separate target for sdk.examples, even though they are also included in the master.feature (and built there). 

Apparently, the sdk.examples is called first, before the master target. 

Apparently this is done in the "buildEclipseSourceDrops" target, which we don't really deliver "source drops" any longer, but there is a comment in there that says 

<!--examples are required to pull sample doc into SDK doc plug-ins -->

The "source drops" and "real build" are controlled by 

        <antcall target="buildEclipseSourceDrops" />
        <antcall target="buildMasterFeature" />

I'm sure I tried this when first taking over from Kim, but I'm tempted to try a few nightly build with "buildEclipseSourceDrops" commented out to determine what real effect it has; and what ever those are, if there is a better solution?
Comment 4 David Williams CLA 2013-01-04 16:03:05 EST
I'm going to try an experiment with tonight's Nightly build; put 
generateFeatureVersionSuffix=true
in the build.properties of the 
sourceTemplateFeature 
of
org.eclipse.sdk.examples-feature

We do not do that elsewhere, instead relying on the build.properties in the buildConfig to have priority (and build.properties of sdk.examples DOES have it set) .... but, maybe there's some odd interaction with the "early checkout" of examples that requires it at the lower level. 

Seems worth a try, with little to hurt?
Comment 5 David Williams CLA 2013-03-04 00:25:59 EST
Never figured out this problem, but should no longer be an issue in Maven/Tycho based builds.