Bug 478996 - set-version does not update versions in feature.xml>requires>import
Summary: set-version does not update versions in feature.xml>requires>import
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jan Sievers CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2015-10-05 03:20 EDT by Sebastien Arod CLA
Modified: 2021-04-28 16:52 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastien Arod CLA 2015-10-05 03:20:12 EDT
The set-version plugin does not update version referenced from requires/import feature elements in feature.xml.
Comment 1 Jan Sievers CLA 2015-10-20 09:09:51 EDT
originally reported as

https://dev.eclipse.org/mhonarc/lists/tycho-user/msg06776.html

this is a version range scenario similar to  bug 477328
Comment 2 Sebastien Arod CLA 2015-10-20 11:33:21 EDT
The feature.xml>requires>import element does not use osgi version ranges for referencing a version.

It uses 2 attributes.

Extract from http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Ffeature_manifest.html&cp=2_1_5_20
* version - optional plug-in version specification. 
* match - optional matching rule. Valid values and processing are as follows: if version attribute is not specifies, the match attribute (if specified) is ignored.
  * perfect - dependent plug-in version must match exactly the specified version. If "patch" is "true", "perfect" is assumed and other values cannot be set.
  * equivalent - dependent plug-in version must be at least at the version specified, or at a higher service level (major and minor version levels must equal the specified version).
  * compatible - dependent plug-in version must be at least at the version specified, or at a higher service level or minor level (major version level must equal the specified version).
  * greaterOrEqual - dependent plug-in version must be at least at the version specified, or at a higher service, minor or major level.



If we want to keep things consistent with bug 477328 we could do the following:

* When a requires>import element references an element (feature or plugin) that becomes unsatisfied due changes made by set-version the version should be updated to keep the import satisfied.

* Additionally if the property "updateVersionRangeMatchingBounds" is set to true. import element version should be updated if it was matching the major.minor.micro part of the version even if it is still satisfied.
Comment 3 Jan Sievers CLA 2015-10-20 11:56:55 EDT
(In reply to Sebastien Arod from comment #2)
> If we want to keep things consistent with bug 477328 we could do the
> following:
> 
> * When a requires>import element references an element (feature or plugin)
> that becomes unsatisfied due changes made by set-version the version should
> be updated to keep the import satisfied.
> 
> * Additionally if the property "updateVersionRangeMatchingBounds" is set to
> true. import element version should be updated if it was matching the
> major.minor.micro part of the version even if it is still satisfied.

+1
Comment 4 Vincent Guignot CLA 2015-12-08 01:57:45 EST
Any news about this bug ?
Comment 5 Sebastien Arod CLA 2015-12-08 15:51:03 EST
I'll try to work on this this week.
Comment 6 Sebastien Arod CLA 2015-12-10 05:46:49 EST
I published a fix on gerrit but it doesn't appear on this bug.
https://git.eclipse.org/r/#/c/62347/
Comment 7 Jan Sievers CLA 2015-12-10 05:54:16 EST
(In reply to Sebastien Arod from comment #6)
> I published a fix on gerrit but it doesn't appear on this bug.
> https://git.eclipse.org/r/#/c/62347/

If you prefix the first line of the commit message with "Bug: <number>" the bot will cross-link bug and proposed gerrit change. I just updated https://wiki.eclipse.org/Tycho/Contributor_Guide#Commit_Message_Guidelines accordingly
Comment 8 Jan Sievers CLA 2015-12-10 05:56:57 EST
(In reply to Jan Sievers from comment #7)
> (In reply to Sebastien Arod from comment #6)
> > I published a fix on gerrit but it doesn't appear on this bug.
> > https://git.eclipse.org/r/#/c/62347/
> 
> If you prefix the first line of the commit message with "Bug: <number>" the
> bot will cross-link bug and proposed gerrit change. I just updated
> https://wiki.eclipse.org/Tycho/Contributor_Guide#Commit_Message_Guidelines
> accordingly

according to bug 465045, "Bug: <number>" at the end of the commit message should work too. so looks like you just missed a colon.
Comment 9 Sebastien Arod CLA 2015-12-10 06:20:08 EST
The colon in the message footer was the issue.
Thanks
Comment 11 Jan Sievers CLA 2015-12-11 03:23:19 EST
thanks for the patch!

I guess we should have a short description of this feature in the release notes

https://wiki.eclipse.org/Tycho/Release_Notes/0.25