Skip to content

Store list and scalar variables in same namespace #1905

Closed

Description

@pekkaklarck

In RF 2.8.x and earlier you can create list and scalar variables with same base name and that will create too distinct variables:

*** Variables ***
${EXAMPLE}    Scalar variable
@{EXAMPLE}    List    variable

It is, however, possible to use list variables as scalars since RF 2.0.3 (#117) and scalar variables as lists since RF 2.8 (#483). Both usages require that there is only either scalar or list variable with same base name.

This situation is pretty confusing and can cause weird errors. The forthcoming addition of new dict variable (#1450) is also going to make the situation much worse. We have thus made a decision to store scalar, list and dict variables in same namespace starting from RF 2.9.

This change is going to cause backwards incompatibility problems in cases where scalar and list variables with same base name are used. That is very unfortunate, but I don't see any other option to get this implemented. We tried to deprecate this functionality already in RF 2.5 (#484), but deprecation was later removed because some of the warnings were incorrect.

Activity

  1. added this to the 2.9 milestone on Jan 31, 2015
  2. pekkaklarck commented on Jan 31, 2015

    @pekkaklarck
    MemberAuthor

    This change is currently being done in shared-store branch with 3aeed80 as the first commit. After 13ac2b8 tests are passing and functionality done (except for some TODOs to be resolved later).

  3. self-assigned this
    on Feb 16, 2015
  4. pekkaklarck commented on Feb 28, 2015

    @pekkaklarck
    MemberAuthor

    This has been implemented. Issue open only because docs aren't updated yet.

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