-
Notifications
You must be signed in to change notification settings - Fork 194
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
Feature restrictions are not taken into account when using emptyVersion #845
Comments
The error one sees here is:
The important part is Also to note is, that this error only occurs on the |
This is a regression somewhere between Tycho |
Looking at the
From
As one can see the required range now chooses the largest version (2.0) as an exact version in contrast to state before.
so this actually will result in both versions installed because only that way all requirements could be fulfilled. |
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
One observation: Original feature.xml:
Target (and packed) feature:
So the error is not in the p2metadata generation but in the packaging phase where the version is already replaced and thus p2 can't know about the initial emptyVersion restriction. This also explains why setting the version to 1.0.0 changes the behavior, as then no automatic version expansion is performed by tycho. |
Feature inclusions are meant to use fully qualified versions. I think that has been true about forever, even before p2. This constraint could be removed, but it would probably have to happen in p2 publisher first. |
There is special code to expand those versions in Tycho and Anyways I never understand what are the difference between |
It's pre-p2 legacy. Includes used to tell one particular feature was to be included in every update-site together with the parent feature; and this was resolved at build-time. But with p2, it matters much less, and requires/import is usually leading to better results. |
So probably we should adjust PDE to no longer offer this option in the UI and convert old feature formats on save? |
Just another though, before I'm fixing to much legacy: Would it be valid to simply drop the |
The includes is expected to replace the version by the specific version that's available at build time and use specific version in the dependencies. |
Actually P2 handles them equally, it results in
so from the p2 metadata it seems duplicated and leads to a strange result where version 2 and version 1 is included, I don't think that's what intended here. So my idea is if there is an
|
I also wonder if the same is true for the
instead? |
…nt when using emptyVersion Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
emptyVersion Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
The fix for this issue was gently sponsored by Compart AG. |
Given a feature like this:
according to the docs a match rule of
match="compatible"
means:So here one would expect that only a version < 2 is considered a valid match, but Tycho still tries to resolve e.g. a version 2.0 and fails in this case if not all requirements for 2.0 are fulfilled, there is an example project here: https://github.com/and-k/tycho-issue-new
As a workaround one could specify
<includes id="com.test.base.feature" version="1.0.0"/>
but this duplicates the information from the restriction therefore it seems to be related to the use of theemptyVersion
here.FYI @and-k
The text was updated successfully, but these errors were encountered: