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

xmlgen can't distinguish between "ss" and "(ss)" #1241

Open
sandercm opened this issue Feb 3, 2025 · 2 comments
Open

xmlgen can't distinguish between "ss" and "(ss)" #1241

sandercm opened this issue Feb 3, 2025 · 2 comments
Labels
bug Something isn't working zbus_xml Issues related to zbus_xml crate

Comments

@sandercm
Copy link

sandercm commented Feb 3, 2025

consider the following two introspections.

<method name="test">
    <arg name="testmethod" type="(ss)" direction="out" />
</method>
<method name="test">
    <arg name="testmethod" type="ss" direction="out" />
</method>

zbus_xmlgen will generate the same rust code

fn test_method(&self) -> zbus::Result<(String, String)>;

I would expect the first result to be

fn test_method(&self) -> zbus::Result<((String, String),)>;
@sandercm sandercm changed the title zbus_xmlgen can't distinguish between "ss" and "(ss)" xmlgen can't distinguish between "ss" and "(ss)" Feb 3, 2025
@zeenix
Copy link
Contributor

zeenix commented Feb 4, 2025

Thanks. I may not be able to get to fix this anytime soon but PRs welcome. :)

@zeenix zeenix added bug Something isn't working zbus_xml Issues related to zbus_xml crate labels Feb 4, 2025
@sandercm
Copy link
Author

sandercm commented Feb 4, 2025

Thanks. I may not be able to get to fix this anytime soon but PRs welcome. :)

I was looking into it but it seems like the bug exists in the xml parser where it will treat (ss) and ss as the same. Unfortunately that’s where I got stuck on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working zbus_xml Issues related to zbus_xml crate
Projects
None yet
Development

No branches or pull requests

2 participants