-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Use assing
, not variable
, with FOR and TRY/EXCEPT model objects when referring to assigned variables
#4708
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
FOR
statements are VARIABLE
but should be ASSIGN
token type (Same for EXCEPT AS
)
I agree, ASSIGN would make more sense everywhere where variables are assigned. Easy change but also backwards incompatible so needs to be done in a major version. |
Now that we use Need to also think should we change the running and results models the same way. |
FOR
statements are VARIABLE
but should be ASSIGN
token type (Same for EXCEPT AS
)assing
, not variable
, with FOR and TRY/EXCEPT when referring to assigned variables
I've now locally done the parsing model change I mentioned above. I like the consistency with property names and token types. We also already used I've also started changing the running and result models to use |
assing
, not variable
, with FOR and TRY/EXCEPT when referring to assigned variablesassing
, not variable
, with FOR and TRY/EXCEPT model objects when referring to assigned variables
I now ought to have all models updated locally and will commit and push changes after I've gone through changes once more. I try to list all backwards incompatible changes and deprecations caused by this issue below:
|
The underlying token types have been changed from `VARIABLE` to `ASSIGN` already earlier as part of #4708. Propertys accessing token values are now renamed for consistency as well. We also use `assign` property with keyword calls and inline IF. Old propertys are preserved for backwards compatibility reasons, but they are deprecated. Also arguments to related `from_params` methods were updated making #4708 a bit more backwards incompatible.
Hmm, we still use |
After discussion on Slack involving also @Snooz82, we decided to revert the token type changes in RF 7.0. In addition to the inconsistency mentioned above, there are some other issues with token types. We won't have time to go through them all now, and making some changes now and more later would add more work for external tool developers. Better to do this properly in one go. I'll submit a separate issue about that to RF 8.0. Notice that the model changes are preserved. They aren't backwards incompatible because the old propertys are preserved (but deprecated). |
We had changed the token type used with FOR variables and with EXCEPT's AS variable from VARIABLE to ASSIGN for them to be consistent with variables assigned with keyword calls. It later turned out that we still use VARIABLE in other places for similar purposes so inconsistency remains. In addition to that, we have noticed some other inconsistencies and problems with token types. We don't have time to properly go through them all now in RF 7. Better to postpone this to RF 8 altogether so that we aren't making backwards incompatible token type changes in every release. Also some error message tuning.
FOR
After tokenising the assigned variable is of type
VARIABLE
with FOR loops but shall beASSIGN
:Example:
Here is an assignment happening as in:
${i} Set Variable 1
Therefore
VARIABLE
would be considered "wrong" here.TRY/EXCEPT
Similar situation is with EXCEPT AS variables. they are also
VARIABLE
Example:
Should also be
ASSIGN
after the ASCheers
The text was updated successfully, but these errors were encountered: