-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move ert tests into separate file and run tests in CI. #1819
Conversation
b187897
to
77f2dc1
Compare
Replace pos-eol from Emacs 29 with older line-end-position function that exists in Emacs 28 and older.
77f2dc1
to
4c4dbd8
Compare
tmcgilchrist#2 shows test failures on Emacs 28 and below. Related to this
|
Hi! Thanks a lot! Aside, I think that installing |
cc @purcell who wrote melpa's receipe |
MELPA already excludes
Regarding MELPA using |
@purcell Thanks a lot for the explanation (and for the clarification about |
Note that "partially answer to one of my previous question" It seems that we can probably deal with version difference using a mechanism like "capabilities" (already present in LSP). |
Yes, generally you'd indeed have to do some version checking of |
@xvw I'm running the tests as @purcell What's the recommended way to deal with backwards compatible elisp? I thought about using |
Depending on the
and use that wrapper in the code. It would be frowned upon to simply define |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @tmcgilchrist !
Would you have the time to implement the suggestions of @xvw and @purcell ?
- Move the tests to a separate folder and document how they can be run.
- Depend on the compat package to see if it solves the backward compatibility issue
It looks liek this is confusing the linter
So indeed tests are falling on I will try to test if completion does indeed work or not with emacs 28. |
@xvw do you think you could check that the new completion at point works on Emacs 28.2 ? I am having difficulties installing it on my machine... |
@purcell if it turns out that the new completion does not work on emacs <= 28.2 and that the fix is not-trivial, would it be an option to split merlin in two recipes, a legacy one which ships the old (thanks a lot to you and @bbatsov for all the emacs related help BTW !) |
There is another issue with this: merlin mode now requires the To summarize the current issues:
I guess we could use our own shims for the unavailable functions, but I am not familiar enough with emacs, elisp or melpa to fix all these issues in a timely manner, if anyone want to step in and have a look this will be much welcome. Meanwhile I think reverting the new completion changes is the best thing to do. I will open a draft PR with all these changes so that anyone willing to tackle the task will have a fresh base to build from. The rewrite is an exciting improvement, but it really needs more work before we roll it :-) |
@voodoos Ideally we can choose the correct implementation for completion by detecting the Emacs version and loading that. I'll see if I can make that work. What does the |
I think that'd be an overkill, given the it will likely be easier to fix the updated completion on older Emacsen. I agree with @voodoos that it would probably be best to revert the updated completion for a bit, so users are not impacted by the current breakage. In the mean time we can setup a proper test matrix, etc - if we can one the issues wouldn't have been caught so late. One more note - probably it doesn't make sense to support anything older than Emacs 27 at this point, as Emacs 26 was released a long time ago and pretty much no one uses it at this point. |
The opam-based setup modifies the user's It expects that the plugins are "standalone" and does not configure any package manager in Emacs such as Elpa. It won't pull additional packages required by the plugins (such as compat). We might be able to vendor them as an alternative, or replace it by our own compatibility functions.
Noted! I would like to do a release soonish, so I will revert the changes and create a branch with the merged changes plus the content of this PR so that we can continue working on this. If it's ready before I release, we can re-merge it. |
Yep, agree with this. And then perhaps you can get away without needing any compatibility functions. What's the issue with completion in Emacs < 28.2 though? |
@purcell One of the new tests fails on Emacs 28, but I'm not sure why. Likely the code is using something that behaves differently on Emacs 29, but I doubt it's something hard to fix. |
Let's move further discussions to the new PR: #1827 |
The improvements in #1759 introduced a dependency on
ert
tests which makesmerlin-mode
in ELPA depend on test code. It would be better to not require test code when usingmerlin-mode
.This change puts the test code into its own file and introduced a CI step to run the tests.
How does the ELPA release process work? The new
merlin-cap-test.el
should be excluded from the package sent to ELPA.