Open codygman opened 4 years ago
A simpler repro would definitely help here, preferably one that starts with make emacs
and does not involve references to lorem ipsum files that I don't have.
I suspect that the problem is you're running in batch mode, and certain things that rely on the presence of windows do not work well in batch mode. There's a reason evil's test suite does NOT use --batch
: the tests will predictably fail there. Is this issue reproducible in a regular graphical or TUI session?
It does seem to be batch mode that is the issue. I guess you guys somehow get success or failure status from running tests in emacs for your CI without batch mode? I'll go look at how that's done I guess.
https://github.com/codygman/evil/tree/emacs-interactive-evil-scroll-up-repro
I added a couple things to the makefile and this was the result:
;; start emacs with C-u scroll/want integration settings like I had
;; make emacs-repro
;; open bind-then-scroll-up-batch.el
;; split windows
;; run each line with eval-expression
;; no issue
;; try running the batch mode added to the makefile
;; make emacs-repro-batch
;; emacs -Q -L . -L lib -l goto-chg.el -l evil-tests.el \
;; --eval "(setq evil-want-integration t evil-want-keybinding nil evil-want-C-u-scroll t)" \
;; --eval "(evil-mode 1)" \
;; -batch -l bind-then-scroll-up-batch.el
;; Wrong type argument: fixnump, nil
;; make: *** [Makefile:80: emacs-repro-batch] Error 255
;; it does only happen in batch mode
Alright I see first you run make test then you have to write success/failure to a textfile in evil-tests-run.
I'll probably have issues with other packages that need windows as well so I might as well change my tests to work the same way for now. I guess it's hard for --batch mode to simulate windows functionality?
There's more to this and I'm trying to figure out how to make a minimal repro, but I just figured out I get this error with tests like evil does interactively if I call (kill-emacs)
anywhere in the file.
I've added a reproduction and failing test with make test
in my fork of evil and submitted a draft pull request linked above.
Per here looks like the error is happening because of:
$ cat trace-evil-scroll-up-results.txt
======================================================================
1 -> (evil-scroll-up nil)
1 <- evil-scroll-up: !non-local\ exit!
I don't know what non-local exit means, but I found Non-Local exits in the gnu emacs manual.
I know that unwind-protect does some low-level stuff to preserve lots of details back to how they were before you did stuff within that block.
I feel like (due to inconsistent instances of this test passing when I removed (kill-emacs)
) it has something to do with killing emacs within an unwind-protect which likely uses some of that low level functionality and exiting within unwind-protect is something unexpected. That's just a guess though.
Feel free to continue pursuing this if you wish. The testing suite has always been a bit fickle so I'm not surprised it's possible to break it with innocent-looking code, but as far as I can tell no actual bug in usage of evil is demonstrated.
Issue type
Environment
Emacs version: Operating System: NixOS 19.09.1254.9104be2ee08 Evil version: Evil version 1.2.14 Evil installation type: use-package Graphical/Terminal: X Tested in a
make emacs
session (see CONTRIBUTING.md): NoReproduction steps
load-init-then-run-ert.el:
emacs-config.el:
my-tests.el:
Running it:
Expected behavior
In my ert test evil-scroll-up should scroll up and not throw a fixnum-p error.
Actual behavior
With an odd error:
Further notes
https://travis-ci.com/codygman/my-emacs-everywhere/jobs/261210520