Explore a standalone, dependency-free R package for the Data Viewer backend
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
调研方向
Start by examining the Data Viewer backend currently implemented inside sess and compare its metadata, paging, sorting, and filtering behavior with the proposed prototype scope of ordinary data frames and matrices. Investigate whether base R formatting and comparison methods, plus a minimal JSON representation, can preserve the listed value behavior without external package dependencies. The investigation is complete when it documents feasibility and installation from a managed library; the issue names no specific files or tests.
由索引模型根据 Issue 内容生成。
描述
Motivation
The Data Viewer backend is currently implemented inside sess, which depends on external R packages such as jsonlite, processx, and later.
These dependencies can complicate installation and cause conflicts with packages managed by renv, pixi, or other environment managers.
PR #1856 improves installation isolation, but does not eliminate these dependencies.
I propose exploring a small, standalone R package for the Data Viewer backend, similar to how jgd provides a graphics device without external R package dependencies.
Unlike session communication, the enhanced Data Viewer is optional.
If its backend is unavailable, only the enhanced viewer needs to be disabled, without affecting the R session or the standard View() behavior.
The primary goal is dependency isolation and maintainability, not performance optimization.
Proposed direction
- Publish the backend as an independent CRAN package, installed into a vscode-R-managed library rather than bundled with the extension.
- Avoid external R package dependencies (
Imports/LinkingTo), using base R and a small amount of C code where appropriate. - Keep the backend independent of sess, and VS Code-specific communication protocols.
- Reuse existing R methods such as
format()for displaying S3/S4 objects, including vector classes built with vctrs. - Preserve native comparison and sorting semantics independently of formatted display values.
- Generate only the JSON structures required by the Data Viewer, potentially using an embedded C library such as cJSON.
- Keep the existing AG Grid frontend.
A general-purpose serializer such as jsonlite provides much more functionality than the Data Viewer needs.
By normalizing R values into a limited set of display types before JSON encoding, we may be able to avoid both a jsonlite dependency and vendoring its implementation.
Prior art
- jgd: A standalone R graphics device with embedded C code and no external R package dependencies.
- vctrs / pillar: Established conventions for separating vector formatting, type information, and comparison semantics.
- Julia VS Code Table Viewer: Converts language-specific values into a limited JSON representation for AG Grid, with lazy data retrieval.
Initial investigation
A prototype could focus on ordinary data frames and matrices, evaluating:
- Whether the existing metadata, paging, sorting, and filtering behavior can be extracted into a standalone package.
- Whether existing R formatting and comparison methods are sufficient for custom vector classes, including those based on vctrs.
- Whether a minimal JSON encoder can preserve existing behavior for missing values, numeric precision, dates,
integer64, and complex columns. - Whether the package can be installed and loaded from a managed library without modifying
.libPaths().
This is an architectural investigation, not a proposal to immediately replace the current implementation.
PR #1804 (lazy Arrow/DBI viewing) should proceed independently.
Arrow IPC / nanoarrow are not required for the initial prototype.
Separating the Data Viewer also does not eliminate sess's own jsonlite dependency, which is a separate concern related to #1859.
However, an independent backend could eventually be reused through alternative transports such as arf.
Related: #1856, #1859, #1804.
- 主要语言
- TypeScript
- 星标
- 1.2k
- 派生
- 147
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 74
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
REditorSupport/vscode-R 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
REditorSupport/vscode-R#1846 · 2 条评论 ·
维护者通常 1 天内回复
-
(feat) Additional Arrow support可能已有人在做 @Fred-Wu 于 13 天前认领。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 72/100
REditorSupport/vscode-R#1785 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 12/100
REditorSupport/vscode-R#1859 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
REditorSupport/vscode-R#1851 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 48/100
REditorSupport/vscode-R#1850 · 4 条评论 ·
维护者通常 1 天内回复
查看 REditorSupport/vscode-R 的全部 Issue
相似的 Issue
-
documentation good first issue hacktoberfest help wanted
难度 2/5 1-3 小时 新手友好度 78/100
libredb/libredb-studio#1756 ·
维护者通常 1 天内回复
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 72/100
lingdojo/kana-dojo#32365 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
friction
难度 2/5 1-3 小时 新手友好度 72/100
kentcdodds/kody#3706 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
copperheadhq/copperhead#378 ·
维护者通常 1 天内回复