-
Notifications
You must be signed in to change notification settings - Fork 100
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
Making PrintValues() and ToString() able to not print default elements #575
Conversation
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
… sibling elements Signed-off-by: Addisu Z. Taddese <[email protected]>
Add failing test showing that SetExplicitlySetInFile incorrectly sets the flag on sibling elements
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
…add_default_check Signed-off-by: Marco A. Gutierrez <[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.
Just did a quick look through and requested some changes to the API functions. Looks great! Are all the bullet points in #287 addressed at this point, such that it closes it?
Signed-off-by: Marco A. Gutierrez <[email protected]>
I thought we got to that point, but maybe @azeey should confirm... |
True that, let me confirm if there's issues upconverting SDFormat with default values first, before closing #287 |
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.
This looks awesome! Thanks for making the changes!
Per VC, we should keep the default behavior (when printing via |
Signed-off-by: Marco A. Gutierrez <[email protected]>
Now it's a bit of a weird behavior since it will print any default |
Signed-off-by: Marco A. Gutierrez <[email protected]>
I suggest we have two behaviors: (1) a default behavior that is consistent with what the code did before this PR, (2) a new behavior enabled by a flag that does not print default elements or attributes. So I don't think we need an extra flag. |
Signed-off-by: Marco A. Gutierrez <[email protected]>
Signed-off-by: Marco A. Gutierrez <[email protected]>
As agreed on our previous VC this has been added:
|
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.
LGTM! Just a few minor comments.
Signed-off-by: Marco A. Gutierrez <[email protected]>
As per VC we agreed to not consider default elements those added when the auto-conversion to the latest sdf version happens. |
… elements (gazebosim#575)" This reverts commit c60e8f3. Signed-off-by: Addisu Z. Taddese <[email protected]>
#575) Now PrintValues() and ToString() will not output the elements that were added by default during parsing. There's also the option to call them with a boolean flag that will allow the caller to decide weather they want defaults in the output or not. Signed-off-by: Marco A. Gutierrez <[email protected]> Co-authored-by: Addisu Z. Taddese <[email protected]> Signed-off-by: Jenn Nguyen <[email protected]>
Related to #287
Summary
Now PrintValues() and ToString() will not output the elements that were added by default during parsing. There's also the option to call them with a boolean flag that will allow the caller to decide weather they want defaults int the output or not.
Checklist
sh tools/code_check.sh
)Note to maintainers: Remember to use Squash-Merge