Skip to content
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

Should have a parser option or command line flag to preserve includes when converting to string #522

Closed
azeey opened this issue Mar 22, 2021 · 1 comment · Fixed by #749
Assignees
Labels
enhancement New feature or request

Comments

@azeey
Copy link
Collaborator

azeey commented Mar 22, 2021

Desired behavior

It would be nice for information contained in the <include> element be preserved when converting sdf::Element objects to string. This information is being stored in sdf::Element as of #509. Currently, the included models (or other entities) are expanded into the parent model with the parameters in the <include> element being used to override values in the included model. Thus, when the corresponding sdf::Element of the parent model is converted to a string, we get the string of the expanded child model.

Alternatives considered

The alternative is to always preserve the <include> element, but this would be a breaking change.

Implementation suggestion

Add an option in sdf::ParserConfig and and a command line flag to ign sdf -p

@azeey azeey added the enhancement New feature or request label Mar 22, 2021
@azeey azeey self-assigned this Mar 22, 2021
@azeey azeey assigned jennuine and unassigned azeey Nov 4, 2021
@jennuine
Copy link
Collaborator

jennuine commented Nov 4, 2021

Per VC, will leave ign sdf -p the way it is currently (expands <include> tags) and will add new command flag to preserve <include>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants