Skip to content

Conversation

@ejgallego
Copy link
Contributor

We add LSP tests for Verso documents; we reuse the core LSP testing infrastructure from lean4 upstream. See doc/dev/testing.md there for more details.

This is a draft PR, some comments:

  • maybe we should make the effort and use the lake test runner instead of the ad-hoc test runner here
  • location of files / entry point to be debated
  • we need to ship more tests

@ejgallego
Copy link
Contributor Author

Summary of PR review discussion with David:

  • run test-runner via lake, maybe update test runner upstream to support -d
  • make tests run from lake test
  • note which files are copied from lean upstream
  • test all Verso LSP extensions
  • move changelog to manual, à la reference manual

@david-christiansen
Copy link
Collaborator

test all Verso LSP extensions

I think this one isn't really necessary for a merge here. It's important, but so is avoiding bitrot and getting value from the test that's already here. One or two more should suffice to validate the approach.

@ejgallego
Copy link
Contributor Author

update test runner upstream to support -d option

Upstream is happy with this so I'll proceed with that plan.

@ejgallego ejgallego force-pushed the test_lsp branch 3 times, most recently from 9e3f79d to 70158ef Compare January 15, 2026 16:39
ejgallego added a commit to ejgallego/verso that referenced this pull request Jan 22, 2026
This avoids spurious infoview display of the internal elaborated
constant type.

This bug is only observable after applying the fix in leanprover#700 ; will wait
for leanprover#700 and leanprover#699 to merge this so we can properly provide a test.

Co-authored-by: David Thrane Christiansen <[email protected]>
@ejgallego ejgallego force-pushed the test_lsp branch 3 times, most recently from 0cb4ad2 to 6bdf8a5 Compare January 28, 2026 21:44
@ejgallego
Copy link
Contributor Author

ejgallego commented Jan 28, 2026

Summary of PR review discussion with David:

  • run test-runner via lake, maybe update test runner upstream to support -d
  • make tests run from lake test
  • note which files are copied from lean upstream
  • test all Verso LSP extensions
  • move changelog to manual, à la reference manual

Points addressed, except for "test all Verso LSP extensions".

I added a custom pass on Verso test runner to run the tests, would be nice to have a fancier test runner at some point so we can run the tests in parallel for example.

ejgallego added a commit to ejgallego/verso that referenced this pull request Jan 29, 2026
This avoids spurious infoview display of the internal elaborated
constant type.

This bug is only observable after applying the fix in leanprover#700 ; will wait
for leanprover#700 and leanprover#699 to merge this so we can properly provide a test.

Co-authored-by: David Thrane Christiansen <[email protected]>
@ejgallego ejgallego marked this pull request as ready for review January 29, 2026 17:14
IO.println "Running interactive (LSP) tests..."
IO.println s!"current dir: {(← IO.Process.getCurrentDir)}"
-- We use the lower-level Process.spawn not to buffer the test output
-- Is this OK on windows ?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we set up a Windows runner so you can be sure? No core Verso developer runs Windows, and all sorts of things are different over there; it'd be nice to know that we can build and test everything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to setup a windows runner, I think it is a key platform.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #724 for a (low-prio) attempt to add Windows CI; I propose to keep things as they are until the Windows env to run CI is settled down.

@ejgallego
Copy link
Contributor Author

Thanks for the reviews @david-christiansen , I've incorporated your feedback. Open points:

  • add a changelog entry for this PR?
  • keep tests that showcase a bug, or move them to the fix PR?
  • are we happy with using IO.Process.spawn { cmd := "src/tests/interactive/run_interactive.sh" } for now?

We add LSP tests for Verso documents; we reuse the core LSP testing
infrastructure from lean4 upstream. See `doc/dev/testing.md` there for
more details.

Co-authored-by: David Thrane Christiansen <[email protected]>
@david-christiansen
Copy link
Collaborator

david-christiansen commented Jan 30, 2026

My opinions:

  • add a changelog entry for this PR?

No, we should save that for user-visible things.

  • keep tests that showcase a bug, or move them to the fix PR?

Keep 'em, and fix them in that PR :)

  • are we happy with using IO.Process.spawn { cmd := "src/tests/interactive/run_interactive.sh" } for now?

Yes

@ejgallego
Copy link
Contributor Author

Thanks, we should then be ready to go.

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.

2 participants