Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate (and remove) feature-source mojo #3458

Open
5 tasks
laeubi opened this issue Feb 4, 2024 · 3 comments
Open
5 tasks

deprecate (and remove) feature-source mojo #3458

laeubi opened this issue Feb 4, 2024 · 3 comments
Milestone

Comments

@laeubi
Copy link
Member

laeubi commented Feb 4, 2024

The feature-source mojo always was a bit tedious to use, for example it requires a manual configuration of meta-data generation to actually work:

if (!isP2GenerationEnabled()) {
logger.warn(
"""
org.eclipse.tycho:tycho-p2-plugin seems not to be enabled but will be required if the generated source-feature is used in an update-site or another feature. You can add the following snippet to your pom:\s
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-plugin</artifactId>
<executions>
<execution>
<id>attach-p2-metadata</id>
<phase>package</phase>
<goals>
<goal>p2-metadata</goal>
</goals>
</execution>
</executions>
</plugin>
""");

Beside that, source feature itself are more from an ancient time and modern Tycho does offer much better alternatives with less efforts and even better user experience with less manual work and configuration:

  1. Currently one needs to list all items in a feature to have them included in the source feature, especially for third party dependencies this unnecessarily binds the feature to an exact version that can't be upgraded independently and will need to be maintained manually if dependencies change
  2. source features are handled as artifacts and therefore are downloaded even though they usually not contain anything different (beside the id) than the feature itself
  3. If one wants to have sources included in a target, PDE/Tycho already offer convenient options to specify that sources are desired, even collecting everything that can be found not only items directly declared in a (source) feature.
  4. If one wants to have sources distributed with a site, Tycho offers the option to include all sources automatically, this will again not require them to be listed anywhere and will automatically adapt.
  5. If one wants to install sources together with a product, there is now an option in the materialize product mojo to enable this use case as well.
  6. If one wants sources explicitly mentioned in an update site, Tycho offers dynamic selection of those in category.xml

If one absolutely wants, of course a source feature can still be created as a separate project for very special demands, also existing source features can be used as is, so this is only about removing special support from Tycho for those.

What needs to be done:

  • Add new documentation section in the docs that explains the different ways to include / use source and different options
  • Deprecate the mojo in Tycho 4.x stream link to this issue
  • possibly migrate eclipse platform to no longer ship any source features to prove the feature can completely replaced by existing techniques
  • announce the intend to remove the mojo on cross-project-dev to give projects a last chance to step up if there are still usecases / demands that can't be full filled and evaluate possible ways to archive this in an alternative way
  • remove the mojo from the Tycho 5.x stream
@laeubi laeubi added this to the 5.0 milestone Feb 4, 2024
@HannesWell
Copy link
Member

Sounds reasonable to me.

@mickaelistria
Copy link
Contributor

I'm in favor of removing it, as there are numerous much more convenient solutions available.

@akurtakov
Copy link
Member

Fine with me. Only comment is that we would best have it verified with platform that no-source feature approach has any potential major issues figured before it's announced widely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants