Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Could not save userspace file: ['splitkb/aurora/sofle_v2/rev1', '0xErnie'] is not valid under any of the given schemas #24074

Open
2 tasks
0xErnie opened this issue Jul 7, 2024 · 5 comments

Comments

@0xErnie
Copy link

0xErnie commented Jul 7, 2024

Describe the Bug

Following README.md in qmk_userspace creating of a new keymap in my userspace failed with an arbitrary error.

qmk new-keymap -kb splitkb/aurora/sofle_v2/rev1

Ψ Generating a new keymap


Name Your Keymap
Used for maintainer, copyright, etc

Your GitHub Username?  [Redacted] 0xErnie
Ψ Created a new keymap called 0xErnie in: /home/redacted/repos/qmk_userspace/keyboards/splitkb/aurora/sofle_v2/rev1/keymaps/0xErnie.
Ψ Compile a firmware with your new keymap by typing: qmk compile -kb splitkb/aurora/sofle_v2/rev1 -km 0xErnie.
☒ Could not save userspace file: ['splitkb/aurora/sofle_v2/rev1', '0xErnie'] is not valid under any of the given schemas

Failed validating 'oneOf' in schema['properties']['build_targets']['items']:
    {'oneOf': [{'$ref': '#/keyboard_keymap_tuple'},
               {'$ref': '#/json_file_path'}]}

On instance['build_targets'][0]:
    ['splitkb/aurora/sofle_v2/rev1', '0xErnie']

Keyboard Used

splitkb/aurora/sofle_v2/rev1

Link to product page (if applicable)

No response

Operating System

WSL

qmk doctor Output

Ψ QMK Doctor is checking your environment.
Ψ CLI version: 1.1.5
Ψ QMK home: /home/kiwicola/qmk_firmware
Ψ Detected Linux (WSL, Ubuntu 22.04.3 LTS).
Ψ Testing userspace candidate: /home/kiwicola/repos/qmk_userspace -- Valid `qmk.json`
Ψ QMK userspace: /home/kiwicola/repos/qmk_userspace
Ψ Userspace enabled: True
Ψ Git branch: master
Ψ Repo version: 0.25.10
Ψ - Latest master: 2024-07-06 18:21:11 +1000 (4fbb395602) -- `ano`: fix layout name (#24067)
Ψ - Latest upstream/master: 2024-07-07 01:58:04 +0200 (67d512e639) -- Fix enter for two ANSI layouts on the TKD Cycle7 (#24070)
Ψ - Latest upstream/develop: None
Ψ - Common ancestor with upstream/master: 2024-07-06 18:21:11 +1000 (4fbb395602) -- `ano`: fix layout name (#24067)
Ψ - Common ancestor with upstream/develop: None
Ψ All dependencies are installed.
Ψ Found arm-none-eabi-gcc version 10.3.1
Ψ Found avr-gcc version 5.4.0
Ψ Found avrdude version 6.3-20171130
Ψ Found dfu-programmer version 0.6.1
Ψ Found dfu-util version 0.9
Ψ Submodules are up to date.
Ψ Submodule status:
Ψ - lib/chibios: 2024-02-17 19:20:06 +0000 --  (be44b3305)
Ψ - lib/chibios-contrib: 2024-04-03 20:39:24 +0800 --  (77cb0a4f)
Ψ - 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)
Ψ QMK is ready to go

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

@tzarc
Copy link
Member

tzarc commented Jul 7, 2024

Keymap names require lowercase characters.

@0xErnie
Copy link
Author

0xErnie commented Jul 7, 2024

The prompt explicetly asks for my github username, which does contain upercase letters.

@noroadsleft
Copy link
Member

This is a relic of sorts from when we allowed user keymaps in the repository. We had a couple instances where a user would have e.g. README.md and readme.md in the same directory, which works fine on Linux but can completely break in Git clones on MacOS or Windows. We requested keymap names to match GitHub usernames because it made maintenance easier for us if we had to edit a user's keymap. (Reading a directory name is easier than checking through the Git history.)

We no longer allow user keymaps in the repository, but the checks from that era are still around in places.

@0xErnie
Copy link
Author

0xErnie commented Jul 7, 2024

The prompt can be found at

Your GitHub Username? """
and
Your GitHub Username? """

I would suggest propose it could be better to just ask for a name without those newlines:

{fg_yellow}Name Your Keymap{style_reset_all} (lowercase only): """
    return question(prompt)

@tzarc
Copy link
Member

tzarc commented Jul 8, 2024

Just for clarity, we're having an internal discussion as to whether or not we relax the lowercase requirement in userspace repositories -- ultimately the owner of the userspace can make their own decisions. Will keep you posted when a decision is made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants