Community
Participate
Working Groups
Build Identifier: tycho 0.12.0 Tycho P2 resolver tries to resolve feature.requires properties even though they are installation properties and only warnings in PDE Reproducible: Always Steps to Reproduce: I specify a simple feature with a simple requires section: <requires> <import feature="com.example.nonexisting"/> </requires> This generates a warning in PDE but allows me to build it none-the-less. With tycho 0.12.0 passing a tycho.targetPlatform that doesn't contain the feature it compiles fine. If I remove the tycho.targetPlatform and use the p2 resolver, it fails with a missing dependency.
Created attachment 200587 [details] Mimized pom building a feature Minimized configuration for building the feature. Should be fairly basic. add -Dtycho.platform to avoid the problem.
Created attachment 200588 [details] Simple feature with non-existing requires feature
This is somewhat intentional: Tycho resolves project dependencies in the same way as they will be resolved at install time. You won't be able to install the feature with the reference to "com.example.nonexisting", and Tycho already lets you know during the build. It would not be absolutely necessary to really resolve feature *dependencies*, but I don't think we would gain much if we did: The feature *inclusions* have to be resolved, because Tycho has to fill in the exact versions of the included plugins. Unless there is an important use case for the behaviour you are requesting, the behaviour of Tycho probably won't be changed. About the indications you are giving: - The PDE also just warns if inclusions are not present (which must be an error in Tycho; see above). - The local resolver (which is entailed by "-Dtycho.targetPlatform") is deprecated and hence may have diverged from the recommended p2 resolver.
Having thought about this proposal (and the good discussion between Igor and Niels on the mailing list [1]), I now think that is is doable - if we should implement bug 353889. I am undecided the warning (rather than an error) should be the default - but it should at least be an option. [1] http://dev.eclipse.org/mhonarc/lists/tycho-user/msg00584.html
Does tycho 0.19.0 already provide such an option to change the default behavior from error to warning?
(In reply to comment #5) > Does tycho 0.19.0 already provide such an option to change the default behavior > from error to warning? The status of this issue is correct. It's not resolved, so this feature is not implemented.
Tycho tries to stick to a dependency resolution that's similar to what's going to happen at runtime. This allows the developers to anticipate more errors their users might face with dep management. It's not something we should change.