REditorSupport / REditorSupport/vscode-R
Extension behaving oddly when file is part of VSCode workspace
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 139
- Avg merge
- 2h 46m
- Merged PRs (30d)
- 5
Description
Describe the bug
When I open my R files as part of a workspace file that I have, I can load a previous image, but nothing is populated under global Environment. When I run View(df) the R data frame Viewer pops up and not the one in VS Code.
If I repeat the same steps but outside of a Workspace then the extension behaves as normal.
To Reproduce
Steps to reproduce the behavior:
- Create a VS Workspace or use an existing one.
- Add an R file.
- Click on the R Extension and under Select the "Load Workspace". Select an existing *.rdata that contains data.
- Once done loading check under Global Environment. It is empty.
- Run View(df) to open any data frame. Default R viewer (from the normal R environment) should open.
- Close the Work space and open the same R file as in Step 2.
- Click on the R Extension and under Select "Load Workspace". Select an existing *.rdata that contains data.
- Once done loading check under Global Environment, it should be populated with the data.
- Run View(df) to open any data frame, it will now open in VS Code as per normal
Can you fix this issue by yourself? (We appreciate the help)
No
// R.exe path for windows
"r.rterm.windows": "",
// R command line options (i.e: --vanilla)
"r.rterm.option": [],
// An optional encoding to pass to R when executing the file, i.e. 'source(FILE, encoding=ENCODING)'
"r.source.encoding": "UTF-8",
// Keeping focus when running
"r.source.focus": "editor",
// Use active terminal for all commands, rather than creating a new R terminal
"r.alwaysUseActiveTerminal": false,
// Use bracketed paste mode
"r.bracketedPaste": false,
// Enable R session watcher
"r.sessionWatcher": true,
// Delay in milliseconds before sending each line to rterm (only applies if r.bracketedPaste is false)
"r.rtermSendDelay": 8,
**Expected behavior**
The expectation is that when running a file in a VS workspace or outside a VS Workspace it should behave the same. Running View(df) should open the data frame in VS Code. When loading an *.Rdata, the Global Environment should be populated with the needed information.
Before the current update this was the behavior.
**Screenshots**
**Environment (please complete the following information):**
- OS: Windows 10
- VSCode Version: 1.89.1
- R Version: 4.4.0
- vscode-R version: 2.8.3
**Additional context**
I recently update to R 4.4.0 (earlier this week I think) and the extension was still working as normal.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or entry point is named. First reproduce the behavior in a Windows 10 VS Code workspace with R 4.4.0 and vscode-R 2.8.3, then compare loading the same .RData file and running View(df) outside a workspace. Done means the Global Environment populates and the data-frame viewer opens in VS Code in both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100