Skip to content

refactor(sess!): remove legacy APIs and unused helpers - #1847

Merged
eitsupi merged 3 commits into
REditorSupport:mainfrom
eitsupi:refactor/sess-remove-legacy-api
Oct 7, 2026
Merged

eitsupi merged 3 commits into
REditorSupport:mainfrom
eitsupi:refactor/sess-remove-legacy-api

Conversation

@eitsupi

@eitsupi eitsupi commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Close #1845

The development build already requires sess IPC protocol 2 and is incompatible with past releases. Use this compatibility break to remove the old R API compatibility layer and helpers whose roles have ended.

  • use_httpgd, use_jgd, and their compatibility helpers: use_httpgd was introduced in Next major release 3.0.0-rc.0 #1684, and use_jgd in feat(plot): addjgd graphics device integration #1706. feat: add native plot backend for R graphics devices #1817 replaced them with plot_backend, retaining the old arguments through .warn_deprecated_plot_args() and .legacy_plot_backend(). Extension callers already use plot_backend; removing the old arguments now also removes the need for these helpers.
  • register_hooks(): Introduced in Next major release 3.0.0-rc.0 #1684 for standalone hook registration and re-registration. It now delegates to runtime_start(), which connect() already calls directly, and has no extension callers. Re-registering also resets runtime-owned devices and viewer state without updating reconnect options, so this wrapper no longer provides a coherent independent configuration API. Keep the internal runtime lifecycle and use connect() as the public integration entry point.
  • rebind(): Introduced in Next major release 3.0.0-rc.0 #1684. fix(sess): separate runtime and transport lifecycles #1739 migrated all callers to .runtime_rebind(), which records bindings for restoration when the runtime stops. Only the unused old definition remained.
  • json_rpc_response() and json_rpc_error(): Included in #1684, but the upstream sess branch history shows they served the earlier HTTP /rpc implementation. The WebSocket conversion removed their callers before sess reached main. Delete these unused HTTP response builders; the active "json_rpc_error" condition class remains.

Update documentation, installer export checks, and test fixtures to match. Backend selection, fallback, and reconnect behavior remain unchanged, and the IPC protocol stays at version 2.

Breaking API change: connect() no longer accepts use_httpgd or use_jgd, and register_hooks() is no longer exported. Use plot_backend and connect() instead.

BREAKING CHANGE: connect no longer accepts use_httpgd or use_jgd, and register_hooks is no longer exported. Use plot_backend and connect to configure the session runtime.
@eitsupi
eitsupi force-pushed the refactor/sess-remove-legacy-api branch from 1d3d61c to a92f616 Compare October 7, 2026 15:28
@eitsupi
eitsupi marked this pull request as ready for review October 7, 2026 15:32
@eitsupi
eitsupi marked this pull request as draft October 7, 2026 15:37
@eitsupi
eitsupi marked this pull request as ready for review October 7, 2026 15:39
@eitsupi eitsupi changed the title refactor(sess)!: remove legacy APIs and unused helpers refactor(sess!): remove legacy APIs and unused helpers Oct 7, 2026

@renkun-ken renkun-ken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 3d52af855f975703b8cb70b05e4b139e714f9989. I found no actionable correctness or regression issues.

The removed helpers have no remaining callers in the repository. The extension startup/attach paths and discovery reconnect options already use plot_backend, and connect() still resolves it before changing transport or runtime state. The export checks, installer fixtures, and documentation are consistent with the intended breaking API change.

Validation on macOS with R 4.6.1:

  • Installed the prepared PR snapshot into an isolated R library; all 1,169 sess tinytest checks passed, including native plotting, IPC, reconnect, and startup cleanup.
  • All six source/bootstrap/VSIX identity tests and the base-R source identity/installer tests passed.
  • Verified the installed snapshot through sess_verify_package() in both ordinary and Interactive modes.
  • All five GitHub CI checks passed, including the Linux, macOS, and Windows test jobs.

@eitsupi
eitsupi merged commit 9b511ba into REditorSupport:main Oct 7, 2026
5 checks passed
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.

Remove deprecated sess functions' arguments

2 participants