ssi-schaefer / lcdsl

Eclipse Launch Configuration DSL (Xtext based)
Eclipse Public License 1.0
23 stars 12 forks source link

Resolve deps using DependencyManager found in PDE #77

Closed haubi closed 7 months ago

haubi commented 9 months ago

Seen with Eclipse 2023-06, the launch configurations created by LcDSL lacks some required bundles, but the "Select Required" button in PDE launch config editor does resolve them. The idea now is to utilize the PDE internal DependencyResolver, which drives the "Select Required" button.

Unfortunately, PDE DependencyResolver omits unresolved bundles, which we need to retain when exporting products (towards BDeploy) based on launch configurations, for allowing them to run on different platforms than the export was performed on.

Also, PDE DependencyResolver does not allow to omit arbitrary bundles, required for the 'ignore' LcDSL keyword.

Hence, at first I copy in PDE DependencyResolver without further changes. Then, adapt the local DependencyResolver for our needs, in a dedicated commit which potentially can be forwarded towards PDE upstream.

Beyond that, also utilize the PDE "Select Required" implementation to define start levels for special bundles.

And finally, remove everything needless from local DependencyResolver, to reduce imports from PDE internal as much as possible.

For completion, this feels worth an LcDSL revbump.

mduft commented 9 months ago

There were good reasons for us back then to not use any of the PDE code. Mainly due to it sometimes being totally wrong :D If you change this, I suggest you do some thorough tests in a large workspace with many launch configurations, potentially also with historic versions of it (different target platform versions) to assure that things are working correctly. Also note that the dependency calculation is not only used to launch applications, but also by TEA to determine the content of binary builds of the same applications. In the past we had the situation (sometimes) that launching in the workspace worked, but binary was broken and the other way round.

TL;DR: please test this change even better than most others :D