-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
[Feature] Compilation warning if both keymap.json
and keymap.c
exist
#19939
Conversation
Dumb bot remove the tag... I've updated to remove the However, this made me realize that my changes will pull |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine.
If this is # Load the keymap-level rules.mk if exists
-include $(KEYMAP_PATH)/rules.mk |
Oh yeah, i definitely overlooked at it, and didnt research further. As i said before, im about as noob as you can be with makefile.... But it is a bit confusing because the JSON keymaps include later on, while the C ones do that when checking the path: ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_1)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) vs ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","")
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json
KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_5) Perhaps one of them could be changed for consistency PD: JSON checks 5 >> 1, while C does 1 >> 5, not sure if that could also be changed, maybe breaks some hierarchy? |
Its done later, as the searching is skipped when running |
@elpekenin was zvecr's query handled? |
Im not sure what im supposed to change, to be honest... If both files (c and json) exist, Perhaps you are refering to the consistency i asked about... Given my lack of knowledge of the |
Thank you for your contribution! |
Thank you for your contribution! |
…ist (qmk#19939) Co-authored-by: Nick Brassel <nick@tzarc.org>
…ist (qmk#19939) Co-authored-by: Nick Brassel <nick@tzarc.org>
…ist (qmk#19939) Co-authored-by: Nick Brassel <nick@tzarc.org>
…ist (qmk#19939) Co-authored-by: Nick Brassel <nick@tzarc.org>
Description
Small changes so that we look for both files, instead of not searching for C file when JSON exists.
With this information we can check if both were found to throw a warning, and then procede to compile JSON.
This prevents people(aka happened to me a few weeks ago) from going insane if working on a folder where
json2c
has been used and JSON hasn't been deleted.Tested:
Types of Changes
Issues Fixed or Closed by This PR
Checklist