Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 276213 - add support for specifying Mylyn version constraint
Summary: add support for specifying Mylyn version constraint
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.2   Edit
Assignee: David Green CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 272621
  Show dependency tree
 
Reported: 2009-05-13 21:31 EDT by Steffen Pingel CLA
Modified: 2009-05-22 14:06 EDT (History)
2 users (show)

See Also:


Attachments
mylyn/context/zip (5.08 KB, application/octet-stream)
2009-05-21 12:12 EDT, David Green CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2009-05-13 21:31:30 EDT
It is not uncommon for connectors to use Mylyn internals. It is recommended to specify a version constraint that is compatible to the corresponding major release version in that case, e.g. [3.1.0,3.2.0) for a connector that works with Mylyn 3.1. Once a newer Mylyn major release is available the version specified by the connector has to be updated and a new connector release is required. The discovery UI should support this scenario. I can see the following options:

* The old Mylyn release should not allow installation of the new connector version: 
** The discovery UI indicate that a Mylyn upgrade is required to install the connector.
** The discovery UI could support multiple versions of the same connector with different version constraints against Mylyn and allow installation of an old version of the connector.
** The connector could be hidden from the discovery UI

* The new Mylyn release show not allow installation of the old connector:
** The discovery UI indicate that the connector is not available for the particular Mylyn release if it has not been updated for the release.
** The discovery UI could hide the old connector if it has not been updated for the Mylyn release.

The version of the org.eclipse.mylyn_feature feature is representative of the installed Mylyn version.
Comment 1 David Green CLA 2009-05-13 23:07:00 EDT
Sounds like we should discuss this one to come up with some well-defined requirements.

As far as determining the version of Mylyn, would it be sufficient to query the version of org.eclipse.mylyn.tasks.core instead of the feature?  It's certainly simpler.  Take a look at ConnectorDiscoveryWizard.createEnvironment()
Comment 2 David Green CLA 2009-05-21 12:12:50 EDT
I've imlemented featureFilter, which allows connectorDescriptors to specify a feature id and version range that must be present in order for the connectorDescriptor to remain unfiltered.  For example:

bc. 
<connectorDescriptor ...>
    <featureFilter featureId="org.eclipse.mylyn_feature" version="[3.2,4.0)"/>
    <featureFilter featureId="com.foo.bar_feature" version="1.0"/>
    <icon ../>
    <overview ../>
</connectorDescriptor>
Comment 3 David Green CLA 2009-05-21 12:12:55 EDT
Created attachment 136673 [details]
mylyn/context/zip
Comment 4 Steffen Pingel CLA 2009-05-21 18:00:16 EDT
As far as I can tell it is currently not possible to specify version constraints for the connector that is to be installed. That means if a connector only works with a certain version of Mylyn it would need to have its own update site, since the discovery component will always attempt to install the latest version. Is that correct?
Comment 5 David Green CLA 2009-05-21 21:00:19 EDT
(In reply to comment #4)
> As far as I can tell it is currently not possible to specify version constraints
> for the connector that is to be installed. That means if a connector only works
> with a certain version of Mylyn it would need to have its own update site, since
> the discovery component will always attempt to install the latest version. Is
> that correct?

Yes, that's correct.  Perhaps I misunderstood the original enhancement?  Please reopen or create a new enhancement request if so.
Comment 6 Steffen Pingel CLA 2009-05-21 21:24:04 EDT
Shawn, do you think it's a reasonable limitation to expect connector distributors to maintain separate update sites to support multiple Mylyn versions? 

The one example where that comes to mind that currently hosts multiple versions of a Mylyn integration on the same site is Subclipse.
Comment 7 Shawn Minto CLA 2009-05-22 11:13:16 EDT
Yes, I think that this is reasonable as the update managers aren't that smart if you try to do it on the same update site anyways.
Comment 8 Steffen Pingel CLA 2009-05-22 14:06:39 EDT
Good. Then the the current solution should work to support the main use-case. Thanks for getting this in David!