REditorSupport / REditorSupport/vscode-R

On Windows and MacOS, `source()`ed packages do not show function suggestion even Namespaces attached and loaded

Open
#1,536 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

I am working on Windows 10 and using the native R terminal for my work projects. I have a script to setup some configurations and packages, and source() it from other scripts.

However, auto-suggestion on functions do not work if loading packages using this way for the first time even Namespaces are attached and loaded.

Also tested on my own MacBook, it happens too.

image

For data.table
image

For haven
image

However, it only works after I open 0_loadLibrary.R

image image

And then as soon as I close 0_loadLibrary.R, it stops working again.

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

Reproduce the behavior in the native R terminal on Windows or macOS by sourcing the setup script that loads data.table and haven, then closing 0_loadLibrary.R. Trace how function suggestions are refreshed after source() and verify that suggestions remain available without keeping that file open.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.