-
Notifications
You must be signed in to change notification settings - Fork 45
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
Embed the required StateFactory implementations #455
Conversation
Beside the zip packaging problem this seem to not break anything @merks do you want to give it a try with Ooomph? @tjwatson what do you think? I know it is not nice to copy the code, but it seems unlikely P2 will ever be able to move away from the API interface and at least we can strip down everything to the bare minimum P2 is actually using here (e.g. it never uses a It seems without a state this always operates in "nonstrict mode" and we can even remove all code pathes that work on "strict" checks. |
It appears to cause no breakage for Oomph... |
One option would be if we move the fragment to P2 instead of copy one can simply link the sources here, see |
5dd7e82
to
cc618f7
Compare
cc618f7
to
062505f
Compare
bundles/org.eclipse.equinox.p2.publisher.eclipse/META-INF/MANIFEST.MF
Outdated
Show resolved
Hide resolved
I'm not convinced making a copy here helps much with anything vs. using the APIs and implementation fragment as they are today. |
The API will still be used (as we can't change this much) but the implementation (compatibility fragment) will not be required anymore as P2 don't really wants the "real" implementation, in fact is only uses that to parse the MANIFEST and provides that as a structured way to access the information. So one can also reimplement that, but copy whats already there seems to be a faster approach. |
062505f
to
f74d051
Compare
...ublisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/statefactory/StateBuilder.java
Outdated
Show resolved
Hide resolved
...ublisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/statefactory/StateBuilder.java
Outdated
Show resolved
Hide resolved
...ipse/src/org/eclipse/equinox/p2/publisher/eclipse/statefactory/GenericSpecificationImpl.java
Outdated
Show resolved
Hide resolved
f74d051
to
52250a2
Compare
I have now pruned all unused code from the implementation using http://www.ucdetector.org/ and removed all references to the internal implementation of equinox. |
b69e549
to
ba1ca70
Compare
Moved to internal package and renamed some classes to make it more obvious what is done here. |
Currently P2 has the BundleDescription in its API where the only implementation is in the discouraged osgi.compatibility fragment, but actually P2 does not really need a full implementation, it is just using that to parse manifest headers and generate metadata from it. This embeds a stripped down version of the actual implementation in the p2.publisher.eclipse that allows to create implementation objects without rely on the compatibility fragment anymore.
ba1ca70
to
191df76
Compare
FYI, I did check that this causes no compilation problem for Oomph so I think it's fine. I did not test behavior... |
Can't we migrate P2 to use the code from in the 'new' Equinox container, i.e. away from the old equinox resolver APIs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Of course we can migrate to "something else" but I don't really see much benefit in that:
So given PDE has moved away from this package we can decide to completely embed it into P2 instead of invent a new API and then we can even remove more things. |
Currently P2 has the BundleDescription in its API where the only implementation is in the discouraged osgi.compatibility fragment, but actually P2 does not really need a full implementation, it is just using that to parse manifest headers and generate metadata from it.
This embeds a stripped down version of the actual implementation in the p2.publisher.eclipse that allows to create implementation objects without rely on the compatibility fragment anymore.
This is currently work in progress and a way to track progress, the classes can most probably stripped down even more and currently depends on some equinox framework internals that probably should either be inline as well or an alternative should be chosen.