Open-source keyboard firmware for Atmel AVR and Arm USB families
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
.clangd Far better VSCode intellisense support using clangd. (#20382) 2023-05-14 15:32:34 +10:00
.editorconfig
.gitattributes
.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
doxygen-todo
LICENSE
license_GPLv2.md
license_GPLv3.md
license_Modified_BSD.md
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
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
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.