Migrate to Eldev and Buttercup, extend test suite#91
Merged
Conversation
Eldev is a more standard build tool in the Emacs ecosystem and provides better dependency management and test runner integration. The CI workflow now uses eldev for both testing and linting.
Rewrites the 4 existing utility tests using Buttercup's describe/it/expect BDD-style syntax. Same coverage, better organization.
Add tests for util functions (text-less-than, merlin-pos-to-lsp-pos, point-by-pos, pos-to-point, current-range-or-nil, current-range), xref identifier detection (regular, module-qualified, infix/prefix/binding operators), and ocaml-eglot helpers (construct-local-values, search-as-key, search-as-doc).
Member
|
Wow thanks a lot! |
bbatsov
added a commit
to bbatsov/ocaml-eglot
that referenced
this pull request
Mar 2, 2026
bbatsov
added a commit
to bbatsov/ocaml-eglot
that referenced
this pull request
Mar 2, 2026
bbatsov
added a commit
to bbatsov/ocaml-eglot
that referenced
this pull request
Mar 2, 2026
Contributor
Author
|
I've added changelog entries under a new "Unreleased" section as requested. These will likely cause a minor merge conflict with #90 once one of them lands, but that's easy to resolve. |
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.
This time around I'm proposing bigger changes that make the tooling around the project better (IMO) and should make contribution easier going forward.
The main changes are:
Replace makel with Eldev -- Eldev is the de facto standard build tool for Emacs packages these days. It handles dependency management, testing, linting, and CI out of the box with minimal configuration. It's used by most major Emacs projects (e.g. projectile, cider, magit, flycheck) and is actively maintained. The
Eldevfile is just 3 lines vs the old Makefile setup.Switch from ERT to Buttercup -- Buttercup provides BDD-style
describe/it/expectsyntax that makes tests more readable and better organized. It's the most popular testing framework for Emacs packages (again, used by projectile, cider, etc.) and integrates seamlessly with Eldev.Extend the test suite significantly -- from 4 ERT tests to 53 Buttercup specs covering utility functions, xref identifier detection (regular names, module-qualified names, operators, binding operators), and the main ocaml-eglot helpers. This should make it much safer to contribute changes going forward.