buckminster.download.source=true causes failure [message #722340] |
Mon, 05 September 2011 08:35  |
Eclipse User |
|
|
|
I'm just trying to get a feature to resolve from multiple p2 sites but some plug-ins do not have associated source plug-ins. I would like to resolve and materialize as many source plug-ins in to the IDE's target platform as possible and ignore those where there is no source.
It would be good if Buckminster would continue even if .source plug-ins cannot be found.
Should I file this as a bug?
Alan
|
|
|
|
|
Re: buckminster.download.source=true causes failure [message #722736 is a reply to message #722698] |
Tue, 06 September 2011 11:34   |
Eclipse User |
|
|
|
Okay, so there is a problem in the ResolverNodeWithJob.buildTree() method, or at least, its dependent objects.
The code loops through the dependencies of the ResolvedNode to create its child queries, which have not got the filter applied to them. The Resolution.cspec.dependencies however, do have the eclipse.p2.optional filter set. So I guess there is a problem where the cspec is having the .source plug-in dependency added with filter, but the Resolved node is not including that filter when it adds those plug-in dependencies.
Then when the ResourceMap.resolve() method calls request.isOptional(), having failed to resolve the .source plug-in, the ComponentRequest.filter field is null, so the whole Buckminster resolution is counted as a failure.
Definitely a bug.
|
|
|
Re: buckminster.download.source=true causes failure [message #722749 is a reply to message #722736] |
Tue, 06 September 2011 11:38   |
Eclipse User |
|
|
|
On 2011-09-06 17:34, Alan Underwood wrote:
> Okay, so there is a problem in the ResolverNodeWithJob.buildTree() method, or at least, its dependent objects.
> The code loops through the dependencies of the ResolvedNode to create its child queries, which have not got the filter
> applied to them. The Resolution.cspec.dependencies however, do have the eclipse.p2.optional filter set. So I guess there
> is a problem where the cspec is having the .source plug-in dependency added with filter, but the Resolved node is not
> including that filter when it adds those plug-in dependencies.
>
> Then when the ResourceMap.resolve() method calls request.isOptional(), having failed to resolve the .source plug-in, the
> ComponentRequest.filter field is null, so the whole Buckminster resolution is counted as a failure.
>
> Definitely a bug.
I find it odd that I've never encountered this bug although we resolve with source in all our builds. I know for sure
that many bundles doesn't come with source.
Can you give me a bit more detail about your set up and what kind of errors you see? What version of Bucky are you using?
- thomas
|
|
|
Re: buckminster.download.source=true causes failure [message #722977 is a reply to message #722749] |
Wed, 07 September 2011 07:01   |
Eclipse User |
|
|
|
Hi Thomas,
I'm using Buckminster v 1.4.0.v20110712-1350
I have a plug-in org.h2 in maven but there is no source plug-in.
When Buckminster downloads the plug-in it adds the .source dependency with the eclipse.p2.optional filter.
But when Buckminster then tries to fetch the org.h2.source plug-in there is no filter on it, so Buckminster considers it to not be optional, it is required. Somewhere the org.h2.source request loses the optional filter, and I think it is to do with the dependencies on the ResolvedNode (its child nodes) not being the same as the dependencies in the resolution.cspec.dependencies. When I step through the code, the ResolvedNode child which is the org.h2.source does not have a filter (it is null) but when I look at the resolution.cspec.dependency which is org.h2.source the filter is there.
But the ResolverNodeWithJob.buildTree() method uses the ResolvedNode children rather than the resolution children, so there is no filter.
I've just tried it with a test plug-in and it works, though!
Investigating...
Ah! So, if I have an advisor node in my cquery with pattern org.h2 (I'm only overriding the version specifier), THAT is when the resolver fails on the org.h2.source and THAT is when the filter is null.
Any ideas?
|
|
|
|
|
Re: buckminster.download.source=true causes failure [message #723020 is a reply to message #722977] |
Wed, 07 September 2011 08:35   |
Eclipse User |
|
|
|
On 2011-09-07 13:01, Alan Underwood wrote:
> Hi Thomas,
>
> I'm using Buckminster v 1.4.0.v20110712-1350
>
> I have a plug-in org.h2 in maven but there is no source plug-in.
>
> When Buckminster downloads the plug-in it adds the .source dependency with the eclipse.p2.optional filter.
>
> But when Buckminster then tries to fetch the org.h2.source plug-in there is no filter on it, so Buckminster considers it
> to not be optional, it is required. Somewhere the org.h2.source request loses the optional filter, and I think it is to
> do with the dependencies on the ResolvedNode (its child nodes) not being the same as the dependencies in the
> resolution.cspec.dependencies. When I step through the code, the ResolvedNode child which is the org.h2.source does not
> have a filter (it is null) but when I look at the resolution.cspec.dependency which is org.h2.source the filter is there.
> But the ResolverNodeWithJob.buildTree() method uses the ResolvedNode children rather than the resolution children, so
> there is no filter.
>
> I've just tried it with a test plug-in and it works, though!
>
> Investigating...
>
> Ah! So, if I have an advisor node in my cquery with pattern org.h2 (I'm only overriding the version specifier), THAT is
> when the resolver fails on the org.h2.source and THAT is when the filter is null.
>
> Any ideas?
It seems that when you override the version, the filter gets overridden too. Please file a bug on that.
- thomas
|
|
|
|
Re: buckminster.download.source=true causes failure [message #723028 is a reply to message #723024] |
Wed, 07 September 2011 09:23  |
Eclipse User |
|
|
|
Thomas
Thanks for the tip about the regular expression for the advisor node. That's a better fix than my workaround.
Filed new bug
http://bugs.eclipse.org/bugs/show_bug.cgi?id=356930
Alan
P.S. I hadn't realized the name patterns for advisor nodes were proper java regexes. It would be good to have a better example of a regex for advisor nodes in the bucky book. The screenshots and most examples are very glob-like e.g 'org.eclipse.*' rather than '^org\.eclipse\..*'
[Updated on: Wed, 07 September 2011 09:30] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03234 seconds