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
R UI parameter insertion can reuse script-level loop variables #9313
Adding an integer UI parameter named count to an R script with an existing for (count in 1:3) loop generates count <- UiParameter(...)$value before the loop. The loop then overwrites the parameter's supplied value: a panel value of 42 becomes 3.
The insertion code checks assignment targets but misses the iterator introduced by for. Expected: choose an unused variable such as count_2, leaving the loop's count separate from the UI parameter.
Reproduced with the actual frontend insertion function and the companion R SDK on R 4.5.3. Introduced by #9279.
How to reproduce?
Use an R UDF script containing:
for (countin1:3) NULLfunction(table, port) table
Add an integer UI parameter named count, with value 42.
Inspect the generated declaration. It reuses count instead of choosing an unused variable.
Evaluate the generated declaration followed by the loop using the R SDK. The generated parameter variable contains 3, although its supplied value was 42.
Activity
carloea2 commentedon Nov 4, 2026
/take
fix(frontend): avoid R UI parameter binding collisions (apache#9314)