-
Notifications
You must be signed in to change notification settings - Fork 14
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
Undercover causes weird errors in Emacs <26 when enabled #54
Comments
And I forgot to mention, Emacs 26 seems to run just fine. This error only occurs on 25 and lower. (Note: the build failure on emacs-snapshot is unrelated to this issue.) |
Must be because in Emacs 25.3 source code there is no special handling of |
Well, |
Then it rather looks like a bug in Emacs. I.e. it supplies a wrong debug declaration in pre-26 versions. |
Yeah, using |
Thanks for looking into it; is there still anything that needs to be done on undercover.el's side? |
I guess undercover.el could supply the correct debug spec. This should be pretty safe to do. I doubt that fixing an incorrect debug spec would ever break any existing code, and even if it does it will only break it in tests, so it won't mess up anyone's daily work. |
OK, how about this patch, then? |
Seems reasonable. |
@DarwinAwardWinner Could you please check if the patch fixes the error you were seeing (if you haven't done so yet)? |
This is just to verify that this issue is fixed: undercover-el/undercover.el#54
This is just to verify that this issue is fixed: undercover-el/undercover.el#54
This is just to verify that this issue is fixed: undercover-el/undercover.el#54
This is just to verify that this issue is fixed: undercover-el/undercover.el#54
This is just to verify that this issue is fixed: undercover-el/undercover.el#54
This is to verify that this issue is fixed: undercover-el/undercover.el#54
Hmm, the current master of undercover seems to be crashing on all Emacs versions in my test suite, which is weird because it wasn't doing that as recently as last week. So I guess I'll need to figure that out before I can test whether this patch fixes things. https://github.com/DarwinAwardWinner/amx/actions/runs/506341941 |
Oh wait, part of the issue it's that it's using melpa-stable. I need to debug my test suite. |
If you can get it to print a stack trace for that |
Weird, I'm already running eldev with |
I can reproduce it with |
Hmm, it looks like eldev attempts to integrate deeply with Undercover's internals, going as far as advising private functions. That might have something to do with it, as I moved a lot of things around under the hood in v0.8.0. |
Sure enough, |
Ok, so it looks like I will need to wait for an Eldev update before I can use undercover again. @doublep Pinging you to make you aware. |
The error originates from this line: https://github.com/doublep/eldev/blob/ef6ea342a2dee7d6e745bc48d4d0f50d4552d537/eldev-plugins.el#L336 In v0.8.0, I allowed every
For the long term, Undercover's public API needs to be expanded to accommodate such use cases directly, without needing to use advice or accessing private variables. That would help not only Eldev in terms of long-term stability, but any other package that wants to build on top of Undercover with similar goals / intentions. |
Yeah, I had to go into internals because publicly exposed stuff wasn't enough to achieve what I wanted. I partially rewrote integration code, but it of course still goes into internals, as there is no better way. If you feel like doing something about it, I could provide the list of what Eldev needs. |
Yes, please. |
So, I am trying to enable coverage reports using undercover for my project, amx. However, enabling undercover causes a bunch of my tests to fail with weird errors, as you can see here: https://travis-ci.org/DarwinAwardWinner/amx/builds/650744876
For comparison, here's the successful run right before undercover was enabled: https://travis-ci.org/DarwinAwardWinner/amx/builds/650732841
The errors all seem to be
error: (error "Bad `using' clause")
. Grepping the Emacs codebase seems to imply that this error is thrown from inside the bowels of thecl-loop
macro, but I have no idea why enabling undercover would trigger this error in code that normally runs just fine.The text was updated successfully, but these errors were encountered: