-
Notifications
You must be signed in to change notification settings - Fork 79
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 an option to ignore references #1253
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.
@tivervac thank you for the PR that looks like a useful improvement, I added some comments. Also note that a corresponding change would be required in Tycho to support the new attribute.
...pse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinitionPersistenceHelper.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/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
571bc6f
to
61d2926
Compare
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/IUBundleContainer.java
Outdated
Show resolved
Hide resolved
61d2926
to
3586229
Compare
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/IUBundleContainer.java
Outdated
Show resolved
Hide resolved
That's a good catch. Disabled references should not be considered. |
d249ff2
to
d626741
Compare
@laeubi The build here seems to fail. Do you know what's going on? Also, what's the difference between |
That looks strange an I have never seen this error before in PDE ... but the Github UI suggest that there are recent changes in the master branch, can you try to rebase your changes an current master if it solves the issue? Beside that "continuous-integration/jenkins/pr-head" is the actual Jenkinsjob and "Jenkins " is the github action integration status check on Github level. |
d626741
to
51aeb94
Compare
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/IUBundleContainer.java
Outdated
Show resolved
Hide resolved
Looking at the failing tests it seems like new attribute somehow shows up in existing test-cases altough it should not be persisted if it's value is the default. |
Thanks, when I asked the question, the build was failing in a weird way. Now it's recognizable that these are test failures. |
@tivervac I think the tests needs adjustments now because they supply a new completion e.g. here:
So I think it fair enough to simply make the test assume that new attribute now (what ever it will be named). |
Adds - The UI checkbox and corresponding help section - Syntax (highlighting and autocomplete) for the .target source editor - Doesn't serialize the default state to keep legibility
f45a096
to
05b656f
Compare
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 for me!
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java
Show resolved
Hide resolved
Introduced in eclipse-pde#1253
Note: there might be another way to do this, as I found a few half-wired up places. However, I couldn't find one while investigating my use case, so I added somewhat simple code that implements my use case.
I'm trying to proxy an entire target platform through an artifact repository, i.e., Nexus. As such, I've defined the software sites in my target platform to point to proxies of my own server. Sadly, it seems like p2 software sites are not necessarily self-contained. Namely, they can contain references to other repositories.
In our case, this causes us to load 122 external repos. Strikingly, most of these come from disabled references. As such I've added some code that would skip over these, let me know if that isn't allowed for some reason.
Using only the enabled references, I still have 5 hits, much less, much faster, but not good enough. As such, I included a new backwards-compatible Software Site option that includes (or excludes) the traversal of references. In essence, this forces your software sites to be self-contained.
This ticket inspired another small ticket in p2.