gazebosim / gazebosim/sdformat
Missing required elements not being reported
- Dominant language
- C++
- Stars
- 216
- Forks
- 125
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 14
Description
## Description
It seems that this `if` statement:
https://github.com/gazebosim/sdformat/blob/3fdc0a1fe7026fbc1f004de018daf83839a2914e/src/parser.cc#L1928
Is preventing sdformat from reporting missing elements that are `required` according to the specification.
## Steps to reproduce
Create and load and sdformat that has a missing `required` element (i.e. a `world` without `gravity`) and nothing will be reported. Remove the above statement in the library and the missing element errors will arise.
## Way forward
I opened this issue to start a discussion on the way forward. This seems to be an ancient bug that when fixed will probably prevent many `sdf` files from loading successfully. I guess the safest option would be to fix it in `main` and add a backport fix with a flag to current supported versions of sdformat.
As a sneak peek into the impact this fix might have: just removing the `if` yields 202 errors from the tests in the library itself.
Contributor guide
Assessment
This issue has not been assessed yet.