refactor(generator): layout detection rely on qmk info#14
Merged
Conversation
The variable named the project root, but sat alongside QMK_HOME (the actual QMK firmware repo) — both prefixed with "QMK", with different meanings. REPO_DIR is unambiguous and removes the collision.
Previously layout detection inspected QMK_HOME subfolders with a regex over keyboard sources — fragile and forcing QMK_HOME to be populated even for generate-only runs. `qmk info` is QMK's own declaration of which layouts a board exposes; intersecting it with shared/layouts.h gives an authoritative match and lets the generator work without a populated QMK_HOME (until `--copy` is used). BREAKING CHANGE: - Layout detection now relies on `qmk info` instead of inspecting QMK_HOME subfolders. - `jq` is required.
Trims install instructions in favor of pointing at QMK's own getting-started guide, adds `jq` as a prerequisite, drops dead `user.keymap` config, and aligns the compile/flash example with the generator's post-copy hint (explicit `-kb -km`). Generator options table now mirrors `usage()` placeholder names.
README now lists boards by shape and name (Ctrl+F-friendly); per-board override macros and caveats live in docs/supported_keyboards.md.
New docs/keebart_keyboards.md covers the Keebart fork setup: Corne Choc Pro (tested) and Corne MX Pro (untested). README gains a "Boards not in mainline QMK" subsection pointing at the worked example and listing vial-qmk as another fork worth checking.
f3278e8 to
2dff9e8
Compare
Contributor
|
I tested this branch for the Atreus and it works like charm. I have gone through the modified files, but some parts are above my expertise level to challenge them. |
Collaborator
Author
Great, thank for testing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously layout detection inspected QMK_HOME subfolders with a regex over keyboard sources — fragile and forcing QMK_HOME to be populated even for generate-only runs.
qmk infois QMK's own declaration of which layouts a board exposes; intersecting it with shared/layouts.h gives an authoritative match and lets the generator work without a populated QMK_HOME (until--copyis used).BREAKING CHANGE:
qmk infoinstead of inspecting QMK_HOME subfolders.jqis required.