-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve coverage #202
improve coverage #202
Conversation
I'm also interested in writing the test cases. Would you mind I push to this branch directly? |
No problem. I don’t have time to work on it lately. |
I tried adding test cases for code section symbols but I'm not sure where to specify client capabilities to make the testing language client to support client <- language_client()
client$ClientCapabilities <- list(
textDocument = list(
documentSymbol = list(
hierarchicalDocumentSymbolSupport = TRUE
)
)
) but it does not seem to work as |
The information for languageserver/R/languageclient.R Line 20 in 38122ca
|
My bad, the code was already there languageserver/R/languageclient.R Line 104 in 38122ca
|
Thanks! Now new test cases are added to all providers listed. |
Wow, amazing job. With the tests, I guess we are already for the next release. |
This comment has been minimized.
This comment has been minimized.
Test cases for Rmarkdown are divided into handler test scripts and many test cases now have their Rmd version added. |
👍 By the way, I don't understand why travis/push fails but travis/pr does not. Each time it fails at the same test. |
" data[x, y]", | ||
"}" | ||
)) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails on travis/push as well as my local computer. I don't understand how we get the indented f
and data
.
I keep getting
handling request: textDocument/onTypeFormatting
formatting error: <text>:1:1: unexpected '}'
1: }
^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also don't understand how github actions tests pass...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, actually the tests in github actions actually failed, but the error was not correctly thrown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8f0bdcf fixed the github actions tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just notice that the coverage
branch is behind #209. We may rebase to latest master to resolve this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have rebased the branch onto master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @renkun-ken. That also explains why travis/push failed but travis/pr didn't
This comment has been minimized.
This comment has been minimized.
I guess I have accidentally removed the diff when I was resolving the conflicts. |
Looks like there is a path related issue in Document link provider on Windows. |
Can't see the error details except for those expect lines. Do we have a way to know more details? |
Perhaps we could always enable the debug setting https://github.com/REditorSupport/languageserver/blob/master/tests/testthat/helper-utils.R#L14 |
Maybe I should install a Windows virtual machine to have a look at this. 😂 |
@renkun-ken see if the dumped log for windows would help |
It doesn't have much information in the log as |
I've set up a Windows virtual box and am looking into this.😂 |
It looks like there's something inconsistent in slash between path and uris. According to https://microsoft.github.io/language-server-protocol/specifications/specification-current/#uri, uri should only use
if the input path uses |
On my Windows 10 VM, I tried to run the tests but link test always timeout, and the logging added to both |
After some painful debugging on Windows 10 VM, the cause is found: The link test cases write the following code to the temp file: source('C:\Users\ken\AppData\Local\Temp\Rtmp6HblZk\file1b5448882fd4.R')
source('file1b5448882fd4.R')
source('non_exist_file.R') The Windows slash in the file makes it not parse-able. |
close #195
completion_reply
formatting_reply
andon_type_formatting_reply
document_highlight_reply
hover_reply
document_link_reply
document_symbol_reply
document_color_reply