You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecate using arguments starting with $, @, & and % as literal values #4909
We are planning to support $var syntax in addition to ${var} in the future (#4674). The plan was to do that already in RF 7.0, but it turned out that this would be too badly backwards incompatible. Probably the biggest problem would be that the Browser library accepts passwords in format $secret and resolves the variable value internally to avoid the value being logged automatically. After the planned change $secret, would be considered exactly the same as ${secret} meaning that a confidential value could leak.
We still believe that supporting the $var syntax is a good idea, but we need to first deprecate using values starting with $ or any other variable identifier. That means that using, for example,
Log Many $value @another
will cause a deprecation warning and the value needs to be escaped like
This is actually pretty complicated to do. The problem is that we in general want to deprecate usages like
Keyword $foo
but there are special case like
Evaluate $foo
and
IF $foo
where it absolutely shouldn't be done.
In practice we'd need to separate the above cases somehow. It's doable and we need to do that before adding support for the $var syntax anyway, but we don't have time for that now. Moving this issue forward.
Why do you have to deprecate arguments starting with $, @, & and % first? so this means for a period of time both formats will not work, what will the new temporary variable syntax be?
Perhaps I've misunderstood this change? I don't see why new and old variable syntax can't be supported for a few releases and then old style removed after a few releases with the deprecation warning.
Ah so it's only literal values not variables that start with those characters that are being depreciated and now need to be escaped? That wasn't clear, I thought this was deprecating variables (e.g. ${xxx}) that started with those characters, and that had me worried.
As already mentioned above, the Browser.Fill Secret keyword requires using $secret syntax to avoid passwords being accidentally logged. If we deprecate the $var syntax, existing Fill Secret usages will cause deprecation warnings. Here are some options how to handle that:
Do nothing and require users to escape the syntax like \$secret.
Change the keyword so that it accepts secrets also in some other format. Possibly it could be just secret.
What do you @Snooz82 think about this? Is it fine for Browser users to use the \$secret syntax or are you interested to enhance Fill Secret? Built-in "secret variable" support in Robot would be best, but then we needed to do some design decisions related to #4537. Regardless the design, that functionality shouldn't be too complicated to implement and could probably included in RF 7.2 as well.
Activity
pekkaklarck commentedon Nov 13, 2023
This is actually pretty complicated to do. The problem is that we in general want to deprecate usages like
but there are special case like
and
where it absolutely shouldn't be done.
In practice we'd need to separate the above cases somehow. It's doable and we need to do that before adding support for the
$varsyntax anyway, but we don't have time for that now. Moving this issue forward.sebastianciupinski commentedon Feb 12, 2024
@pekkaklarck before that, consider please CLI switch to keep old behavior.
damies13 commentedon Mar 19, 2024
I am curious if the goal is to get to a point where
Why do you have to deprecate arguments starting with $, @, & and % first? so this means for a period of time both formats will not work, what will the new temporary variable syntax be?
Perhaps I've misunderstood this change? I don't see why new and old variable syntax can't be supported for a few releases and then old style removed after a few releases with the deprecation warning.
pekkaklarck commentedon Mar 19, 2024
The problem is that if someone nowadays uses
so that
$xxxis a literal value, the behavior will change and the usage needs to be changed toAs a concrete example, Browser library uses the
$namestyle with passwords ro avoid their values being accidentally disclosed.damies13 commentedon Mar 19, 2024
Ah so it's only literal values not variables that start with those characters that are being depreciated and now need to be escaped? That wasn't clear, I thought this was deprecating variables (e.g. ${xxx}) that started with those characters, and that had me worried.
pekkaklarck commentedon Sep 10, 2024
As already mentioned above, the Browser.Fill Secret keyword requires using
$secretsyntax to avoid passwords being accidentally logged. If we deprecate the$varsyntax, existingFill Secretusages will cause deprecation warnings. Here are some options how to handle that:\$secret.secret.What do you @Snooz82 think about this? Is it fine for Browser users to use the
\$secretsyntax or are you interested to enhanceFill Secret? Built-in "secret variable" support in Robot would be best, but then we needed to do some design decisions related to #4537. Regardless the design, that functionality shouldn't be too complicated to implement and could probably included in RF 7.2 as well.pekkaklarck commentedon Nov 29, 2024
This requires more discussion and design. We decided to move it RF 7.3 to be able to get RF 7.2 out soon.