REditorSupport / REditorSupport/vscode-R
Extension keeps trying to run unit tests in current console
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
Apologies I've not been able to generate a minimal reproducible example yet but I am currently experiencing a breaking issue where the "attached" vscode-R R code keeps attempting to run my testthat unit tests every time I try to run anything in the console.
Please see the Gif below.
For reference my code repository in question and commit that is causing this issue is here. In particular I am in the tests/testthat/test-SurvivalExponential.R file trying to run the code SurvivalExponential() via a keyboard shortcut for workbench.action.terminal.runSelectedText.
When I open a terminal + R without "attaching" the vscode-R code I do not get this issue. I tried searching my code and .Rprofile for any instances of test() / check() or anything else that might be loading the tests but I couldn't find anything.
Gif of Issue
For reference (because its not clear from the gif) the SurvivalExponential() code I am running just creates an S4 object with some string slots; the "Compiling Stan program" comes from the unit tests being run as the first step of my unit tests is to compile a Stan model. The point being highlighted is that the unit tests are being executed even though I've not run anything. Again to highlight this when I load R normally without "attaching" the vscode R code this doesn't happen
Can you fix this issue by yourself? (We appreciate the help)
No
(If yes,) can we assist you with anything?
(If applicable) Please attach setting.json
"r.alwaysUseActiveTerminal": true,
"r.liveShare.defaults.shareWorkspace": false,
"r.lsp.promptToInstall": false,
"r.session.objectTimeout": 10,
"r.session.useWebServer": true,
"r.sessionWatcher": true,
Expected behavior
That vscode-R doesn't keep attempting to run my unit tests
Environment (please complete the following information):
- OS: macOS (13.3.1)
- VSCode Version: 1.83.1
- R Version: 4.3.1
- vscode-R version: 2.8.2
Additional context
Add any other context about the problem here.
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
Reproduce from tests/testthat/test-SurvivalExponential.R by running SurvivalExponential() through workbench.action.terminal.runSelectedText with vscode-R attached, then compare it with an unattached R terminal. Done means the selected console code runs without triggering the repository's testthat tests or compiling the Stan model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript, vscode
- Domain
- developer-experience, testing, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100