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

Change From info.json to keyboard.json #24498

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

MyBestFriendMe
Copy link

@MyBestFriendMe MyBestFriendMe commented Oct 17, 2024

Changed as many instances of "info.json" references in the documentation as I could find.

Description

Since the change from info.json to keyboard.json I have been regularly confused because I am an ADHD nerd. I figured some updates here would help newcomers as well.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Copy link
Member

@waffle87 waffle87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing is, info.json is still very much so valid and the same content can live in both info.json and keyboard.json. keyboard.json is just a build marker for a valid keyboard to compile. For example:

sample_keyboard
├── info.json
├── keymaps
│   └── default
├── rev1
│   └── keyboard.json
└── rev2
    └── keyboard.json

Here, building sample_keyboard (qmk compile -kb sample_keyboard -km default) is not valid, and requires the user to specify a version to use, that's why there is no keyboard.json at the top level keyboard directory.

What would be preferable is adding notes explaining what keyboard.json's purpose is and how it's different from info.json.

@MyBestFriendMe
Copy link
Author

Okay, I see what you did there. Are there any real examples of this in the codebase? I generally cannot get my code to compile without renaming all of my instances of info.json (can definitely be a skill issue).

@waffle87
Copy link
Member

waffle87 commented Oct 17, 2024

An example would be boardsource/microdox. Where info.json contains shared data that's applicable to all revisions, while the v*/keyboard.json files contain data specific to that keyboard revision.

If you're having trouble compiling firmware, I would suggest you join the QMK Discord and we are happy to help you there. But in general, you need a valid build marker in your keyboard directory (ie. a rules.mk file or keyboard.json file). An info.json file by itself is not one.

@MyBestFriendMe
Copy link
Author

No, this is perfect! Thank you!
I will update the documentation to include this so that it is more clear. With keyboard.json being the endpoint for revisions, shouldn't the directory in the documentation be named and referenced primarily as 'keyboard.json' and then reference 'info.json' as a possible parent configuration?

added context based on changelog 20240526.
@MyBestFriendMe
Copy link
Author

The latest commit contains the proper changes to fully replace most instances of info.json but now includes context for what it is still used for including examples and updates to reflect accurate information. (the clueboard example was outdated in 'reference_info_json.md')

MyBestFriendMe and others added 2 commits October 17, 2024 14:29
@drashna drashna requested review from fauxpark, zvecr and a team October 25, 2024 03:00
Copy link

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@github-actions github-actions bot added the stale Issues or pull requests that have become inactive without resolution. label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation stale Issues or pull requests that have become inactive without resolution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants