-
Notifications
You must be signed in to change notification settings - Fork 51
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
π©βπΎ Find rendering engines quietly, it's ok if they're not present #309
Conversation
Signed-off-by: Louise Poubel <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-rendering3 #309 +/- ##
==================================================
+ Coverage 50.59% 59.90% +9.31%
==================================================
Files 129 159 +30
Lines 11887 19356 +7469
==================================================
+ Hits 6014 11596 +5582
- Misses 5873 7760 +1887
Continue to review full report at Codecov.
|
I see that this cleans up warnings in common use cases, but it feels like we are potentially hiding information in other cases. If you build ign-rendering up through ign-gazebo from source without any version of OGRE installed, with this change you will get no configuration warnings but instead have problems at runtime (I think). That sounds like a bad user experience. If we decide that's an edge case and take a calculated decision to prioritize less noise for most users over helpful information in an edge case, then we may need to add some troubleshooting documentation to aid in diagnosing runtime errors when there are no rendering plugins available |
I'll be responding to this comment from another thread in here since @chapulina requested that the conversation be held here.
Yes, because
But even putting aside the differences between
When you try to configure, cmake will very loudly print the following to stderr, and return with a failed exit code:
This is the behavior of As a side note, we intentionally never pass the In my comment here I said
which I'd say is more consistent with the native behavior of
This is already supported. We issue a configuration warning when a component cannot be built, not an error, and cmake returns with a successful exit code.
To say that an issue is "non critical" but also "needs" to be fixed seems self-contradictory to me. I'll assume you mean "should be fixed" rather than "needs to be fixed", like a compilation warning. So the state of the configuration is undesirable but can continue to function. I'm having a hard time thinking of a case where a configuration could be in such a state. I think build configurations are usually either good (required dependencies are found, versions are acceptable, whatever necessary flags are specified) or messed up (a required dependency wasn't found, a version doesn't match the requirements, or some flag needed from the user wasn't set). But if we are dead set on this "non-critical error" interpretation of warning, then I guess we could issue a STATUS message when a component's dependency couldn't be found, instead of issuing a warning. I would really discourage this, because it will reduce the visibility of this important information (in ordinary use of
I'm perplexed about why the
everything should always work exactly the same way.
Like @scpeters pointed out, if we say nothing when the dependencies for all the plugins are missing, then users will be very bothered when they have none of the dependencies installed and don't know why |
Here's a suggestion to chew on: What if we leave it as a warning for the sake of visibility, but make the message friendlier, like |
I'm joining this discussion late, but here's how I see/understand it: We have packages with optional dependencies (like rendering engines for I agree with @mxgrey that warnings aren't necessarily "bad" (they're just providing information to the user - if the contents of a warning message are bad or fatal, then this should be an error message instead), and that we shouldn't suppress them or use something like a STATUS message, or else users may face the scenario pointed out by @scpeters where if no rendering engines are configured, configuration/build succeeds, but using the package results in unexpected behavior. So, the question is, how do we provide users with information about missing optional dependencies that can be suppressed for cases like CI? I believe that @mxgrey has proposed a nice solution in gazebosim/gz-cmake#165. If we were to use this approach, we wouldn't need to change how packages are found/configured for |
I see, I didn't think of
I believe this is already being done by the underlying
That's not entirely true. If you compile with ogre2, but not ogre1, then The key thing is that there may be
Yup, warnings are not errors. But they shouldn't be ignored either. Most developers will either want to fix them or explicitly disable them. So it prompts an action, and that's my main concern here.
Our CI is not the only place where Ignition libraries are built from source. I think that saying "you can just explicitly skip anything you don't want" to all downstream users is adding an unnecessary burden into workflows that aren't doing anything wrong. For example, from the moment Bullet support is added to It's a balancing act to not make our users pay for what they don't use, while still keeping beginner friendly default behaviour. Requiring that users explicitly set |
We're putting the burden of skipping what they don't need on downstream users for now. We can revisit if this becomes too much for too many users to handle. |
π¦ Bug fix
Fixes #281
Summary
Requires gazebosim/gz-cmake#164
All rendering engines are optional to Ignition Rendering, so I think that we shouldn't throw warnings when they can't be found.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge
πΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈπΈ
https://github.com/osrf/buildfarmer/issues/181