Failed to get list of R functions: No method asJSON S3 class: NativeRoutineMap
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- r, typescript
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
Tái hiện lỗi trong một tệp R của VS Code trên Windows 11 bằng cách kích hoạt tính năng tự động hoàn thành hoặc hover, sau đó kiểm tra cách tiến trình languageserver của extension được khởi chạy và các r.lsp.args đã cấu hình. So sánh hành vi liên quan đến --vanilla, jsonlite và NativeRoutineMap, đồng thời sử dụng môi trường được báo cáo làm baseline. Hoàn thành khi lỗi function-list không còn xuất hiện trong lúc tự động hoàn thành hoặc hover.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
When using the R extension, I consistently receive these error messages:
-
Failed to get list of R functions. Make sure that jsonlite is installed and r.rpath.windows points to a valid R executable. -
R library paths: C:/R_libs/4.5 C:/Program Files/R/R-4.5.2/library Error: No method asJSON S3 class: NativeRoutineMap
The error occurs even when just selecting lines of code in the editor (without executing), suggesting it's triggered by autocomplete/hover features.
Environment
- OS: Windows 11 x64
- VS Code version: (1.107.1)
- vscode-R extension version: 2.8.6
- R version: 4.5.2 (2025-10-31 ucrt)
- jsonlite version: 2.0.0
- languageserver version: 0.3.16
Attempted fixes (none worked)
-
Added S3 method fix for
asJSON.NativeRoutineMapin:~/.RprofileRprofile.site(R's site profile)- OneDrive shared
.Rprofile
-
Set
R_PROFILE_USERas system environment variable -
Configured
r.lsp.args: ["--no-save", "--no-restore"] -
Reinstalled languageserver from GitHub (
remotes::install_github) -
Updated jsonlite to 2.0.0
Root cause hypothesis
The languageserver appears to run with --vanilla flag internally, which skips all profile files including Rprofile.site. This prevents any runtime fix from being applied before jsonlite encounters the NativeRoutineMap class.
Suggested fix
Either:
- Don't use
--vanillawhen spawning the languageserver R process, or - Add a built-in handler for
NativeRoutineMapclass in the extension/languageserver - Use
force = TRUEin jsonlite calls (similar to fix in PR #1255)
Minimal reproducible example
The error occurs on any R file when the extension tries to provide autocomplete suggestions.
- Ngôn ngữ chính
- TypeScript
- Star
- 1.2k
- Fork
- 139
- Merge trung bình
- 23 giờ 31 phút
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của REditorSupport/vscode-R
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
REditorSupport/vscode-R#1687 · 4 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature-request
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
REditorSupport/vscode-R#1763 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
REditorSupport/vscode-R#1755 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
REditorSupport/vscode-R#1751 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
REditorSupport/vscode-R#1749 · 5 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của REditorSupport/vscode-R
Issue tương tự
-
docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
remix-run/react-router#15558 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
solana-foundation/pay-kit#341 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
supabase/agent-skills#607 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày