Skip to content

test: add leanclient LSP round-trip test for guard diagnostics#1

Merged
Oppen merged 3 commits into
mainfrom
feat/lsp-test
Jun 9, 2026
Merged

test: add leanclient LSP round-trip test for guard diagnostics#1
Oppen merged 3 commits into
mainfrom
feat/lsp-test

Conversation

@Oppen

@Oppen Oppen commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

This PR adds a test that verifies the axiom guard's diagnostics actually reach a language-server client, not just a batch build. It points leanclient at the existing test/consumer project (which loads the guard via plugins := with no import) and asserts the non-standard-axiom warning is published for the declaration depending on the custom axiom. The test is wired into test/run.sh and CI gains a uv setup step so it runs across the toolchain matrix.

The test builds the consumer once before opening the client: the language server elaborates source on its own, but it cannot load a plugin whose shared library has not yet been compiled (the dynlib is a build artifact), so without that the file fatals before any diagnostic is published. This closes the gap where the diagnostics parser was unit-tested against the guard's message strings but never exercised through a real LSP session.

Oppen added 3 commits June 9, 2026 16:30
This PR adds a test that verifies the axiom guard's diagnostics actually reach a language-server client, not just a batch build. It points leanclient at the existing test/consumer project (which loads the guard via plugins := with no import) and asserts the non-standard-axiom warning is published for the declaration depending on the custom axiom. The test is added to test/run.sh and CI gains a uv setup step to run it.

The test ensures the consumer is built once first, because the language server elaborates source on its own but cannot load a plugin whose shared library has not yet been compiled.
@Oppen Oppen merged commit 7c5f15e into main Jun 9, 2026
8 checks passed
@Oppen Oppen deleted the feat/lsp-test branch June 9, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant