testforstephen / vscode-pde

VSCode extension to support Eclipse PDE
18 stars 4 forks source link

Consider packaging org.eclipse.m2e.pde.target to add Maven artifact support to target files #42

Closed rgrunber closed 1 year ago

rgrunber commented 2 years ago

Eclipse PDE has support for converting Maven artifacts into OSGi bundles dynamically. One can use a target file like : https://github.com/eclipse/lsp4mp/blob/d9a55eb9bbb19e8a88c0d94accef730b4b055fa5/microprofile.jdt/org.eclipse.lsp4mp.jdt.tp/org.eclipse.lsp4mp.jdt.target .

Screenshot from 2022-08-19 20-10-33

Current issue is that org.eclipse.m2e.pde.target depends on org.eclipse.pde.ui which is a UI component. However, nothing in the plugin should require it from what I can tell. Even the extension it uses comes from pde.core. Fixed with https://github.com/eclipse-m2e/m2e-core/commit/6259d8e86cb207bff1c62a6a5e6dc68ae8671507 .

rgrunber commented 2 years ago

https://download.eclipse.org/technology/m2e/snapshots/2.0.2/ (towards the 2.0.2 or 2.1.0 release) should contain a version of org.eclipse.m2e.pde.target 2.0.1 that does not depend on any UI components.

I think the additional dependencies introduced would be :

36K org.osgi.service.repository_1.1.0.201505202024.jar 72K org.eclipse.m2e.pde.target_2.0.1.20220822-2010.jar 452K biz.aQute.bnd.util_6.3.1.202206071316.jar 3.2M biz.aQute.bndlib_6.3.1.202206071316.jar

rgrunber commented 2 years ago

Note that this could be considered lower priority for now. As it happens in lsp4mp, we actually found a way to avoid using maven artifacts for now (basically Guava does what we need and it's available in the JDT-LS runtime).

However the motivation from this comes from https://www.eclipse.org/lists/cross-project-issues-dev/msg19066.html . So at some point, we may want latest version of the contents from within the Orbit repo at https://github.com/eclipse/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.target/org.eclipse.jdt.ls.tp.target#L10 , and they may only be available as Maven artifacts, which will mean for developers to resolve that target file in vscode-pde, they'll depend on this issue.

mickaelistria commented 1 year ago

Maven artifacts in .target are getting very mainstream, JDT, Platform, Equinox, LSP4E, TM4E, CDT, Wild Web Developer and JDT-LS since https://github.com/eclipse-jdtls/eclipse.jdt.ls/pull/2826 ... are all using them. So it's now high priority to support it

rgrunber commented 1 year ago

This appears to be working with https://github.com/testforstephen/vscode-pde/commit/74c2a1c2897abbb6dc6e00b71c20041eca2f234e .

testforstephen commented 1 year ago

I forgot to update the issue. Yes, this has been fixed in vscode-pde@0.10.0.