Closed enikao closed 4 years ago
Thanks for reporting. This is definitely a bug. However you should be able to work around it by adding a "proxy" bundle to your workspace, which has no content, just the two "Require-Bundle"s for the two versions, and add that in the launch configuration instead.
Thanks for the hint. However, I only need this to work around issues in the auto-resolving, not my own plugins. Thus, I don't want to maintain additional artifacts.
Specifically:
Understood. Whilst I do want to fix this bug of course, you can still work around the issues with a single bundle with dependencies to all the doubled-up-dependencies. Nobody needs to actually use that bundle, it is just there to tear in additional dependencies that are impossible to declare with this bug.
(I know, you need to maintain that in your sources, and thats not nice. But OTOH, you would need to maintain this list of dependencies in the launch config otherwise...)
Yes, the real issue is the auto-resolver who does not understand this constraint and adds only the newest version (for both regular and LcDsl launch configs, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=472778).
Well, we do have dependencies to multiple guava versions transitively in our application, and LcDsl is able to generate launch configuration which contain both versions. We do NOT use the same resolver as Eclipse itself. I actually proposed a patch for the resolver a while ago. AFAIK the most current Eclipse has a different fix for the issue.
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=489319
Re-reading the upstream bug: do you have simpleconfigurator checked in your launch configuration?
What is simpleconfigurator? Maybe I looked up the wrong bug.
Your remark on resolver might explain another issue I have: My launch config behaves differently whether I run it via the menu bar or via the launch configs dialog. I didn't report it yet because my project is not yet available for you to look into (will change soon; it's a newer version of https://github.com/altran-mde/xtext-sirius-integration).
Simpleconfigurator is a simple implementation of a OSGi framework configurator which defines which bundles should be loaded by the runtime. It uses a bundles.info file which is generated if simpleconfigurator is used. Unfortunately it seems that Eclipse still defaults to using the ULTRA-legacy UpdateManager instead of P2 (the current mechanism for bundle management in RCP applications) which was used in very old Eclipse versions and does not /really/ know OSGi that well - especially duplicate bundles with just version difference don't work with it, even if the bundles are checked in the launch configuration.
Where do I choose the simpleconfigurator? I checked the launch config dialog and the preferences, and didn't find any hint.
Simply add the org.eclipse.equinox.simpleconfigurator (or so, from the top of my head) bundle to your launch configuration, or as dependency of your software.
doesn't really help; after clicking on "add required plugins" (in a regular launch config):
I'd like to add the same plugin twice, with different versions. This is possible in regular launch configs.
LcDsl gives an error
Duplicate PluginWithVersion 'org.antlr.runtime'
Example: