You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show the declared-here gloss of state errors in the IDE #181
liquid-java/liquidjava#515 makes the CLI print a gloss under the "Refinement declared here" excerpt of a state error when the declaration writes states of named sets in the shorthand:
--> Refinement declared here:
13 | @StateRefinement(from = "closed(this) && unlocked(this)", to = "opened(this)")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
where closed(this) means doorState(this) == closed, unlocked(this) means lockState(this) == unlocked
The headline shows doorState(d) == closed && lockState(d) == unlocked, so the gloss is what connects the two notations.
The extension does not show the declaration excerpt at all: StateRefinementErrorDTO only sends declarationPosition, and renderLocation (client/src/webview/views/sections.ts) shows it as a location link. So the gloss does not reach the IDE.
The hints already reach it unchanged (they are plain message text in hints), so the new hint notation needs no change here.
Proposal
Server: send the gloss lines in StateRefinementErrorDTO, e.g. a declarationNotes: string[] field from StateRefinementError.getDeclarationNotes(...) (the verifier reads the declaration text from the source; the server can do the same, or the verifier can expose the lines directly).
Client: show them under the declaration's location link, in the same style as the other notes.
Only when there are lines; nothing changes for declarations written in value form (doorState(this) == closed) or with unnamed sets.
Activity
Show states of named sets by their set in state hints and declared-he…