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
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
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
tmk_core Slight refactor of joystick axis type into typedef (#22445) 2023-11-12 18:25:18 +11:00
users
util
.clang-format
.clangd
.editorconfig
.gitattributes
.gitignore
.gitmodules
Doxyfile
doxygen-todo
LICENSE
license_GPLv2.md
license_GPLv3.md
license_Modified_BSD.md
Makefile
nose2.cfg
paths.mk
readme.md
requirements-dev.txt
requirements.txt
setup.cfg
shell.nix

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.