-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Parsing crashes if user keyword has invalid argument specification with type information #5443
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
Comments
Thanks for the report. The bug occurs in user keyword argument validation during parsing time. The reason is that when there's an argument without a default value after arguments with default values, the error is just reported and the argument itself is not stored anywhere. The earlier parsed type is, however, preserved, and there's later a a conflict when there's a type for non-existing argument. This particular bug is easy to fix, I've already done that locally, but I want to also go through the argument parsing logic to see are there other similar cases. Although crashes are always very severe, this bug isn't a regression and it only occurs in an error situation, so I don't think an immediate bug fix release is required. |
Here's another keyword crashing the parsing even after my fix: Varargs
[Arguments] @{v: int} @{w}
Whatever This can also be fixed easily. If there are even more cases, I'll consider changing the parsing logic to handle them all in a generic manner. |
Also this one causes a crash: Kwargs
[Arguments] &{k: int} &{w}
Whatever I got all these fixed pretty cleanly. There's room for refactoring, though, and I'll do that separately. My plan is to avoid using |
It's a very good point that this is a bigger problem during development when you have incomplete data. I still don't think an immediate bug fix release is needed, but we certainly need to create one soon. Perhaps next week or latest the week after, depending on are other severe issues, especially regressions, reported. This problem isn't directly related to checking types The check that fails is there to detect bugs like this in user code: @keyword(types={'b': int})
def kw(a):
... The reason this check is executed with user keyword is that and There is also type validation during parsing time to report bugs like |
Uh oh!
There was an error while loading. Please reload this page.
Hey,
I've been trying out the new Variable Type Conversion feature in RF 7.3 and ran into a parsing issue that I think isn't handled correctly.
Here's a minimal example:
In this case, I would expect a proper error like:
Instead, parsing fails completely with the following error:
If I remove the type from
${b}
, the correct error is shown, so the issue seems to be triggered specifically by the type info.Cheers!
Daniel
The text was updated successfully, but these errors were encountered: