Repository navigation
Show the message notes and the counterexample in the hover - #190
Open
CatarinaGamboa wants to merge 1 commit into
Open
CatarinaGamboa wants to merge 1 commit into
CatarinaGamboa wants to merge 1 commit into
Conversation
The editor diagnostic, and so the hover and the Problems view, now carries the headline, then the verifier's message notes, then its counterexample, each on its own line. The hints stay in the LiquidJava view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CatarinaGamboa
added a commit
that referenced
this pull request
Nov 10, 2026
Collaborator
Author
Clean-code reviewI audited this diff with the clean-code-principles checklist. Nothing needed fixing. Already in the diff
Declined
|
Collaborator
Author
Codex review, round 1
The loop ends here: nothing to fix. |
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.
Closes #188
What changes
The editor diagnostic that
LJDiagnosticsHandlerpublishes now carries:<title>: <message>), as before;LJDiagnostic.getMessageNotes(), one per line;getCounterexampleStr(), when it has one.That text is what the hover and the Problems view show. Hints are left out, since they stay collapsed in the panel by design.
The server reads the verifier's generic
LJDiagnosticAPI, not a per-error list. So any note the verifier adds later appears in the hover with no extension change. That includes the planned From note (liquid-java/liquidjava#522), and a counterexample for state errors once the verifier gives one.Before → after (hover text, verifier 0.0.37)
A2_04
Refinement Error: expected timeout >= 0 but could not prove it + Counterexample: timeout == -1A2_10
Refinement Error: failures.size() == size(this.failures) && failures.size() >= 0 is not a subtype of failures.size() > 0 + Counterexample: failures.size() == 0A1_38, A1_01, A1_56 and A1_09 are unchanged. Their errors have no message notes and no counterexample in 0.0.37 or main.
(Headless VS Code, 1600×900, Dark Modern.)
Verifier version
0.0.37, already released.
getMessageNotes()andgetCounterexampleStr()are both in it, and the branch builds with the current pom. Today the only message notes are thewhere <alias> means …lines of refinement errors that use aliases, and no study task has one. The From note will come with a later verifier release.Open question for the PM
The issue lists the
where … means …gloss among the notes. In the verifier, the gloss is a declaration note (getDeclarationNotes(), liquid-java/liquidjava#517, needs 0.0.38). It explains the "declared here" excerpt, which the hover does not show. So this PR shows only the message notes, as specified. If the hover should also show the gloss, that is one morelines.addAll(diagnostic.getDeclarationNotes()), but it needs the 0.0.38 bump that #191 makes.Overlap with open PRs
Server only, in
LJDiagnosticsHandler. No conflict with #185, #186, #189 or #191.Checks
Server
mvn -B test(40 passed; newLJDiagnosticsHandlerTest, which fails on main),npm run test:unit(124 passed),npm run test:typecheck,npm run lint.🤖 Generated with Claude Code