-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guava + failureaccess resolution error #675
Comments
The commit resolves the resolution error that was raised in eclipse-linuxtools/org.eclipse.linuxtools#232 I have raised an issue in PDE here: eclipse-pde/eclipse.pde#675
The commit resolves the resolution error that was raised in eclipse-linuxtools/org.eclipse.linuxtools#232 I have raised an issue in PDE here: eclipse-pde/eclipse.pde#675
This is strange. I can try your example in the next days and see if I find something. |
Yes - I think it is just weird, probably some strange interaction. Linuxtools uses Guava 32.1.1.jre it their build and it works fine. I don't know how to make it standalone reproducible so that it isn't subject to the changes in the various nightly p2 urls my example references.
Thanks! |
This very minimal example also reproduces the problem:
I have a theory for why that might be... |
This one works:
And interestingly, the resolution shows this: Which might lead one to believe that com.google.guava.failureaccess IU is available in the linuxtools repository, but of course that's not the case or we would not have this problem. That pretty much confirms my theory... Looking in the debugger why this works, we can see that during the resolution of the InstallableUnit location, both repositories are made available for the planner: But for the failure case, that's of course not the case: For Oomph's targlets, I also ran into this problem when I added support for composing other *.target files. For that case I needed to resolve the other target and make its IUs available as if they were provided by a p2 repository during subsequent overall resolution of the composed targlets. But PDE is doing no such thing; each location is effectively resolved independently, though with special case handling for IUBundleContainer by org.eclipse.pde.internal.core.target.P2TargetUtils.getMetadataRepositories(ITargetDefinition), which gathers all the update sites. I suppose PDE might be made smarter such that it resolves all non-IUBundleContainer containers first, and is able to synthesis a p2 repository with all the resolved IUs and make those available when resolving the remaining IUBundleContainers. That sounds quite non-trivial... I'm sure the linuxtools repository will want to fix this problem because otherwise consumers will not be able to install the tools from this repository without some other repository providing the missing requirements. Also, the repository contains two versions of com.google.guava which is likely also not desired: |
This is not magic or strange at all. P2 Locations simply don't care about other (non UI location) at all see:
(By the way Tycho does not suffer from this restriction)
Actually it is not that complex but would require a two phase resolve operation, first collect and resolve all direct items and then perform the planner operation afterwards, that's how Tycho do it. But all this is behavioral change, probably breaking change and that's where it becomes not so trivial for anyone not liking getting punished for that. |
This is therefore a duplicate of #207 and I will close it as such. I think as we encourage other projects to migrate more people will see issues like this. I will leave @akurtakov to decide whether to reopen eclipse-linuxtools/org.eclipse.linuxtools#232 to make linuxtools repo self contained. |
I am on vacation and hope to not forget when I am back to add the missing guava dep. |
As said its is actually possible, but it will need conses if it should be changed as otherwise will end up in endless discussions and frustrated contributors ;-) |
Right. Thanks for pointing out, I forgot that again. In general I think it would be good to add support for that, but lets continue the discussion about that in #207. |
The commit resolves the resolution error that was raised in eclipse-linuxtools/org.eclipse.linuxtools#232 I have raised an issue in PDE here: eclipse-pde/eclipse.pde#675
Linux Tools has recently been updating their dependencies to 3rd party to use Maven. CDT started having a build failure resolving the target platform with an error like this:
The cdt target platform is pretty big, so this is my attempt to create a minimum version:
With the above target file you get the resolution error
Missing requirement: com.google.guava 32.1.1.jre requires 'java.package; com.google.common.util.concurrent.internal [1.0.0,2.0.0)' but it could not be found
- com.google.common.util.concurrent.internal is provided by failureaccess, so if I add:I expect it to resolve properly. But it doesn't work. However adding:
does work fine. The JAR file for both those resolutions are the same.
The text was updated successfully, but these errors were encountered: