Repository navigation
End the bind scan's stub window list instead of looping on it - #15308
nekomario28 wants to merge 4 commits into
Conversation
|
omarchy-menu-keybindings builds a Lua bind cache by reading ~/.config/hypr/hyprland.lua against a stub hl. The stub answers every call with one self-referential object, so ipairs(hl.get_windows()) -- a plugin walking the window list as the config loads -- gets a truthy value at every index and never ends, pinning a core until the cheatsheet is killed. Answer a numeric index with nil so an ipairs() over a stubbed getter ends, and cover it in the keybindings test.
c10f0b3 to
3f17562
Compare
The commands under test call each other: omarchy-battery-status runs omarchy-i18n, and omarchy-i18n reads OMARCHY_PATH. A test run from a checkout had neither on hand, so any test whose command reaches another one failed with `omarchy-i18n: command not found` or `OMARCHY_PATH: unbound variable`. test/shell.d/i18n-test.sh already exports both for itself; base-test.sh, which the rest source, did not. bash test/shell on quattro: 32 of 419 files fail. With these two lines: 17 of 419, and every one of the 17 also fails before this change, so nothing new fails. Four of the fifteen are a regression from the language work (omacom#15326): battery-status, crash-capture, hyprland-workspace-layout and keybindings-menu pass at 84cfb93^ and fail at 84cfb93.
…tub-ipairs # Conflicts: # test/shell.d/keybindings-menu-test.sh
|
@nekomario28, I reviewed this against the other open pull requests for #15216. The fix is correct: making the bind scan's When fixes are similar, the oldest one wins, so the first to the fix keeps the credit. That is #7564. It returns One part of this pull request is worth keeping: the end-to-end test in What was checked: I read the diff, the surrounding scanner code and each competing diff. Nothing ran on a worker, because verifying a fix that is not the one going forward would spend a worker on nothing. Codex Medium, given this pull request and its competitors without my conclusion, also picked #7564, and it found the same test worth carrying over. That agreement is not guaranteed to be independent. Asked separately whether this duplicates #12712, it said no, so this stays open. Next step: the maintainer. |
omarchy-menu-keybindings(SUPER + K) builds its Lua bind cache by reading~/.config/hypr/hyprland.luaagainst a stubhl. The stub is one object that answers every call with itself, so a plugin that walksipairs(hl.get_windows())while the config loads reads a truthy value at every index and never ends — the cheatsheet pins a core until it is killed.The stub now answers a numeric index with
nil, so anipairs()over a stubbed getter ends, while chained calls (hl.something.other()) still resolve to the stub.test/shell.d/keybindings-menu-test.shcovers it: it prepends a window walk to the config and runs the scan under a timeout. With the change reverted, that check fails on the timeout; with it, the file passes.Fixes #15216.