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

Better Error reporting #91

Open
gunnarx opened this issue Aug 18, 2023 · 1 comment
Open

Better Error reporting #91

gunnarx opened this issue Aug 18, 2023 · 1 comment
Labels
discussion Things that need some thinking, and feedback from several to find consensus first.

Comments

@gunnarx
Copy link
Collaborator

gunnarx commented Aug 18, 2023

This ticket collects things to improve on error reporting, when the tools get incorrect input.

  1. If no Interface is in the YAML, then no output. The D-Bus generator doesn't fail until the XML-reformatting where it says there is no start node (with an ugly exception backtrace).
    Instead, check that an Interface node exists and/or check if generation result is empty, and report it to the user.

  2. Related to the above, the current template-driven generators like BAMM, DTDL, and protobuf need to be updated for Interface. They don't fail because they just loop over "all methods in the Namespace", etc. So if there aren't any, the output will be mostly empty. Anyhow, perhaps this could be considered correct behavior for a file without an Interface node, but they should be updated.
    Ultimately, add a check for Interface node, in the generic ifexgen - at least it probably should output a warning.

@gunnarx gunnarx added the discussion Things that need some thinking, and feedback from several to find consensus first. label Aug 21, 2023
@gunnarx
Copy link
Collaborator Author

gunnarx commented Aug 23, 2023

  1. When the implementation switched to dacite, it does quite good checking for incorrect IFEX files but the error messages are not always the best. It can create an exception and ugly-backtrace if the input is not right. So the third item to improve is friendly messages with clear reference to the line number (which is lost currently in the YAML -> dictionary -> dataclass conversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Things that need some thinking, and feedback from several to find consensus first.
Projects
None yet
Development

No branches or pull requests

1 participant