Surface diagnostics for ambiguous effects - #1381
Conversation
|
@thomasp85 I've had Claude generate a QA review guide for this stack. The main theme is that Oak now recognises these effects for a bunch of functions whose semantics are documented in an effects registry:
The effects are resolved, meaning that you can import effectful functions via attach or source (or a combination, e.g. sourcing a file that attaches packages). Or on the contrary, masking the symbol in some way with some other non-effectful function should remove the effect. The combination of control-flow, NSE, source, attach, and assignment effects may lead to very complex interactions, some of which are ambiguous. The following guide documents basic effects, interactions, and ambiguity lints. Covers the whole For each area: what to try, and what goto-definition / find-references / SetupSection 2 covers experimental diagnostics, off by default. Turn them on up {
"oak.diagnostics.experimental.enable": true
}1. Effect kinds recognizedEach of these makes a call "effectful" from Oak's point of view: it changes 1.1 Scope-creating NSE —
|
ea2d5ee to
2ea8f80
Compare
2ea8f80 to
c31eb42
Compare
2866875 to
5ae371a
Compare
5ae371a to
97fabb7
Compare
97fabb7 to
1f9f64e
Compare
1f9f64e to
c957fff
Compare
thomasp85
left a comment
There was a problem hiding this comment.
All provided tests works as advertised
c957fff to
1f58564
Compare
1f58564 to
1b68c1e
Compare
1b68c1e to
0bb0cd4
Compare
0bb0cd4 to
52f5296
Compare
Progress towards #1338
Follow-up to #1379
Surfaces the
EffectAmbiguitydiagnostic (previously only logged) as real LSP diagnostics, gated behind a newoak.diagnostics.experimental.enablesetting (off by default).Adds a second, independent diagnostic:
UninstalledPackage, flagging alibrary()/require()call whose target package doesn't resolve. Also gated by the experimental setting.Diagnostic tests are now
instasnapshots rendered via rustc-styleannotate-snippets(the same renderertyandruffuse), showing the annotated source instead of asserted ranges.Positron Release Notes
New Features
Bug Fixes