[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: No solution found because the problem in /tmp/p2Encoding13004.opb is unsatisfiable.

On 12/11/2008 2:54 PM, John J Barton wrote:
Eric Rizzo wrote:

First of all, it is not an option for you to be ignorant about dependencies and installation management if you're going to be a plugin publisher. It is just as important as understanding how to use SWT or what to do in your Activator start/stop methods, etc; it goes with the territory.

Thanks Eric, I agree with you in general: developers need to understand how there code works in a system. But the tools/approach that eclipse uses are too difficult to use.

I disagree - I find most dependency situations to be easy to specify using the PDE tooling. There are some more tricky corner cases (see my thread "Transitive dependencies and optional plugins" from yesterday, for example), but those are rarely encountered in my experience.
As an example of the ease of the tooling, when I add a dependency to my plugin, Eclipse (as of 3.4) automatically inserts the current version of that plugin from my target platform as the "minimum required" version. That is handy and exactly what is wanted in 90%+ of cases.
Anyway, more below...


Now, if you want to target a particular version of particular plugins
(remember, each plugin can be updated and change its version
independently), you need to specify that in your plugins' Dependency

I do *not* want to do this. It's not practical for me or my users. What is practical is what we already do: "use ecilpse jee 3.4.0".

That is fine as a user instruction, but is not enough for the platform (OSGi) to go on. Remember that, although Eclipse has coordinated releases (named things like Europa, Ganymede, Galileo) and the EPP project produces convenient packages that include sets of plugins from those coordinated releases, each plugin can evolve independently AND a user is free to update or install new plugins at any time. Therefore it is impossible to define "Eclipse JEE 3.4.0" unless you spell out what versions of what features and plugins that includes. Plus, that is a very specific case, not one that most plugins or Eclipse-based products want because it would be VERY restrictive. For example, I can't use the SR2 (Ganymede 3.4.2, if you want to call it that) with your plugins? Really? There's no API changes allowed in an increment release (3.4.x) so there should not be such a restriction in most cases. See what I mean by the balance between guaranteed compatibility and overly restrictive?


Or is the simple answer that I have to build my plugin with exactly the
version of eclipse that I want users to install?

Well, for one thing you should ALWAYS be using a target platform, not building against the Eclipse that you are running as your IDE. It really irritates me that the default setup for the PDE is to use the running Eclipse as the target platform, because it can easily lead newbie plugin developers down a path with pitfalls. I suspect that is what has happened to you.
Here is one article explaining why: http://rcpquickstart.com/2008/04/21/why-create-a-custom-target-platform/
Here's the relevant Help page: http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.pde.doc.user/guide/tools/preference_pages/target_platform.htm



list. For each plugin listed as a Dependency, you can (and should)
specify a version range that is acceptable. Of course it is not a
trivial matter, you have to think about the version ranges you want to
allow: too restrictive and your stuff won't be compatible with
arbitrary Eclipse instances; too loose and you'll get installed into
environments that aren't really compatible with your code.

Fine, but how do I make these choices? Its not like the plugin version numbers match the eclipse distro numbers. Some are 3.4.1. If I pick 3.4.0 then does my build have any relation to the install? Some are 3.2.1. Why? What will my users have in their ecilpse 3.4.1? also 3.2.1?

Hopefully my second paragraph above makes clear why version numbers do not line up across plugins. To repeat: each plugin evolves independently. I think this wiki page might help, too: http://wiki.eclipse.org/index.php/Version_Numbering



This is all part of designing a plugin or plugins - you have to think
about what your target environment requirements are and embed that
info into your plugin(s) dependencies and possibly your Feature
definition.

I know the requirements, I don't know how to tell eclipse to use them.

In the Dependencies tab of your plugin(s); select a plugin listed there and hit the Properties button.


I really think setting up a target platform will make your life a lot easier. That is the first thing I would do if I were on your team ;-)

Hope this helps,
Eric