-
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
Add non-IU artifact repositories to the planner resolution #874 #962
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this approach, just a few comments and Jenkins reports some compiler warnings (even though they are not displayed correctly here).
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FileArtifactRepository.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FileArtifactRepository.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FileArtifactRepository.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FileArtifactRepository.java
Outdated
Show resolved
Hide resolved
@jukzi as you are recently concerned about warnings, this is an example where one can see new warnings reported by Jenkins: @ptziegler sorry for the offtopic :-) |
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FileArtifactRepository.java
Outdated
Show resolved
Hide resolved
@laeubi could we fail the verification if new warnings are introduced? |
Yes we can |
I've cleaned up the FileArtifactRepository and so far, everything should work. In case of artifical features, I create an in-memory jar only containing the Note that I've renamed the repositories from FileRepository to VirtualRepository, given that they don't work on files anymore, so their name makes little sense anymore. What I still need to figure out is how to properly inject the repositories into the provisioning context. I probably need proper setter methods... given that the indented extension points are not an option. |
Extending the Provisiong context like you did seems a proper soloution to me... |
Overwriting the method probably works, then, but certainly not the way it's currently done: :P
|
Found the solution already: I can simply use a CompoundQueryable |
👍 |
@ptziegler there is even |
I’m impressed by your resourcefulness! 🏆 |
The usage of reflection has also been removed. That should be it, from my side. |
The new warning is unrelated to this change.
|
Yes this is sadly due to new maven version adding new warnings :- |
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one finding left, otherwise it looks good. 👍
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/VirtualArtifactRepository.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now, many thanks for your efforts in improving/fixing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @ptziegler for this PR.
This is good work and the functionality looks good.
Nevertheless I have a bunch of coding-style related remarks that should make some part simpler or more readable.
Because I was a bit short in time and didn't review this in the IDE, some remarks might not be applicable but are worth checking.
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/VirtualArtifactRepository.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/VirtualArtifactRepository.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/VirtualArtifactRepository.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/VirtualArtifactRepository.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/IUBundleContainerTests.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/IUBundleContainerTests.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/IUBundleContainerTests.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/IUBundleContainerTests.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java
Show resolved
Hide resolved
I hope I got all codestyle changes now... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the updates.
I agree with all answers and just have one small suggestion to further simplify the copy.
With that being applied this is a perfectly fine change and also ready from my side.
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/VirtualArtifactRepository.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
This looks very good now 👍🏽
I just wanted to note that the issue with two new maven warnings can be ignored if build/test is otherwise fine! I'm try to get rid of the warnings but its not that easy at least one of them should be fixed with this: but will need probably 1 hour unless it show up. |
Can't you just use the standard java |
That's what I'm really tempted to do at this point. Debugging suggests the output-stream is never closed, but given that the BND class is 100% undocumented, I can't say whether that's by intent or what to do about it. |
Please go for it. In general using standard Java instead of custom solutions should be preferred if the solutions are equivalent. In general at the point when transfering the feature model to the destination OutputStrram what is the intended output? Should it just be the |
Looking at the code again, it is probably indeed a jar necessary. |
946cbfe
to
9336f7f
Compare
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/VirtualArtifactRepository.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/VirtualArtifactRepository.java
Outdated
Show resolved
Hide resolved
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/VirtualArtifactRepository.java
Outdated
Show resolved
Hide resolved
…e#874 Given that units from non-IU locations are considered when resolving IUs, it may happen that units are contained in the resolution path, which are not contained by any repository. This may break previously functional target definitions. To resolve this problem, an in-memory artifact and metadata repository is created, based on the metadata of the non-IU locations. Those repositories are then added to the provisioning context for further processing. Amends dd321b5
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/VirtualArtifactRepository.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now.
Thanks again.
The implementation currently assumes all bundles are jars, but bundles from the shared bundle pool may be unpacked as folders. eclipse-pde#962
The implementation currently assumes all bundles are jars, but bundles from the shared bundle pool may be unpacked as folders. eclipse-pde#962
The implementation currently assumes all bundles are jars, but bundles from the shared bundle pool may be unpacked as folders. #962
Given that units from non-IU locations are considered when resolving IUs, it may happen that units are contained in the resolution path, which are not contained by any repository. This may break previously functional target definitions.
To resolve this problem, an in-memory artifact and metadata repository is created, based on the metadata of the non-IU locations. Those repositories are then added to the provisioning context for further processing.
Amends dd321b5