Skip to content

Migrate to Eldev and Buttercup, extend test suite#91

Merged
xvw merged 5 commits into
tarides:mainfrom
bbatsov:eldev-buttercup
Mar 3, 2026
Merged

Migrate to Eldev and Buttercup, extend test suite#91
xvw merged 5 commits into
tarides:mainfrom
bbatsov:eldev-buttercup

Conversation

@bbatsov

@bbatsov bbatsov commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

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 Eldev file is just 3 lines vs the old Makefile setup.

  • Switch from ERT to Buttercup -- Buttercup provides BDD-style describe/it/expect syntax 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.

bbatsov added 3 commits March 2, 2026 12:21
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).
@xvw

xvw commented Mar 2, 2026

Copy link
Copy Markdown
Member

Wow thanks a lot!
(Even it is not user-surface, I think it deserve also a change entry !)
I'll merge both of your PR when it is done (or not if you think it is not mandatory)

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
@bbatsov

bbatsov commented Mar 2, 2026

Copy link
Copy Markdown
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.

@xvw xvw merged commit 1562e5c into tarides:main Mar 3, 2026
5 checks passed
@bbatsov bbatsov deleted the eldev-buttercup branch March 3, 2026 10:24
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