posit-dev / posit-dev/positron

Populate diagnostics for `box` modules statically

Open
#4,481 6 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: diagnostics area: kernels bug lang: r support
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 9h
Merged PRs (30d)
195

Description

System details:

Positron and OS details:
Positron Version: 2024.08.0 (Universal) build 48
Code - OSS Version: 1.91.0
Commit: ed616b36655fb24d116108bdd833f1321704315b
Date: 2024-08-19T04:26:51.868Z (1 wk ago)
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 23.4.0
Interpreter details:
> sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin23.4.0
Running under: macOS Sonoma 14.4.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /opt/homebrew/Cellar/r/4.4.1/lib/R/lib/libRlapack.dylib;  LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Chicago
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.4.1 tools_4.4.1    fs_1.6.4       renv_1.0.7   

Describe the issue:

Intellisense and syntax highlighting is broken when using box modules.

Screenshot 2024-08-26 at 12 31 47
Screenshot 2024-08-26 at 12 32 06
Screenshot 2024-08-26 at 12 36 12

Steps to reproduce the issue:

  1. Create positron project.
  2. Create R file
box::use(R6)

TestClass <- R6$R6Class(
    "TestClass",
    public = list(
        initialize = function() print("Hello world!")
    )
)

TestClass2 <- R6::R6Class(
    "TestClass2",
    public = list(
        initialize = function() print("Hello world 2!")
    )
)
  1. Intellisense and syntax highlighting does not work.

Expected or desired behavior:

The tooltips and highlighting should function the same as if I used R6:: or a box module.

Were there any error messages in the UI, Output panel, or Developer Tools console?

NA

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the R file and box::use(R6) example from the report, then trace the existing R diagnostics, IntelliSense, and syntax-highlighting handling. Done means tooltips and highlighting work for box modules in the same way they do for R6:: and regular box module usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.