Detect Assign effects - #1342
Merged
Merged
Conversation
lionel-
force-pushed
the
oak-nse/4-assign
branch
from
July 17, 2026 08:56
ccd470f to
d8f6b46
Compare
lionel-
force-pushed
the
oak-nse/4-assign
branch
from
July 17, 2026 11:26
d8f6b46 to
54c0df9
Compare
lionel-
force-pushed
the
oak-nse/4-assign
branch
3 times, most recently
from
July 22, 2026 15:25
93a4a54 to
1337f51
Compare
lionel-
force-pushed
the
oak-nse/4-assign
branch
2 times, most recently
from
July 30, 2026 14:38
19627d6 to
fc1b5bf
Compare
lionel-
force-pushed
the
oak-nse/4-assign
branch
from
July 31, 2026 07:08
d7bc97a to
03960a9
Compare
lionel-
force-pushed
the
oak-nse/4-assign
branch
from
July 31, 2026 12:28
03960a9 to
4ba00b3
Compare
lionel-
force-pushed
the
oak-nse/4-assign
branch
2 times, most recently
from
August 3, 2026 13:17
62adc46 to
a509f80
Compare
lionel-
force-pushed
the
oak-nse/4-assign
branch
from
August 3, 2026 16:18
a509f80 to
08857e0
Compare
lionel-
force-pushed
the
oak-nse/4-assign
branch
from
August 3, 2026 16:21
08857e0 to
8db52b5
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Progress towards #1338
Branched from #1341
Adds
Assignas the fourth effect kind, after NSE, attach, and source. A call or operator that binds a name withAssignnow creates a real definition that feeds the use-def map,exports(), goto, and rename exactly like a syntactic<-. These Assign effects are shadow-, source-, and attach-aware.Two forms:
assign("x", value)anddelayedAssign("x", value). The name is the string first argument, the value the next positional. Bails whenenvir =orpos =is set, since then the binding lands outside the current scope and we can't state it as a fact.x %<>% f()(magrittr),x %<~% expr(rlang),x := expr(S7).Impl notes:
A new
DefinitionKind::Assignmodels this effect in the semantic index.A new
RangedAstPtrwrapper ofAstPtrallows carrying the trimmed range of the name node.AstPtronly carries the full range, and requires the root node to resolve a trimmed range, which is unergonomic.Goto and rename now work with custom Assign calls. When a name is bound in string form (e.g.
assign("x", ...)) the rename occurs in place as a string to keep the quotes. To make this easier I've dropped the normalisation of strings during renames (which matches your preference Davis, cf previous discussion).To support that cleanly, the decision of how a renamed name is spelled moved out of the LSP layer into
oak_ide. This way the LSP layer only converts ranges and wires files.Positron Release Notes
New Features
assign(),delayedAssign(),%<>%from magrittr,:=from S7, etc.Bug Fixes