mihaiolteanu / mugur

Configurator for QMK compatible keyboards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when requiring mugur

lrustand opened this issue · comments

I installed mugur from melpa. After installing it I found no variables, functions or commands with mugur in their name, so I naturally tried to (require 'mugur), but this results in the following error:

Debugger entered--Lisp error: (void-function ert-set-test)
  ert-set-test(mugur-valid-keycodes #s(ert-test mugur-valid-keycodes nil #[0 "\301C\3021\22\0\303\30\304\305!)\306D0\202\35\0\1\307\240\210\211@\1AD\262\1\310C\311C\312\313\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204;\0\315\1\242!\210\266\4\301C\3161O\0\303\30\304\317!)\306D0\202Z\0\1\307\240\210\211@\1AD\262\1\320C\311C\312\321\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204x\0\315\1\242!\210\266\4\301C\3221\214\0\303\30\304\323!)\306D0\202\227\0\1\307\240\210\211@\1AD\262\1\324C\311C\312\325\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\265\0\315\1\242!\210\266\4\301C\3261\311\0\303\30\304\327!)\306D0\202\324\0\1\307\240\210\211@\1AD\262\1\330C\311C\312\331\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\362\0\315\1\242!\210\266\4\301C\3321\6\1\303\30\304\333!)\334D0\202\21\1\1\307\240\210\211@\1AD\262\1\335C\311C\312\336\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204/\1\315\1\242!\210\266\4\301C\3371C\1\303\30\304\340!)\334D0\202N\1\1\307\240\210\211@\1AD\262\1\341C\311C\312\342\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204l\1\315\1\242!\210\266\4\301C\3431\200\1\303\30\304\344!)\345D0\202\213\1\1\307\240\210\211@\1AD\262\1\346C\311C\312\347\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\251\1\315\1\242!\210\266\4\301C\3501\275\1\303\30\304\351!)\345D0\202\310\1\1\307\240\210\211@\1AD\262\1\352C\311C\312\353\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\346\1\315\1\242!\210\266\4\301C\3541\372\1\303\30\304\355!)\356D0\202\5\2\1\307\240\210\211@\1AD\262\1\357C\311C\312\360\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204#\2\315\1\242!\210\266\4\301C\36117\2\303\30\304\362!)\363D0\202B\2\1\307\240\210\211@\1AD\262\1\364C\311C\312\365\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204`\2\315\1\242!\210\266\4\301C\3661t\2\303\30\304\367!)\370D0\202\177\2\1\307\240\210\211@\1AD\262\1\371C\311C\312\372\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\235\2\315\1\242!\210\266\4\301C\3731\261\2\303\30\304\374!)\375D0\202\274\2\1\307\240\210\211@\1AD\262\1\376C\311C\312\377\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\332\2\315\1\242!\210\266\4\301C\201@\0001\364\2\303\30\304\201A\0!)\201B\0D0\202\377\2\1\307\240\210\211@\1AD\262\1\201C\0C\311C\312\201D\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204!\3\315\1\242!\210\266\4\301C\201E\0001;\3\303\30\304\201F\0!)\201G\0D0\202F\3\1\307\240\210\211@\1AD\262\1\201H\0C\311C\312\201I\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204h\3\315\1\242!\210\266\4\301C\201J\0001\202\3\303\30\304\201K\0!)\201L\0D0\202\215\3\1\307\240\210\211@\1AD\262\1\201M\0C\311C\312\201N\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\257\3\315\1\242!\210\266\4\301C\201O\0001\311\3\303\30\304\201P\0!)\201Q\0D0\202\324\3\1\307\240\210\211@\1AD\262\1\201R\0C\311C\312\201S\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\366\3\315\1\242!\210\266\4\301C\201T\0001\20\4\303\30\304\201U\0!)\201Q\0D0\202\33\4\1\307\240\210\211@\1AD\262\1\201V\0C\311C\312\201W\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204=\4\315\1\242!\210\266\4\301C\201X\0001W\4\303\30\304\201Y\0!)\201Q\0D0\202b\4\1\307\240\210\211@\1AD\262\1\201Z\0C\311C\312\201[\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\204\4\315\1\242!\210\266\4\301C\201\\\0001\236\4\303\30\304\201]\0!)\201Q\0D0\202\251\4\1\307\240\210\211@\1AD\262\1\201^\0C\311C\312\201_\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\313\4\315\1\242!\210\266\4\301C\201`\0001\345\4\303\30\304\201a\0!)\201b\0D0\202\360\4\1\307\240\210\211@\1AD\262\1\201c\0C\311C\312\201d\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\22\5\315\1\242!\210\266\4\301C\201e\0001,\5\303\30\304\201f\0!)\201g\0D0\2027\5\1\307\240\210\211@\1AD\262\1\201h\0C\311C\312\201i\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204Y\5\315\1\242!\210\266\4\301C\201j\0001s\5\303\30\304\201k\0!)\201l\0D0\202~\5\1\307\240\210\211@\1AD\262\1\201m\0C\311C\312\201n\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\240\5\315\1\242!\210\266\4\301C\201o\0001\272\5\303\30\304\201p\0!)\201q\0D0\202\305\5\1\307\240\210\211@\1AD\262\1\201r\0C\311C\312\201s\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\347\5\315\1\242!\210\266\4\301C\201t\0001\1\6\303\30\304\201u\0!)\201v\0D0\202\f\6\1\307\240\210\211@\1AD\262\1\201w\0C\311C\312\201x\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204.\6\315\1\242!\210\266\4\301C\201y\0001H\6\303\30\304\201z\0!)\201v\0D0\202S\6\1\307\240\210\211@\1AD\262\1\201{\0C\311C\312\201|\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204u\6\315\1\242!\210\266\4\301C\201}\0001\217\6\303\30\304\201~\0!)\201v\0D0\202\232\6\1\307\240\210\211@\1AD\262\1\201\177\0C\311C\312\201\200\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\274\6\315\1\242!\210\266\4\301C\201\201\0001\326\6\303\30\304\201\202\0!)\201\203\0D0\202\341\6\1\307\240\210\211@\1AD\262\1\201\204\0C\311C\312\201\205\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\3\7\315\1\242!\210\266\4\301C\201\206\0001\35\7\303\30\304\201\207\0!)\201v\0D0\202(\7\1\307\240\210\211@\1AD\262\1\201\210\0C\311C\312\201\211\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204J\7\315\1\242!\210\266\4\301C\201\212\0001d\7\303\30\304\201\213\0!)\201\214\0D0\202o\7\1\307\240\210\211@\1AD\262\1\201\215\0C\311C\312\201\216\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\221\7\315\1\242!\210\266\4\301C\201\217\0001\253\7\303\30\304\201\220\0!)\201\221\0D0\202\266\7\1\307\240\210\211@\1AD\262\1\201\222\0C\311C\312\201\223\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\330\7\315\1\242!\210\266\4\301C\201\224\0001\362\7\303\30\304\201\225\0!)\201\221\0D0\202\375\7\1\307\240\210\211@\1AD\262\1\201\226\0C\311C\312\201\227\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\37\10\315\1\242!\210\266\4\301C\201\230\00019\10\303\30\304\201\231\0!)\201\232\0D0\202D\10\1\307\240\210\211@\1AD\262\1\201\233\0C\311C\312\201\234\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204f\10\315\1\242!\210\266\4\301C\201\235\0001\200\10\303\30\304\201\236\0!)\201\237\0D0\202\213\10\1\307\240\210\211@\1AD\262\1\201\240\0C\311C\312\201\241\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\255\10\315\1\242!\210\266\4\301C\201\242\0001\307\10\303\30\304\201\243\0!)\201\244\0D0\202\322\10\1\307\240\210\211@\1AD\262\1\201\245\0C\311C\312\201\246\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\364\10\315\1\242!\210\266\4\301C\201\247\0001\16\11\303\30\304\201\250\0!)\201\244\0D0\202\31\11\1\307\240\210\211@\1AD\262\1\201\251\0C\311C\312\201\252\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204;\11\315\1\242!\210\266\4\301C\201\253\0001U\11\303\30\304\201\254\0!)\201\255\0D0\202`\11\1\307\240\210\211@\1AD\262\1\201\256\0C\311C\312\201\257\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\202\11\315\1\242!\210\266\4\301C\201\260\0001\234\11\303\30\304\201\261\0!)\201\262\0D0\202\247\11\1\307\240\210\211@\1AD\262\1\201\263\0C\311C\312\201\264\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\311\11\315\1\242!\210\311\207" [signal-hook-function string= ... ert--should-signal-hook mugur--keycode a "KC_A" signal ert-form-evaluation-aborted-32 nil make-closure #[0 "\300\304\305\303\242\302BE\301\242\306=?\205\24\0\307\301\242D\244\301\242\306=?\205,\0\310\311!\211\205*\0\312\313\2\302\"D\262\1\244\240\210\314\300\242!\207" [V0 V1 V2 V3 ... :form ert-form-evaluation-aborted-32 :value ert--get-explainer string= :explanation apply ert--signal-should-execution] 7] apply ert-fail ...] 11] nil :passed nil "/home/lars/.emacs.d/elpa/mugur-20231024.755/mugur.el"))
  byte-code("\300\301\302\303\304\301\305\4\305\306\305\307&\10\262\1\"\210\300\310\311\303\304\310\305\4\305\306\305\307&\10\262\1\"\210\300\312\313\303\304\312\314\4\305\306\305\307&\10..." [ert-set-test mugur-valid-keycodes #f(compiled-function () #<bytecode 0x9e77856ec3ca89>) record ert-test nil :passed "/home/lars/.emacs.d/elpa/mugur-20231024.755/mugur...." mugur-invalid-keycodes #f(compiled-function () #<bytecode -0x1b7ee5106b2751ce>) mugur-valid-keymaps #f(compiled-function () #<bytecode -0x1a51c1db3205e3c8>) "Test valid mugur-keymaps." mugur-valid-combos #f(compiled-function () #<bytecode 0x1d3754b9041be73e>) "Test the corect qmk C code generated for combo key..." mugur-invalid-keymaps #f(compiled-function () #<bytecode 0xeb5c1b47b410cf6>) "Test invalid mugur-keymaps."] 12)
  require(mugur)
  eval-expression((require 'mugur) nil nil 127)
  funcall-interactively(eval-expression (require 'mugur) nil nil 127)
  command-execute(eval-expression)

There is no ert-set-test call in the code.
Where do you get that from? Did you modify the source code (i.e. mugur.el?)

No, I just installed it from melpa and called (require 'mugur), nothing else. Maybe it could have something to do with the native compilation in emacs 29+ ? I don't really know how that works.

I tried now in a clean emacs (emacs -Q), and it happens there also, so it is definitely not something in my config

Try a hack, then, maybe,

  • Go to /home/[your_name]/.emacs.d/elpa/mugur-20231024.755/mugur.el
  • Go to line 1094 (This section handles all the mugur defined tests using the ert framework.)
  • Remove or comment out everything from that point until the end of the file, minus (provide 'mugur), which is the last line.
  • Call M-x emacs-lisp-byte-compile-and-load while still in the mugur.el file.
  • require mugur again.

I'm also using emacs 29.1; I don't get this error.

I'm actually on emacs 30.50.0.

Try a hack, then, maybe,

Okay, that seems to have removed the error, and I now have exactly one mugur command that shows up in M-x: mugur-test. I supposed there should be more commands available? Or is everything done by eval-ing my keymap file?

You should have the mugur-mugur command

  • M-x eval-buffer while in mugur.el
  • Check your *messages* file for any other warnings.

ert-set-test (the function you're error-ing on) should be defined in /usr/share/emacs/29.1/lisp/emacs-lisp/ert.el.gz (/emacs/30, in your case)

You should have the mugur-mugur command

I have the mugur-mugur function, but no M-x command with the same name.

Eval-ing the buffer works fine now after disabling the test stuff, so for me this issue is now solved.