a failed .rs.detachConflicts() call is never logged when linting
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- r
- Domain
- developer-experience
Research direction
Read lintRSourceDocument() in SessionDiagnostics.cpp and inspect the .rs.detachConflicts call and its error check. Change the check to use detachError, then verify that a detach failure is logged; the issue notes that this failure case has not yet been reproduced.
Written by the indexing model from the issue text.
Description
Found while surveying callers for #19932 (#19933).
Before linting an R document, lintRSourceDocument() in SessionDiagnostics.cpp detaches the .conflicts environment from the search path, and means to log a failure to do so:
Error detachError = r::exec::RFunction(".rs.detachConflicts")
.call(&envirsSEXP, &protect);
if (error)
LOG_ERROR(detachError);
The condition tests error, the variable used by the steps above it, where it should test detachError. Each of those earlier steps returns on failure, so error is always clear at this point and the log line can't run. It has been this way since the code was added in d9222131c8 (for #10093).
So a failure of .rs.detachConflicts() is silent, and linting carries on without it.
Checked by reading the code at 3b8c05c2d5; I have not made .rs.detachConflicts() fail.
Proposed fix: test detachError.
- Dominant language
- Java
- Stars
- 5.1k
- Forks
- 1.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 253
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from rstudio/rstudio
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug files pane
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Lincoln-cn/JAiRouter#1473 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
exercism/java-analyzer#379 ·
-
area: ui bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
tetsuji16/microProject#1893 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
liberation-data/fornax4j#325 ·
Maintainers usually reply within 1 day
-
[Bug]: FE and Kinesis extraction pipes render flow starting at the centre and scroll the source arm backwardsPossibly taken @chonkzillaofficial claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
BCCE-team/BuildCraft#85 ·