Skip to content

Treat scripts in R/ folder as collated - #1382

Open
lionel- wants to merge 1 commit into
oak-nse/22-diagnosticsfrom
oak-source/1-r-collation
Open

Treat scripts in R/ folder as collated#1382
lionel- wants to merge 1 commit into
oak-nse/22-diagnosticsfrom
oak-source/1-r-collation

Conversation

@lionel-

@lionel- lionel- commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Progress towards posit-dev/positron#14790
Progress towards #1338

Files in an R/ folder are now treated in an alphabetical collation, just like in packages. This means they can now see each other's functions.

The alphabetical order only matters for top-level expressions (eager context). For lazy contexts (like functions), the symbols resolve to the end-of-collation view, where all symbols from all files are defined.

Goals:

This is not technically needed for the targets::tar_source() use case which we will support with a more precise mechanism in subsequent PRs.

Note that while this allows files in the R/ folder to see each other, this has no effect at the sourcing site, e.g. tar_source(), or the implicit call to loadSupport() made by Shiny. This is a different side of the problem to be tackled separately.

Positron Release Notes

New Features

Bug Fixes

  • N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant