-
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
Fail on missing plugin product requirement #3393
Fail on missing plugin product requirement #3393
Conversation
f6cc32a
to
c2370ee
Compare
I now testes it wit a testcase where I emulate it with a feature, this one fails as expected with:
so I get the impression this is more a bug than a feature... |
I'm Oomph's build I see a bunch of warnings like this latest, but that is not related to a product and the (installer) product materializes correctly:
|
@merks thats maybe cause by what I have described here: the Slicer selects more units than are actually required, the not required one can have missing dependencies... then you get these warnings but the planner will just ignore the unsatisfied items. |
The target only uses planner mode: It appears to resolve fine in the IDE: Anyway, it's probably unrelated. I was just concerned that this warning might turn into a failure... |
I now found that this actually is/was a "feature" 12 years ago: the rationale is that one adds a feature to the product but the platform filter does not match it should still resolve and will result in a product only contain the bundles that match the current environment. To archive this, currently Tycho only adds an optional requirement to all bundles in the product while actually it should use a filter (that was removed with that commit). I'll try to create a test-case for this even though today such products are probably not very useful anymore and one could better use a feature based product. As the metadata in p2 contains already a property |
When changing this to a strict requirement the error is now:
what still is confusing as the plugin is there but its dependencies can't be resolved... I currently don't understand why P2 handles feature/plugin differently here. |
Currently Tycho does not fail if a requirement of a product can't be found in the resolve phase but only if the product is materialized. Even then it fails with an obscure error that claims the products bundle is not found where actually the dependency can't be found.
c2370ee
to
5fe9ea7
Compare
I have now added a testcase to confirm the behavior, so if one has a product with different native fragments Tycho can build such a product successful and the slicer do not complains because the requirements are actually filtered out (and native fragments usually don't have additional requirements). |
I now needed to copy the Projector into Tycho but opened a PR to make it extensible so we can alter remove that again: this now works with having a (non optional) requirement on the product that can still be projected successfully! |
The product build now fails in the example with:
what is desired here! So when no other test failures arise this is now finally ready to be merged! |
Currently Tycho does not fail if a requirement of a product can't be found in the resolve phase but only if the product is materialized. Even then it fails with an obscure error that claims the products bundle is not found where actually the dependency can't be found.
@mickaelistria @akurtakov @merks This currently allows to publish a product into a P2 repository even if the products requirements can not fully be fulfilled if one never materialize the product., it just produces some warnings
At least this this unexpected as Tycho in all other cases try to fail early and requires that everything is in the target.
I now wonder if this is a feature (so the materialize step might needs to be enhanced to fail better) or actually a bug and Tycho should already fail resolving that project.
The error from the materialize step is: