-
Notifications
You must be signed in to change notification settings - Fork 193
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
Suppress addition of unnecessary repo-refereces when assembling p2-repos #2744
Suppress addition of unnecessary repo-refereces when assembling p2-repos #2744
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 think this must then be configurable (at best with the ongoing <filter>
configuration) because we can't decide on the rationale if/how a user wants to add additional repositories, even though PDE currently not support this fully (see eclipse-pde/eclipse.pde#720 ) Tycho does so "unnecessary" depends on the usecase, and if the updatesites are really not required one probably should never add them to the target platform anyways ...
tycho-core/src/main/java/org/eclipse/tycho/core/TargetPlatformConfiguration.java
Outdated
Show resolved
Hide resolved
What do you think about having
that do this filtering with |
The schema sounds good and I think this fits well to #2742.
Sometimes yes, but I think there are scenarios where it is not so obvious. For example in the case of m2e (and probably many other eclipse projects) the license repo is not required since the license is inlined during the build. Or one could have a p2-repo from which test dependencies are fetched. That should probably then also not be added to a 'product' code repo. I'll update this PR tomorrow when #2742 is merged. |
Furthermore I think that instead of pruning the references based on the content of the artifact repository, it actually needs to be done based on the metadata repository. Otherwise the content provided by transitive references is not considered. Which in general brings me to another idea I had: |
better add an exhaustive documentation to the parameter that trying to express to much with the name
Its hard to guess what "most users" want, but this can't be the default for Tycho 4 at least and for 5 then needs a documentation in the migration guide.
This is a very special case and one can either filter that, or simply put the license repo in the pom and exclude pom repositories in the first place.
Yes the metadata is the "key" in fact not every requirement results in an artifact.
You can add a new option |
bd7d483
to
2bcceac
Compare
I think it is best to have both. An expressive name and a good description. And since we have the
Yes that's right. Sounds fair. Lets do it that way.
Yes that's right. But I think this is a general 'issue' of |
Longer names are not necessarily more expressive (but harder to remember / type), e.g. many mojos have a Especially for boolean "flags" using the negation is often confusing, e.g. |
...ory-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/AssembleRepositoryMojo.java
Outdated
Show resolved
Hide resolved
2bcceac
to
50b9c7a
Compare
It is of course reasonable to strip of the context, but I didn't suggest
That's a points. I choose exclude as it fits the underlying process since the references are first added and then removed. But of course this does not have to be reflected here. |
@HannesWell would be good if we can finish this I want to perform a new release end of month so this is included then. |
50b9c7a
to
b7e4c97
Compare
9cf4283
to
f04146b
Compare
This should now be almost ready. The only missing thing are to mention the new flag in the doc of I now changed the name of the property to
|
f04146b
to
458c6ae
Compare
This is now actually complete.
So either I'm doing something wrong or |
458c6ae
to
a58e8b7
Compare
I was doing something wrong. I used the old configuration where filters was used as plural. |
Good you find that out, so is this ready to be merged? |
Yes it finally is. |
The main goal of this PR is to prevent the addition of repository references that don't provide any relevant artifact or are full duplicates (relating the relevant artifacts) to other repositories and thus reducing the number of references which speeds up querying the repo since less other repositories have to be queried.
I think this becomes more relevant since one can now add repository references automatically and for example not all repos referenced in the TP are actually relevant for a p2-repository build for a project.
While with one can explicitly filter references with #2742, the user should not need to carry the burden to check manually which repos are relevant for the assembled repository. Instead Tycho should be smart enough to check that (and with this PR it can).
In detail his PR consists of three commits
Adding some information about added repo-references in the log seems to be reasonable since it is now not obvious anymore with auto-addition, explicit and implicit filtering which references actually end up in the repo.
Similar to #2742 (comment) we could consider to activate this auto-filtering only for those references that are added automatically, because one might have added an effectively empty repo on purpose.
The logging could also only activated if automatic addition is enabled.
Btw. for M2E this reduces the list of added references from 9 to 6:
to
Currently this includes work-arounds for the following pending P2 PRs that are not available before December.