Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-dev] Mylyn WikiText and optional dependencies

Thought I'd make a few comments ... in an area I know little about ... but
that never stops me :)

That is, I don't know your specific use-case or users very well, but I will
say that I think use of
 resolution:=optional;x-installation:=greedy
should be very rare.

David (Green) says " but I'd like to keep WikiText dependencies to a
minimum and not require jsoup for use of WikiText."
but then "However if people would like to use the HTML parsing function of
WikiText, then they should have the option of using jsoup."

But making it runtime optional, but p2 greedy does not give your users much
choice, if any. They either won't get it at all, if it is not in the (a)
repository, or else everyone will get it if it is in the (a) repository.
And its is rather hard for you, the producer, to determine what repo(s)
they might be using and hard to determine what is in all repos.

Perhaps you mean "feature" when you say "An alternative would be to create
a new bundle for this functionality, but It seems a little heavy-weight to
create a whole new bundle for this purpose."  IMHO, a feature should be
carefully considered and would be a good solution for giving users (and
adopters) a true choice. You might have one feature for "wiki text" and
another for "wiki text with HTML parsing" (if that makes sense to you and
your users) or, perhaps it would be "wiki text full install" or "wiki text
minimum install" .... that is the way to really leave it up to your users.
An adopter could then, also, control what they got by with and used in
their "add on" products. Otherwise, even if they created their own feature,
with your bundle that had the runtime optional, but p2 greedy bundle, then
their users to either may or may not get it depending on what repos they
had on their list, and what was in this repo. We've seen, in the past,
cases where if someone installed something from "webtools repository"
they'd end up with some things installed, but if they installed it from the
indigo repository they would end up with some thing extra things installed
just because some optional thing we in webtools didn't really want
installed, was listed as optional by some bundle we did want, but, which
was not even our bundle.

So, if you really want users to have a choice, I'd recommend the features
approach. Maybe this isn't really what you were saying so won't be relevant
to you, but thought I'd comment, in case it is helpful to you.

Just trying to be helpful.

Thanks,






From:	Steffen Pingel <steffen.pingel@xxxxxxxxxxx>
To:	Mylyn developer discussions <mylyn-dev@xxxxxxxxxxx>,
Date:	01/22/2012 08:20 AM
Subject:	Re: [mylyn-dev] Mylyn WikiText and optional dependencies
Sent by:	mylyn-dev-bounces@xxxxxxxxxxx



If you specify an optional dependency it will be marked as non-greedy by
default (in previous Tycho versions optional dependencies used to be greedy
by default). To ensure that the publisher marks an optional dependency as
greedy add a special directive in the manifest [1]:

 resolution:=optional;x-installation:=greedy

Also be aware that optional, non-greedy dependencies that are required
during compile time need to be listed in the build.properties
as jars.extra.classpath entries.

Steffen


[1] http://wiki.eclipse.org/Equinox/p2/Publisher#BundlesAction

On Sun, Jan 22, 2012 at 1:56 AM, David Green <david.green@xxxxxxxxxxx>
wrote:
  I'm in the process of working on this, and looking for advice with
  respect to dependencies:

  357294: [api] provide API for converting content to wiki markup
  https://bugs.eclipse.org/bugs/show_bug.cgi?id=357294

  I'd like to consume jsoup from Orbit, but I'd like to keep WikiText
  dependencies to a minimum and not require jsoup for use of WikiText.
  However if people would like to use the HTML parsing function of
  WikiText, then they should have the option of using jsoup.  For this
  reason it makes sense to use an optional dependency -- however I'd like
  for the dependency to be greedy from a p2 perspective.  What do you
  think, is this the right approach?  An alternative would be to create a
  new bundle for this functionality, but It seems a little heavy-weight to
  create a whole new bundle for this purpose.  If optional dependencies are
  the way to go, how would I make the dependency greedy for p2?

  Thanks,

  David

  --
  David Green
  VP of Engineering, Tasktop
  Committer, Eclipse Mylyn
  http://tasktop.com
  +1-778-588-6896 ext. 115



  _______________________________________________
  mylyn-dev mailing list
  mylyn-dev@xxxxxxxxxxx
  https://dev.eclipse.org/mailman/listinfo/mylyn-dev




--
Steffen Pingel
Senior Software Developer, Eclipse Mylyn
Mylyn Tasks Lead
http://tasktop.com
_______________________________________________
mylyn-dev mailing list
mylyn-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-dev




Back to the top