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

Implement the OSGi-Framework-Connect on top of Plexus #1152

Merged
merged 1 commit into from Jul 21, 2022

Conversation

laeubi
Copy link
Member

@laeubi laeubi commented Jul 18, 2022

OSGi provides a new specification that allows powerful integration of
"outside" bundles into a framework.

Tycho can leverage this to have a seamless integration with the P2 code
that requires OSGi to run but still interact with the OSGi parts without
additional integration/conversion patterns.

@github-actions
Copy link

github-actions bot commented Jul 18, 2022

Test Results

0 tests   0 ✔️  0s ⏱️
0 suites  0 💤
0 files    0

Results for commit fe2ce13.

♻️ This comment has been updated with latest results.

@mickaelistria
Copy link
Contributor

At the moment, it's not clear how this change makes the integration simpler or more powerful. Can you please provide an example by the way?

@laeubi
Copy link
Member Author

laeubi commented Jul 18, 2022

Full example is here, where i extracted the generic parts from: #718

The interesting part is here: https://github.com/eclipse/tycho/blob/f9dd2d1217d1294b43b9ec93cabd00ecb5224682/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/repository/P2RepositoryConnectorFactory.java#L71

IArtifactRepositoryManager repositoryManager = services.getProvisioningAgent()
						.getService(IArtifactRepositoryManager.class);

where from a maven mojo I can directly access services/object and there classes from within the connect-framework, while in current Tycho OSGi embedding they have distinct class-spaces and we have all these shared stuff that converts back and forth and also need to use anonymous collections.

@laeubi
Copy link
Member Author

laeubi commented Jul 18, 2022

e.g. #1117 is a good example....

@laeubi laeubi changed the title Implement the OSGi-Framework-Connect on to p of Plexus Implement the OSGi-Framework-Connect on top of Plexus Jul 18, 2022
@laeubi laeubi force-pushed the osgi-framework-connect branch 3 times, most recently from 6d77039 to 3b30442 Compare July 19, 2022 04:37
@mickaelistria
Copy link
Contributor

Does that imply that all occurrences of Set<?/* IInstallableUnit */> in Tycho code base will then be replaceable by Set<IInstallableUnit> and work everywhere?

@laeubi
Copy link
Member Author

laeubi commented Jul 19, 2022

Does that imply that all occurrences of Set<?/* IInstallableUnit */> in Tycho code base will then be replaceable by Set<IInstallableUnit> and work everywhere?

As a first step, yes, furthermore we can actually remove many codes that abstract and convert back and fourth... but this will be some work and most likely will be done step by step.

@laeubi
Copy link
Member Author

laeubi commented Jul 19, 2022

This relates to #1156

@laeubi
Copy link
Member Author

laeubi commented Jul 19, 2022

And finally, if we can get rid of the other framework in Tycho, we can also get rid of the bundle-product and everything is defined in terms of maven dependencies, will make maintain them much easier.

@mickaelistria
Copy link
Contributor

Yes, the promise with this change is huge! It's really about half of the code in Tycho that might become useless, and a stronger typing everywhere that will prevent from a lot of bugs. This has been a dream for many years!

@laeubi
Copy link
Member Author

laeubi commented Jul 20, 2022

This has been a dream for many years!

An finally dreams can become true thanks to the OSGi-R8-Framework-Connect :-)

I just wished I have discovered this a bit earlier before I have implemented it half way already :-(

OSGi provides a new specification that allows powerful integration of
"outside" bundles into a framework.

Tycho can leverage this to have a seamless integration with the P2 code
that requires OSGi to run but still interact with the OSGi parts without
additional integration/conversion patterns.
@laeubi laeubi merged commit 7f29092 into eclipse-tycho:master Jul 21, 2022
@laeubi laeubi added this to the 3.0 milestone Sep 21, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants