Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] IRequiredCapability internal?

Pascal,
We will look in to doing that soon(we don't have time for our current release). Is there any change, or planned change, that would cause this approach to fail for Eclipse based P2 requires in 3.6?

Marcus Kestler

Inactive hide details for Pascal Rapicault ---03/10/2010 10:24:43 AM---Even though today's IRequirements can be mapped straightPascal Rapicault ---03/10/2010 10:24:43 AM---Even though today's IRequirements can be mapped straight to IRequiredCapabilities. Relying on this s


From:

Pascal Rapicault <pascal@xxxxxxxxxxxx>

To:

P2 developer discussions <p2-dev@xxxxxxxxxxx>

Date:

03/10/2010 10:24 AM

Subject:

Re: [p2-dev] IRequiredCapability internal?

Sent by:

p2-dev-bounces@xxxxxxxxxxx




Even though today's IRequirements can be mapped straight to IRequiredCapabilities. Relying on this sort of mapping is just asking for trouble in the long run. The reason is simple. The expressiveness of IRequirement is far more superior to the one of IRequiredCapability and as soon as the community will start leveraging it (for example expressing or'ing, or more complex requirements) then all the tools making assumptions that an IRequirement == IRequiredCapability will start misbehaving.
So I really encourage you to review why you need to know about this and see if you can do without it.

On 2010-03-09, at 7:39 PM, Thomas M Houser wrote:

      If the end result is that there will be some public API that allows us to access the name, namespace, range, etc, of a RequiredCapability, then I don't see any reason for not making IRequiredCapability public API. It seems incredibly odd to me, though, for a metadata API to somehow pretend that you shouldn't care about the inner details of a requirement but at the same time provide metadata creation methods where these details are explicit. However, whatever you guys feel comfortable with. Is there a performance overhead with these extractName(), etc, methods? Can you send an example of what matchExpression would be used .. e.g. for the extractName() method: (String) matchExpression.getParameters()[0]

      From: John Arthorne <arthorne.eclipse@xxxxxxxxx>
      To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
      Date: 03/09/2010 11:10 AM
      Subject: Re: [p2-dev] IRequiredCapability internal?
      Sent by: p2-dev-bounces@xxxxxxxxxxx





      It looks like in the worst case this information can be extracted from the IRequirement.getMatches() object by copying the helper methods extractNamespace, extractName, and extractRange from the RequiredCapability class. That would allow you to get the information while only accessing API methods.

      However, if we know that *some* requirements can be expressed in the form namespace/name/range, then I'm not sure why we don't offer an API such as IRequiredCapability to obtain that information. That doesn't prevent us from having more general or specialized forms of requirements that are *not* represented as IRequiredCapability. If you have an IU that is known to be an OSGi bundle, then it seems reasonable to want to be able to introspect the metadata to find out things like the bundle/package imports via the p2 metadata API. I'm quite possibly missing something here though...

      John


      On Tue, Mar 9, 2010 at 12:15 PM, Thomas M Houser <
      tmhouser@xxxxxxxxxx> wrote:

      Not really. I'm charged with retargeting our code to Eclipse 3.6 (formerly targeted to 3.5 provisional API). I can only respond with generalities. We have build tooling for constructing product offerings. This build tooling generates other metadata based on p2 metadata. Therefore it reads p2 metadata and reasons about its structure. I can't give you any details, but I'll ask the engineers who use this API to respond.

      In general, though, I think it is kind of weird that you allow a client to construct a IRequiredCapability (via MetadataFactory.createRequiredCapability()), but do not allow a client to get the attributes of this concrete subclass.
      From: Thomas Hallgren <thomas@xxxxxxx>
      To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
      Date: 03/09/2010 08:54 AM
      Subject: Re: [p2-dev] IRequiredCapability internal?
      Sent by: p2-dev-bounces@xxxxxxxxxxx






      Hi Thomas,
      Given that an IRequirement no longer must contain name, namespace, and range, but instead can be an arbitrary _expression_ applied on an IInstallableUnit, perhaps we can help you find an alternative solution. Can you say something about why you need access to the requirement internals?

      Regards,
      Thomas Hallgren


      On 03/09/2010 05:47 PM, Thomas M Houser wrote:


      Pascal, in comment 3 of capilano work item 23579, you said:

      3.
      Pascal Rapicault (archived), Feb 1, 2010, 7:13 PM
      Only the following things will make it in the API:

      org.eclipse.equinox.internal.p2.metadata. IRequiredCapability
      org.eclipse.equinox.internal.provisional.p2. director.IDirector

      org.eclipse.equinox.internal.provisional.p2. director.IPlanner

      org.eclipse.equinox.internal.provisional.p2. director.PlanExecutionHelper

      org.eclipse.equinox.internal.provisional.p2. director.ProfileChangeRequest

      org.eclipse.equinox.internal.provisional.p2. metadata.MetadataFactory


      What's up with that? Can you please provide detailed instructions on implementing an equivalent to isOptional() using getMin() and getMax()? The javadoc present in the IRequirement class is just too overwhelming (I'm being sarcastic :-).

      Also, if it's really true that IRequiredCapability will not be API in 3.6, can you also provide instructions on implementing equivalents to getName(), getNamespace(), and getRange() using IRequirement API.
      From: Pascal Rapicault <pascal@xxxxxxxxxxxx>
      To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
      Date: 03/08/2010 06:40 PM
      Subject: Re: [p2-dev] IRequiredCapability internal?
      Sent by: p2-dev-bounces@xxxxxxxxxxx







      This got replaced by the getMin getMax on IRequirement.
      You will also notice that IRequiredCapability is no longer API.

      On 2010-03-08, at 9:10 PM, Thomas M Houser wrote:



      In "eclipse-SDK-I20100217-1031-win32.zip", the isOptional() method of IRequiredCapability was removed. This is a change from 3.6M5. Where did this go? What should be used instead?
      From: Pascal Rapicault <Pascal_Rapicault@xxxxxxxxxx>
      To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
      Cc: P2 developer discussions <p2-dev@xxxxxxxxxxx>, p2-dev-bounces@xxxxxxxxxxx
      Date: 01/25/2010 06:36 AM
      Subject: Re: [p2-dev] IRequiredCapability internal?
      Sent by: p2-dev-bounces@xxxxxxxxxxx








      Good point. The work on MetadataFactory needs to be done.


      <Mail Attachment.gif>
      Thomas M Houser ---22/01/2010 04:02:42 PM---I understand that there are potentially many forms of IRequirement. That makes sense, but that does not mean that the API prov
      <Mail Attachment.gif>
      From:
      <Mail Attachment.gif>
      Thomas M Houser <tmhouser@xxxxxxxxxx>
      <Mail Attachment.gif>
      To:
      <Mail Attachment.gif>
      P2 developer discussions <p2-dev@xxxxxxxxxxx>
      <Mail Attachment.gif>
      Date:
      <Mail Attachment.gif>
      22/01/2010 04:02 PM
      <Mail Attachment.gif>
      Subject:
      <Mail Attachment.gif>
      Re: [p2-dev] IRequiredCapability internal?









      I understand that there are potentially many forms of IRequirement. That makes sense, but that does not mean that the API provided by IRequiredCapability is not still useful to clients. They just need to be aware that this isn't the only kind of IRequirement. For example, we create requirements via MetadataFactory.createRequiredCapability(). How do we create concrete requirements without an API?
      From: Pascal Rapicault <Pascal_Rapicault@xxxxxxxxxx>
      To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
      Cc: p2-dev@xxxxxxxxxxx, p2-dev-bounces@xxxxxxxxxxx
      Date: 01/22/2010 12:39 PM
      Subject: Re: [p2-dev] IRequiredCapability internal?
      Sent by: p2-dev-bounces@xxxxxxxxxxx









      IRequiredCapability was limiting in what it could express. For example it could not express negation and or'ing, and it could only described dependencies on something that had a namespace, a name and a version and we are striving to express requirements and capabilities on other things (for example BundleExecutionEnvironment). As such, to ensure for API evolution we have turned the too specific IRequiredCapability into an IRequirement.
      IProvidedCapability is still API, but it is very likely that it will either be turned into something more generic, or be marked internal if we don't have the time to make it API.
      As for IRequirementChange the reference to IRequiredCapability is something that we have still left to do (
      https://bugs.eclipse.org/bugs/show_bug.cgi?id=299506)

      The situation of the API now is that we have tried to move all the types that we needed to see made API in a final package for M5, however we still have work to do to reach the final state for 3.6 (hopefully by M6).

      If you have feedback, it is very much appreciated,

      HTH




      <Mail Attachment.gif>
      Thomas M Houser ---22/01/2010 03:23:08 PM---I'm migrating from Eclipse 3.5 to Eclipse 3.6 (I20100119-0800). Can someone explain why IRequiredCapability is now internal in
      <Mail Attachment.gif>
      From:
      <Mail Attachment.gif>
      Thomas M Houser <
      tmhouser@xxxxxxxxxx>
      <Mail Attachment.gif>
      To:
      <Mail Attachment.gif>
      p2-dev@xxxxxxxxxxx
      <Mail Attachment.gif>
      Date:
      <Mail Attachment.gif>
      22/01/2010 03:23 PM
      <Mail Attachment.gif>
      Subject:
      <Mail Attachment.gif>
      [p2-dev] IRequiredCapability internal?










      I'm migrating from Eclipse 3.5 to Eclipse 3.6 (I20100119-0800). Can someone explain why IRequiredCapability is now internal in 3.6 when it was provisional API in 3.5? What is the rationale for making this internal? Why is IProvidedCapability considered API when IRequiredCapability is not? Why does the IRequirementChange API have a matches() method whose parameter type is IRequiredCapability an internal API?
      _______________________________________________
      p2-dev mailing list

      p2-dev@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/p2-dev

      _______________________________________________
      p2-dev mailing list

      p2-dev@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/p2-dev

      _______________________________________________
      p2-dev mailing list

      p2-dev@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/p2-dev

      _______________________________________________
      p2-dev mailing list

      p2-dev@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/p2-dev


      _______________________________________________
      p2-dev mailing list

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

      p2-dev@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/p2-dev




      _______________________________________________
      p2-dev mailing list

      p2-dev@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/p2-dev

      _______________________________________________
      p2-dev mailing list

      p2-dev@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/p2-dev



      _______________________________________________
      p2-dev mailing list

      p2-dev@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/p2-dev

      _______________________________________________
      p2-dev mailing list

      p2-dev@xxxxxxxxxxx
      https://dev.eclipse.org/mailman/listinfo/p2-dev


      _______________________________________________
      p2-dev mailing list

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


GIF image

GIF image


Back to the top