Closed zeenix closed 1 year ago
oh wow! this service in question uses -
in the names of method arguments. That's very strange and I didn't realize it was even allowed. So obviously the issue here is that our tool doesn't anticipate that and uses the provided name as is, which of course doesn't work in Rust.
Should be pretty easy fix though but the workaround is also pretty easy: change config-name
to config_name
and it would just work.
Please also note that currently xmlgen tool is meant only to give you a starting point. In most cases, you'll need to adjust/fix the generated code. However, that is not to say that we don't appreciate such reports so please do report any other issues you find. Fixing all these issues will lead us to the day when we can confidently say xmlgen should be expected to generated readily usable code. :)
In GitLab by @legezam on Jun 30, 2021, 14:39
Cool! Thanks for the suggestion!
but the workaround is also pretty easy: change
config-name
toconfig_name
and it would just work.
Oh sorry. That's not actually true. The error is from xmlgen itself, not when compiling the generated code. So the workaround is to modify the source xml instead.
mentioned in commit zeenix/zbus@86e325e29ffac7e95b0fdda20cc046834aaaa57d
In GitLab by @elmarco on Jun 30, 2021, 16:00
mentioned in commit 77785833b96eca9be4ede7a94b1b96d10f33e6f5
In GitLab by @legezam on Jun 30, 2021, 13:42
I am trying to generate Rust code for Suse's snapper tool:
Getting many errors like:
Please note, this happens even when i try to use the xml generated by
zbus-xmlgen
.To reproduce the issue all you need is to have snapper installed through any package manager.
Please help me, i can give any further help if needed.