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
fix(frontend): avoid R UI parameter binding collisions - #9314
Reserve script-level R assignments and for iterators when generating a UI parameter variable. Braces do not create an R scope, and loops inside calls also bind their iterator in the script environment. These bindings now reserve their names regardless of nesting, so insertion chooses count_2 or the next available suffix.
Skip function bodies and keep named call arguments separate. Only = retains the argument-depth check; <-, <<-, ->, ->> and loop iterators are recognized inside blocks and calls.
Original R SDK reproduction:
Value
Before
After
Supplied UI parameter
42
42
Generated parameter variable after the existing loop
Retested on freshly fetched upstream main 1ec692c5da. The ten added binding regressions fail before the review correction and pass afterward. All 67 R parser tests pass, including controls for function-local bindings and named call arguments.
From frontend:
node --max-old-space-size=4096 node_modules/@angular/cli/bin/ng.js test --watch=false --progress=false --include=src/app/workspace/service/code-editor/r-ui-udf-parameters-parser.spec.ts
67 passed
node --max-old-space-size=4096 node_modules/@angular/cli/bin/ng.js test --watch=false --progress=false --coverage --coverage-reporters=lcovonly
7200 passed, 1 skipped across 253 files
corepack yarn format:fix
corepack yarn format:ci
Repository formatting, ESLint and git diff --check passed. The earlier native R 4.5.3 SDK reproduction of the original loop collision remains unchanged; this follow-up verified the new binding cases through the production frontend parser.
Was this PR authored or co-authored using generative AI tooling?
This fix: PR was checked against each actively-supported release branch. A release/* label nominates a backport target; the branch's release manager approving this PR is what sends the fix there. The required Backport Approvals check stays red until every label below is approved, so each manager either approves or removes their own label — which is why the labels left on a merged PR are exactly the branches it reached.
Release branch
Analysis
⚠️release/v1.3
Not labeled automatically — none of the files this PR modifies exist on this branch (frontend/src/app/workspace/service/code-editor/r-ui-udf-parameters-parser.spec.ts, frontend/src/app/workspace/service/code-editor/r-ui-udf-parameters-parser.ts). The fix may target code that isn't on this release, or the files were moved/renamed after the branch was cut. Please check and add release/v1.3 by hand if this fix should be backported here — its release manager then has to approve before this PR can merge.
⚠️release/v1.2
Not labeled automatically — none of the files this PR modifies exist on this branch (frontend/src/app/workspace/service/code-editor/r-ui-udf-parameters-parser.spec.ts, frontend/src/app/workspace/service/code-editor/r-ui-udf-parameters-parser.ts). The fix may target code that isn't on this release, or the files were moved/renamed after the branch was cut. Please check and add release/v1.2 by hand if this fix should be backported here — its release manager then has to approve before this PR can merge.
❌ Patch coverage is 91.30435% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.81%. Comparing base (1ec692c) to head (6a0c492). ⚠️ Report is 1 commits behind head on main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Reserve script-level R assignments and
foriterators when generating a UI parameter variable. Braces do not create an R scope, and loops inside calls also bind their iterator in the script environment. These bindings now reserve their names regardless of nesting, so insertion choosescount_2or the next available suffix.Skip function bodies and keep named call arguments separate. Only
=retains the argument-depth check;<-,<<-,->,->>and loop iterators are recognized inside blocks and calls.Original R SDK reproduction:
Any related issues, documentation, discussions?
Closes #9313. Follow-up to #9279. The companion runtime PR Texera/texera-rudf#2 has merged.
How was this PR tested?
Retested on freshly fetched upstream main
1ec692c5da. The ten added binding regressions fail before the review correction and pass afterward. All 67 R parser tests pass, including controls for function-local bindings and named call arguments.From
frontend:Repository formatting, ESLint and
git diff --checkpassed. The earlier native R 4.5.3 SDK reproduction of the original loop collision remains unchanged; this follow-up verified the new binding cases through the production frontend parser.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-6)