Skip to content

Conversation

@ManuelHentschel
Copy link
Member

@ManuelHentschel ManuelHentschel commented Oct 11, 2021

re #661

Changes the default behavior for the caching of parsed help index files between sessions.

@renkun-ken
Copy link
Member

I remove glmnet package, reload window, and hover/open help for glmnet::glmnet, and the help does not exist.

Then I install glmnet, the languageserver could instantly provide the documentation on hover but vscode-R help hover and open help for selection still does not work in this case.

@ManuelHentschel
Copy link
Member Author

Then I install glmnet, the languageserver could instantly provide the documentation on hover but vscode-R help hover and open help for selection still does not work in this case.

  • Does reloading vscode fix this?
  • Is the behavior the same if you install glmnet using the command Install CRAN Package?

@renkun-ken
Copy link
Member

renkun-ken commented Oct 11, 2021

Does reloading vscode fix this?

Yes, but the original issue seems to suggest that the package documentation should work instantly once the package is installed from either vscode command or in an R session?

Is the behavior the same if you install glmnet using the command Install CRAN Package?

There is no such problem if I install the package using the command. It only occurs if I install it via install.packages("glmnet") in an R terminal.

@ManuelHentschel
Copy link
Member Author

Yes, but the original issue seems to suggest that the package documentation should work instantly once the package is installed from either vscode command or in an R session?

Yes, that would be the "proper" solution, but is a bit harder to implement. Here I just changed a default config value to make sure that restarting vscode also completely restarts the help server.

In order to instantly work for packages installed using install.packages(), we need to check for new packages each time a hover is shown, which can be quite frequent. And e.g. during package development, the same package might be reinstalled with the same version-number but different help topics, which I guess could only be detected by refreshing the list of all aliases.

I'll remove the link to the issue, but as a first step we could still merge this PR.

@renkun-ken
Copy link
Member

renkun-ken commented Oct 11, 2021

Thanks for the details. Let's merge it for now.

@renkun-ken renkun-ken merged commit 5e71ecd into master Oct 11, 2021
@ManuelHentschel ManuelHentschel deleted the changeCacheDefault branch November 27, 2021 13:03
ElianHugh pushed a commit to ElianHugh/vscode-R that referenced this pull request May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants