Skip to content

Understanding box modules directory context #5082

@GitHunter0

Description

@GitHunter0

System details:

Positron and OS details:

Positron Version: 2024.11.0 (user setup) build 49
Code - OSS Version: 1.93.0
Commit: 10183fa
Date: 2024-10-15T02:46:25.016Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045

Interpreter details:

R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)

Describe the issue:

Hi folks / @klmr , please consider the MWE below.

We have module1.R, module2.R and __initi__.R files, all in directory C:/project/modules/, with C:/project/ being our R working directory.

# module1.R
f1 <- function(x) return(x)

In RStudio, running box::use(./module1[f1]) interactively from module2.R works as expected.

However, in Positron, it generates this error:

Error in `box::use()`:
! unable to load module “./module1”; not found in "C:/project/"

Which means Positron does not understand we are running a code from a box module and therefore it should consider its directory as the reference, not the R working directory.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apiIssues related to API category.area: ecosystemIssues related to libraries/packages in the dev ecosystemlang: r

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions