ManuelHentschel / vscDebugger

(Partial) Implementation of the Debug Adapter Protocol for R
https://manuelhentschel.github.io/vscDebugger/
MIT License
90 stars 14 forks source link

Update README.md #157

Closed tdeenes closed 3 years ago

tdeenes commented 3 years ago

svSocket must be also installed

ManuelHentschel commented 3 years ago

Thanks for catching that! Unfortunately the regular svSocket does not work at the moment, instead the modifications from the branch forVscDebugger are required.

I asked the authors if they'd include these changes in the original version here, but so far haven't got an answer.

The function that uses svSocket is vscDebugger::.vsc.startWebsocket(), combined with the debug mode Attach to R process. I really like this "background attach" feature, but since it's rather experimental at the moment, I'd probably not include it in the default install process.

For now, the most reasonable approach might be to just remove svSockets from DESCRIPTION and only use the message from .vsc.startWebsocket to inform the user about which version of svSocket to install.

Any thoughts on this?

tdeenes commented 3 years ago

Or move svSocket to Suggests in the DESCRIPTION and use something like:

if (requireNamespace("svSocket", quietly = TRUE)) {
  do_this_and_that()
} else {
  stop("You have to install 'svSocket' to use this feature", call. = FALSE)
}
tdeenes commented 3 years ago

Furthermore, a CRAN-like repo can be created under the gh-pages branch where the proper svSocket_...tar.gz file plus the corresponding Win and Mac binaries can be made available. You can check drat for a tool which can be used to create this repo. I could actually do it for you but not in this or the forthcoming week...

ManuelHentschel commented 3 years ago

Or move svSocket to Suggests in the DESCRIPTION and use something like:

if (requireNamespace("svSocket", quietly = TRUE)) {
  do_this_and_that()
} else {
  stop("You have to install 'svSocket' to use this feature", call. = FALSE)
}

A similar behavior is already achieved here, I think we could safely move svSocket to Suggests/remove it: https://github.com/ManuelHentschel/vscDebugger/blob/9045da19660e3b5f038e69e3901e99e877cf3331/R/websocket.R#L12-L19

Furthermore, a CRAN-like repo can be created under the gh-pages branch where the proper svSocket_...tar.gz file plus the corresponding Win and Mac binaries can be made available. You can check drat for a tool which can be used to create this repo. I could actually do it for you but not in this or the forthcoming week...

That looks quite interesting, we might be able to use that to publish vscDebugger itself, as well. Github.io is already in use for the package documentation, so this might need some tinkering to work properly. I'd appreciate any help! If I start working on this in the meantime I'll let you know

ManuelHentschel commented 3 years ago

Thanks for working on this. I have removed svSocket from the imports for now, since it seems unlikely the authors will make the changes required to use the package here. Hopefully I'll get around to implementing a proper socket solution inside vscDebugger at some point.