Skip to content

Loudly deprecate variables used as embedded arguments not matching custom patterns #4524

Closed

Description

@pekkaklarck

If you have a keyword accepting embedded arguments with a custom pattern like

Perform ${arg:[^ ]+}
    Log To Console  ${arg}

and use it with a variable like

Perform ${variable}

Robot will call the keyword regardless the variable value. This means that the keyword may be called with a value that doesn't match the explicit custom pattern. That's not great and needs to be changed.

We initially planned to change this already in RF 6.0 (#4069), but it turned out that the change would cause too much backwards compatibility problems and the change was reverted. The main reason for backwards compatibility problems was that custom patterns were often used to resolve conflicts with various keyword implementations matching a keyword usage. Conflict resolution was enhanced heavily in RF 6.0 (#4454), so it is now safer to require patters to match also when using variables as embedded arguments. The change is still backwards incompatible and cannot really be done in RF 6.1, but we can now deprecate it loudly. The actual change can then be finally done in RF 7.0.

Activity

  1. added this to the v6.1 milestone on Oct 31, 2022
  2. pekkaklarck commented on Oct 31, 2022

    @pekkaklarck
    MemberAuthor

    This behavior was "silently" deprecated already in RF 6.0. See #4462 for more info and examples.

  3. modified the milestones: v6.1, on Jan 3, 2023
  4. modified the milestones: , v7.0 on Jun 2, 2023
  5. pekkaklarck commented on Aug 25, 2023

    @pekkaklarck
    MemberAuthor

    This loud deprecation wasn't done in RF 6.1 and there never was RF 6.2. In RF 7 we now need to decide should we do deprecation or should we directly change the behavior (#4069). I'll now initially leave both of these to RF 7 scope, but we either need to move the other issue to RF 8 or just close this issue.

  6. self-assigned this
    on Aug 28, 2023
  7. pekkaklarck commented on Aug 28, 2023

    @pekkaklarck
    MemberAuthor

    We decided to took the safe root and only do deprecation (i.e. this issue) in RF 7. The behavior will be changed (#4069) in RF 8.

  8. changed the title [-]Loundly deprecate variables used as embedded arguments not matching custom patterns[/-] [+]Loudly deprecate variables used as embedded arguments not matching custom patterns[/+] on Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions