-
Notifications
You must be signed in to change notification settings - Fork 31
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
User-friendly skip component warning #165
Conversation
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
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 a good way to solve the issue of suppressing warnings of optional dependencies. Thanks @mxgrey!
I'll just note the catch here: To get the build farm to have zero warnings when it doesn't have the OptiX dependency, we'll need to add |
Agreed 👍 I mentioned this in gazebosim/gz-rendering#309 (comment), but it's good to mention that here as well so that we can update the buildfarm script if/when this PR gets merged. |
Signed-off-by: Michael X. Grey <[email protected]>
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 like the skip mechanism 👍
I still don't agree that we need to print warnings despite the user having explicitly requested QUIET
though.
I don't think of REQUIRED_BY
as similar to REQUIRED
, so I don't see any conflicts in using QUIET
and REQUIRED_BY
together. My understanding was:
REQUIRED
: if not present, the entire application fails to build.REQUIRED_BY
: if not present, that component fails to build. Whether this is ok to ignore should be configured at the component level.
Does this sound reasonable?
Thinking a bit more about this, I think we should consider an opt-in mechanism rather than opt-out (i.e. I believe this could be handled a bit more cleanly if we kept engine implementations in their own repositories. So an |
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
(Also responding to this comment) I agree that it's a tough balancing act between these conflicting concerns:
This is especially hard since we aim to serve a wide range of users from very early beginners to very advanced experts. I think it may be valuable to imagine some potential user stories and how each user is affected by opt-in versus opt-out versus separate repos. Expert build managerDescriptionI am managing a CI/CD pipeline for my company's simulation tools, which includes various ignition packages. My company doesn't need every optional component of every ignition package, and it would be a waste of resources for us to build all of them with every CI test. Additionally I'm stickler for making sure my builds always come out totally clean. I will interpret any warning in my CI pipeline as an error and demand that it be fixed. Flag opt-inI set up my build scripts to include Separate repoI add whatever optional component repos that I need to my build script and ignore the repos that I don't need. Flag opt-outI set up my build scripts to include SummaryThe user experience is roughly the same no matter which option we go with. Every option would require the user to configure their build script to be explicit about what they do or do not want. We could try to take guesses at whether this type of user is statistically more likely to require more optional components than they want to skip, and then figure out which option will require fewer keystrokes for the greatest number of this type of user, but I think that's a very minor quantitative quality of life concern and would not make a meaningful qualitative difference. No matter what, this user is committed to explicitly configuring the packages that they need, and they have the knowledge necessary to do it in any of these ways. Curious beginnerDescriptionI'm someone who works in the robotics industry, and I'm curious about trying out a robot simulator to help guide our robot platform development practices. I heard that ignition is free to use, so I'm giving it a try. I don't have much experience with building modular software projects from source code, but I've used I'm trying to use ignition out of my own personal curiosity to see if it can help out my business; I'm not being forced to use it by my employer. But if it goes well, I might advocate for its use at my company to help us design and test our design concepts. Flag opt-inI've retrieved and built the set of repositories that supposedly allow me to run ignition-gazebo. After spending some time wrestling with some missing dependencies, I've gotten all of the packages to configure and build successfully. I try to run an example with Separate repoI've retrieved and built the set of minimal repositories that supposedly allow me to run ignition-gazebo. After spending some time wrestling with some missing dependencies, I've gotten all of the packages to configure and build successfully. I try to run an example with I try to run an example with Flag opt-outI've retrieved and built the set of repositories that supposedly allow me to run ignition-gazebo. After spending some time wrestling with some required dependencies, I've gotten all of the packages to configure and build successfully. I noticed there are some "component" packages that are being skipped, but the configuration and build steps were successful, so I'll just ignore those. I try to run an example with I try to run an example with I keep installing component dependencies and rebuilding until the SummaryDepriving a non-expert user of information makes it impossible for them to forecast the remaining steps to get everything working. This can be especially bad when it's unclear to them why things aren't working in the first place. Runtime warnings alone are not necessarily sufficient to help a user understand that they need to change the way they were building our packages. The frustration that users feel from being kept in the dark may cause them to abandon their attempt to use our software. Experienced ignition userDescriptionI use ignition regularly to simulate robots. Ignition has many packages whose versions change frequently, so I'm often using different ignition distributions at the same time in different colcon workspaces to keep them separate. Some of my old work requires old distributions while my more recent work requires newer ignition features, and I need to keep it all running at once. This means I'll periodically be creating new colcon workspaces to run newer versions of ignition. Flag opt-inI clone all the repos for my new workspace using the new distro's I go to run some of my projects, but Separate repoI clone all the repos for my new workspace using the new distro's minimal required I go to run some of my projects, but With all the optional repos cloned, I rerun Flag opt-outI clone all the repos for my new workspace using the new distro's I go to run some of my projects, and they work immediately because all the plugin components that I needed are built. SummaryRequiring the user to explicitly opt in to optional components will create unavoidable extra steps for them to get Overall summaryThe opt-in designs (either "Flag opt-in" or "Separate repos") create mandatory burdens on users, and that burden may be invisible (and therefore unsolvable) to users who are unfamiliar with the overall design of ignition. The opt-out design has objectively less burden in terms of getting In my mind the choice is between an "optional burden" and a "greater or equal mandatory burden". For me the balance between those choices seems very clear. |
One thing I'll point out here is that "user" is an overloaded word when it comes to configuration scripts. A configuration script that uses Therefore when This is why I believe that the verbosity of an |
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.
Thanks for iterating, @mxgrey . Let's go with this approach and revisit if it becomes burdensome for users.
To forward port this to |
I think it'd probably be best to merge all of @mxgrey, if you'd like me to open a PR to complete this merge forward, just let me know! |
Summary
This is an alternative proposal for #164.
The idea here is that
ign-cmake
assumes users might want to build all optional components unless the user explicitly specifiesSKIP_<component>
to cmake. We allow the configuration to succeed even if optional components need to be skipped due to missing dependencies, but we issue a clear (but friendly) warning to the user about which optional components will be skipped and why they are being skipped. We also provide an instruction for how to suppress the warning in case they find it bothersome.I recommend we issue warnings rather than status messages because status messages are easily overlooked, especially when building with
colcon
whose default behavior is to send all status messages into the build log instead of displaying them to users. We provide a straightforward way to suppress these warnings, so users who don't like them can easily turn them off. Also this PR modifies the tone of the warning so no one should be left with the impression that their configuration is broken due to optional components being skipped.As a side-effect this PR also cleans up the way warnings are displayed to users. It turns out cmake's rules for formatting messages are rather complex, and our approach to generating the warning messages was creating a lot more noise than we intended.
Here's an example of someone configuring
ign-rendering4
off of this PR when they are missing the dependencies ofignition-rendering-optix
andignition-rendering-ogre2
:Checklist
codecheck
passed (See contributing)