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

Multiline comment parsing update breaks things #186

Open
poshul opened this issue Apr 11, 2024 · 2 comments
Open

Multiline comment parsing update breaks things #186

poshul opened this issue Apr 11, 2024 · 2 comments

Comments

@poshul
Copy link
Contributor

poshul commented Apr 11, 2024

https://github.com/OpenMS/autowrap/blame/35eb3ab6154b7c87337f886dec318a980cd4b431/autowrap/PXDParser.py#L119
This breaks a lot of places where we have comments ending in colons that have no syntactic meaning. It also lacks any error reporting as to which PXD failed the parsing, making debugging the whole of pyOpenMS very difficult.

@jpfeuffer
Copy link
Contributor

jpfeuffer commented Apr 11, 2024

I would't say it broke it. It just errors out now. The check for a potential wrap statement was defined as "ending with a colon" since 12 years.
And there should never be a colon in a class annotation that is not indented under a wrap-doc: statement. In that case annotations would simply be wrong.

I agree however, that checking e.g. for wrap-*: would be safer though more restrictive.

Yes, line numbers would be nice but I do not know off the top of my head if that is easily possibe.
You would need to pass the information about the PXD node that is currently parsed to the _parse_multiline_comment function or catch the Exception in the function that still has access to that information.

@jpfeuffer
Copy link
Contributor

I would start by opening a PR here with a test that fails.

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

No branches or pull requests

2 participants