REditorSupport / REditorSupport/languageserver

Unit tests hang when using devtools

Open
#39 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
675
Forks
118
Avg merge
1d 37m
Merged PRs (30d)
11

Description

This only affects development, not the end user.

To duplicate:

With languageserver not installed:

devtools::load_all("languageserver")
devtools::test("languageserver")

Output is:

Loading languageserver
Loading required package: testthat
Testing languageserver
✔ | OK F W S | Context

Then is no progress beyond that.

When languageserver is installed, unit tests complete as expected.

@kforner says (#37):

I think this is because the R process run by https://github.com/REditorSupport/languageserver/blob/master/R/languageclient.R#L18 does not find the package, since it is not installed. But there is not any error check at this point.
I propose to add a sleep, then a check that the process is still alive, otherwise raise an execption with the error stream content.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the hang with devtools::load_all("languageserver") and devtools::test("languageserver") while languageserver is not installed. Start at R/languageclient.R line 18 and inspect the process startup and error handling. Done means the test run reports the startup failure and error stream instead of hanging.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
devtools, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.