Add support for targets::tar_source() and sourceDir() - #1384
Open
lionel- wants to merge 8 commits into
Open
Conversation
Contributor
Author
|
Edit: See #1388 (comment) |
lionel-
force-pushed
the
oak-source/3-source-dir
branch
2 times, most recently
from
August 3, 2026 13:17
7efc97b to
f303691
Compare
lionel-
force-pushed
the
oak-source/3-source-dir
branch
from
August 3, 2026 16:18
f303691 to
cf3a28c
Compare
lionel-
force-pushed
the
oak-source/3-source-dir
branch
from
August 3, 2026 18:19
cf3a28c to
bdc2a52
Compare
lionel-
force-pushed
the
oak-source/3-source-dir
branch
from
August 4, 2026 03:56
bdc2a52 to
c58fd74
Compare
lionel-
force-pushed
the
oak-source/3-source-dir
branch
from
August 4, 2026 08:29
c58fd74 to
fa775fb
Compare
lionel-
force-pushed
the
oak-source/3-source-dir
branch
from
August 4, 2026 13:39
91d767a to
14aba6b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses posit-dev/positron#14790
Progress towards #1338
Source effects can now target a directory instead of a single file, which covers the two idioms for loading a folder of scripts:
targets::tar_source()and thesourceDir()example from?source.The resolver expands the directory into one target per script, in
list.files()order. Load order within the call is respected:code/b.Rseescode/a.Rbut not the other way around. Combined with the previous PR this also means the sourced files see each other, through the sourcing file's scope, without relying on theR/auto-collation of the first PR.The PR also adds ad hoc support for
sourceDir()with a total hack: any calls tosourceDir()with a resolvable string causes aSourceeffect. This is to handle the documented pattern in?sourcethat people are copying around: https://github.com/search?q=sourceDir+language%3AR&type=code. Ideally we'd infer the effects from thelist.files()andsource()calls. One day.Positron Release Notes
New Features
targets::tar_source()and asourceDir()call as documented in?source(go to definition returns no definition found positron#14790).Bug Fixes