Go to file
Sergey Vlasov 7e27d72cbc
Fix qmk find failure due to circular imports (#22523)
There was an import cycle in the Python modules:

  - `qmk.build_targets` imported `qmk.cli.generate.compilation_database`;
  - importing `qmk.cli.generate.compilation_database` requires
    initializing `qmk.cli` first;
  - the initialization of `qmk.cli` imported the modules for all CLI
    commands;
  - `qmk.cli.compile` imported `qmk.build_targets`.

This cycle did not matter in most cases, because `qmk.cli` was imported
first, and in that case importing `qmk.cli.generate.compilation_database`
did not trigger the initialization of `qmk.cli` again.  However, there was
one corner case when `qmk.bulld_targets` was getting imported first:

  - The `qmk find` command uses the `multiprocessing` module.
  - The `multiprocessing` module uses the `spawn` start method on macOS
    and Windows.
  - When the `spawn` method is used, the child processes initialize
    without any Python modules loaded, and the required modules are loaded
    on demand by the `pickle` module when receiving the serialized objects
    from the main process.

The result was that the `qmk find` command did not work properly on macOS
(and probably Windows too); it reported exceptions like this:

    ImportError: cannot import name 'KeyboardKeymapBuildTarget' from partially initialized module 'qmk.build_targets' (most likely due to a circular import)

Moving the offending `qmk.cli.generate.compilation_database` import into
the method which actually uses it fixes the problem.
2023-11-21 15:05:29 +00:00
.github Update stale.yml 2023-11-14 13:15:52 +11:00
.vscode Far better VSCode intellisense support using clangd. (#20382) 2023-05-14 15:32:34 +10:00
builddefs Azoteq IQS5xx support (#22280) 2023-11-20 16:25:35 +00:00
data Enable linking of encoders to switch within layout macros (#22264) 2023-11-20 15:41:48 +00:00
docs Azoteq IQS5xx support (#22280) 2023-11-20 16:25:35 +00:00
drivers Azoteq IQS5xx support (#22280) 2023-11-20 16:25:35 +00:00
keyboards LED drivers: register naming cleanups (#22436) 2023-11-20 15:48:23 +00:00
layouts Merge remote-tracking branch 'origin/master' into develop 2023-10-12 08:13:24 +00:00
lib Fix qmk find failure due to circular imports (#22523) 2023-11-21 15:05:29 +00:00
platforms chibios: disable RWX segment warning on newer GNU lds (#22471) 2023-11-13 23:45:40 +00:00
quantum Azoteq IQS5xx support (#22280) 2023-11-20 16:25:35 +00:00
tests Separate 6KRO and NKRO report structs (#22267) 2023-10-23 15:43:46 +11:00
tmk_core Slight refactor of joystick axis type into typedef (#22445) 2023-11-12 18:25:18 +11:00
users Prep work for NKRO report separation (#22268) 2023-10-14 13:21:20 +02:00
util Update macOS install script (#21854) 2023-09-01 09:26:48 +10:00
.clang-format Clang-format tweaks (#15906) 2022-02-11 20:00:34 -08:00
.clangd Far better VSCode intellisense support using clangd. (#20382) 2023-05-14 15:32:34 +10:00
.editorconfig QMK CLI and JSON keymap support (#6176) 2019-07-15 12:14:27 -07:00
.gitattributes eol=lf, where appropriate (#15752) 2022-01-05 21:56:31 +00:00
.gitignore Flag vial keymaps in 'qmk lint' (#22227) 2023-10-08 12:45:13 +01:00
.gitmodules [Core] Quantum Painter - LVGL Integration (#18499) 2022-12-13 07:51:14 +11:00
Doxyfile Internal docs generation updates (#16411) 2022-02-21 15:47:44 +00:00
doxygen-todo Remove SERIAL_LINK feature (#14727) 2021-10-07 12:32:05 +11:00
LICENSE add an explicit lisence file for github to pickup 2017-11-13 20:50:54 -05:00
license_GPLv2.md Clarify the quantum license (#1042) 2017-03-28 15:20:36 -07:00
license_GPLv3.md Clarify the quantum license (#1042) 2017-03-28 15:20:36 -07:00
license_Modified_BSD.md Clarify the quantum license (#1042) 2017-03-28 15:20:36 -07:00
Makefile Improve test invocation, fix Retro Shift bugs, and add Auto+Retro Shift test cases (#15889) 2023-09-25 12:45:49 +10:00
nose2.cfg Setup a python test framework 2019-09-07 07:58:41 -07:00
paths.mk Remove quantum/audio from global VPATH (#18753) 2022-10-20 14:41:45 +01:00
readme.md Merge remote-tracking branch 'origin/master' into develop 2023-10-28 05:26:02 +00:00
requirements-dev.txt Macros in JSON keymaps (#14374) 2021-11-22 11:11:35 -08:00
requirements.txt Align CLI requirements (#18117) 2022-08-21 18:38:17 +01:00
setup.cfg Quantum Painter (#10174) 2022-04-13 18:00:18 +10:00
shell.nix Nix shell updates for develop (#18131) 2022-08-23 02:59:33 +01:00

THIS IS THE DEVELOP BRANCH

Warning- This is the develop branch of QMK Firmware. You may encounter broken code here. Please see Breaking Changes for more information.

Quantum Mechanical Keyboard Firmware

Current Version Discord Docs Status GitHub contributors GitHub forks

This is a keyboard firmware based on the tmk_keyboard firmware with some useful features for Atmel AVR and ARM controllers, and more specifically, the OLKB product line, the ErgoDox EZ keyboard, and the Clueboard product line.

Documentation

The docs are powered by Docsify and hosted on GitHub. They are also viewable offline; see Previewing the Documentation for more details.

You can request changes by making a fork and opening a pull request, or by clicking the "Edit this page" link at the bottom of any page.

Supported Keyboards

The project also includes community support for lots of other keyboards.

Maintainers

QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, Hasu. The OLKB product firmwares are maintained by Jack Humbert, the Ergodox EZ by ZSA Technology Labs, the Clueboard by Zach White, and the Atreus by Phil Hagelberg.

Official Website

qmk.fm is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK.