qmk/qmk_firmware

[Bug] FORCE_LAYOUT ignored with qmk command when using external userspace

Open

#22.815 aperta il 3 gen 2024

Vedi su GitHub
 (1 commento) (2 reazioni) (0 assegnatari)C (43.867 fork)batch import
bughelp wanted

Metriche repository

Star
 (20.368 star)
Metriche merge PR
 (Merge medio 20g 9h) (27 PR mergiate in 30 g)

Descrizione

Describe the Bug

According to https://github.com/qmk/qmk_firmware/blob/master/docs/feature_layouts.md the FORCE_LAYOUT variable can be used to specify a specific layout for a keyboard and keymap that support more than one layout.

For example:

  • beekeeb/piantor supports community layouts split_3x6_3 and split_3x5_3
  • manna-harbour_miryoku supports both of those community layouts
  • I can build for the split_3x6_3 layout using make like this make beekeeb/piantor:manna-harbour_miryoku FORCE_LAYOUT=split_3x6_3 QMK_USERSPACE=/home/byron/sandbox/current/qmk_userspace

To this point, everything is working as expected.

But I would like to be able to build with the qmk compile command like I do for my other keyboards that don't have this multiple layout issue. I would expect the following command to work: qmk compile -kb beekeeb/piantor -km manna-harbour_miryoku -e FORCE_LAYOUT=split_3x6_3.

Unfortunately, that command seems to always build the split_3x5_3 layout. Here's what the dry-run output shows:

❯ qmk compile -kb beekeeb/piantor -km manna-harbour_miryoku -e FORCE_LAYOUT=split_3x6_3 -n
Ψ Compiling keymap with gmake -r -R -f builddefs/build_keyboard.mk -s KEYBOARD=beekeeb/piantor KEYMAP=manna-harbour_miryoku KEYBOARD_FILESAFE=beekeeb_piantor TARGET=beekeeb_piantor_manna-harbour_miryoku INTERMEDIATE_OUTPUT=.build/obj_beekeeb_piantor_manna-harbour_miryoku VERBOSE=false COLOR=true SILENT=false QMK_BIN="qmk" FORCE_LAYOUT=split_3x6_3 QMK_USERSPACE=/home/byron/sandbox/current/qmk_userspace MAIN_KEYMAP_PATH_1=/home/byron/sandbox/current/qmk_userspace/layouts/split_3x5_3/manna-harbour_miryoku MAIN_KEYMAP_PATH_2=/home/byron/sandbox/current/qmk_userspace/layouts/split_3x5_3/manna-harbour_miryoku MAIN_KEYMAP_PATH_3=/home/byron/sandbox/current/qmk_userspace/layouts/split_3x5_3/manna-harbour_miryoku MAIN_KEYMAP_PATH_4=/home/byron/sandbox/current/qmk_userspace/layouts/split_3x5_3/manna-harbour_miryoku MAIN_KEYMAP_PATH_5=/home/byron/sandbox/current/qmk_userspace/layouts/split_3x5_3/manna-harbour_miryoku

The MAIN_KEYMAP_PATH_ variables are only set when using external userspace and seem to be overriding the FORCE_LAYOUT setting.

Keyboard Used

beekeeb/piantor

Link to product page (if applicable)

No response

Operating System

Linux

qmk doctor Output

Ψ QMK Doctor is checking your environment.
Ψ CLI version: 1.1.2
Ψ QMK home: /home/byron/sandbox/current/qmk_firmware
Ψ Detected Linux (Fedora Linux 39 (Workstation Edition)).
⚠ Missing or outdated udev rules for 'atmel-dfu' boards. Run 'sudo cp /home/byron/sandbox/current/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'kiibohd' boards. Run 'sudo cp /home/byron/sandbox/current/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'stm32-dfu' boards. Run 'sudo cp /home/byron/sandbox/current/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'apm32-dfu' boards. Run 'sudo cp /home/byron/sandbox/current/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'gd32v-dfu' boards. Run 'sudo cp /home/byron/sandbox/current/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'wb32-dfu' boards. Run 'sudo cp /home/byron/sandbox/current/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'bootloadhid' boards. Run 'sudo cp /home/byron/sandbox/current/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'usbasploader' boards. Run 'sudo cp /home/byron/sandbox/current/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'usbtinyisp' boards. Run 'sudo cp /home/byron/sandbox/current/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'md-boot' boards. Run 'sudo cp /home/byron/sandbox/current/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.
⚠ Missing or outdated udev rules for 'caterina' boards. Run 'sudo cp /home/byron/sandbox/current/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
⚠ Missing or outdated udev rules for 'hid-bootloader' boards. Run 'sudo cp /home/byron/sandbox/current/qmk_firmware/util/udev/50-qmk.rules /etc/udev/rules.d/'.
Ψ Testing userspace candidate: /home/byron/sandbox/current/qmk_userspace -- Valid `qmk.json`
Ψ QMK userspace: /home/byron/sandbox/current/qmk_userspace
Ψ Userspace enabled: True
Ψ Git branch: user/byronclark
Ψ Repo version: 0.23.2
Ψ - Latest user/byronclark: 2023-12-21 09:32:19 +1100 (2661ee282a) -- [Bugfix] Manipulate deferred executor slot only if tokens match (#22722)
Ψ - Latest upstream/master: 2023-12-29 17:17:20 +0100 (fc20e0b014) -- Waffling60 iso rev e (#22733)
Ψ - Latest upstream/develop: 2023-12-29 16:17:49 +0000 (a081fc7301) -- Merge remote-tracking branch 'origin/master' into develop
Ψ - Common ancestor with upstream/master: 2023-12-21 09:32:19 +1100 (2661ee282a) -- [Bugfix] Manipulate deferred executor slot only if tokens match (#22722)
Ψ - Common ancestor with upstream/develop: 2023-12-21 09:32:19 +1100 (2661ee282a) -- [Bugfix] Manipulate deferred executor slot only if tokens match (#22722)
Ψ CLI installed in virtualenv.
☒ Can't find dfu-programmer in your path.
Would you like to install dependencies? [Y/n] n
Ψ Found arm-none-eabi-gcc version 13.1.0
Ψ Found avr-gcc version 13.1.0
⚠ We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.
Ψ Found avrdude version 6.4
⚠ Unknown version for dfu-programmer
Ψ Found dfu-util version 0.11
Ψ Submodules are up to date.
Ψ Submodule status:
Ψ - lib/chibios: 2023-04-15 13:48:04 +0000 --  (11edb1610)
Ψ - lib/chibios-contrib: 2023-07-17 11:39:05 +0200 --  (da78eb37)
Ψ - lib/googletest: 2021-06-11 06:37:43 -0700 --  (e2239ee6)
Ψ - lib/lufa: 2022-08-26 12:09:55 +1000 --  (549b97320)
Ψ - lib/vusb: 2022-06-13 09:18:17 +1000 --  (819dbc1)
Ψ - lib/printf: 2022-06-29 23:59:58 +0300 --  (c2e3b4e)
Ψ - lib/pico-sdk: 2023-02-12 20:19:37 +0100 --  (a3398d8)
Ψ - lib/lvgl: 2022-04-11 04:44:53 -0600 --  (e19410f8)
Ψ Major problems detected, please fix these problems before proceeding.
Ψ Check out the FAQ (https://docs.qmk.fm/#/faq_build) or join the QMK Discord (https://discord.gg/Uq7gcHh) for help.

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

Guida contributor