You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0797ae6
Browse filesBrowse the repository at this point in the historyBrowse files
feat: add session attachment preparation API (#1868)
External R frontends cannot discover vscode-R's managed sess package through ordinary package lookup.
Exposing installation paths would also require consumers to duplicate revision checks, installation consent, and setup locking.
This adds `session.prepareAttachment()` so a consumer can execute opaque R code prepared by vscode-R, including through its own local sess proxy endpoint.
This provides the higher-level preparation API discussed in #1865, while keeping `getConnectionInfo()` independent of package preparation.
- Return a per-call, disposable `scriptPath` and R `command`; keep the shared consent service and managed library details internal. Guard script, consent, and IPC initialization against shutdown/redeploy races.
- Reuse the existing managed sess setup for external and manual attachment. Generated scripts handle errors and interrupts without preventing the next R prompt, and manual attachment passes the configured RStudio API emulation setting.
- Document resource lifetime, local endpoint requirements, existing automatic selection behavior, terminal registration after connection, and the R-side consent/setup waits. Add regression coverage for endpoint rejection, independent disposal, concurrent preparation, teardown races, and generated R script execution.
This PR covers preparation only.
Connection lifecycle notifications, terminal rebinding, and external terminal attach hooks remain follow-up work.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
3
3
## Unreleased
4
4
5
+
- Added the extension API's `session.prepareAttachment()` for extensions that own an R process and need vscode-R's managed `sess` setup. R errors and interrupts during manual attachment are now reported as messages while leaving the R prompt usable.
5
6
- The httpgd plot backend now requires the `httpgd` R package version 2.0.1 or later. Older versions are treated as unavailable when choosing the plot backend. (#1855)
0 commit comments