| |
|
|
|
|
|
|
| |
Re-enabling native-comp surfaced a suite-wide fragility. When a test redefines a C primitive (or a native-compiled function), native-comp routes native callers through a trampoline that calls the mock with the primitive's maximum arity. A fixed-arity mock narrower than the primitive then throws wrong-number-of-arguments, intermittently, as the eln-cache fills.
I swept every arity-narrow subr mock to append &rest _ (188 sites, preserving any named args the body uses), and added tests/test-meta-subr-mock-arity.el, which fails make test on any subr mock too narrow for the primitive's arity. The rule isn't "never mock a subr". The suite mocks message and completing-read freely. It's "a subr mock must accept the primitive's arity."
Background, the three failure modes, and the research are in docs/native-comp-subr-mocking.org.
|
|
|
Second pass on music-config. The first batch covered assertion guards, the M3U picker, EMMS lazy setup, and the smaller commands. This batch covers the remaining interactive playlist commands and the random-history navigation pair:
- `cj/music-playlist-load`: loads the selected file via `emms-play-playlist`, errors when the chosen file isn't on disk.
- `cj/music-playlist-reload`: replays the buffer-local playlist file, errors when none is associated.
- `cj/music-playlist-edit`: opens the M3U file in another window when the buffer is clean.
- `cj/music-next`: delegates to `emms-next` or `emms-random` based on `emms-random-playlist`.
- `cj/music-previous`: emms-previous when not random; with random + history pops the top, finds it in the playlist, selects + starts; with random + no history messages; with random and a missing track, messages.
- `cj/music--consume-track`: no-op when consume-mode is off, kills the selected track when on.
EMMS primitives (`emms-playlist-clear`, `emms-play-playlist`, `emms-stop`, `emms-random`, `emms-next`, `emms-previous`, `emms-start`, `emms-playlist-select`, `emms-playlist-mode-kill-track`) are stubbed throughout.
|