-
-
Notifications
You must be signed in to change notification settings - Fork 37.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
Userspace: add support for adding environment variables during build #22887
base: master
Are you sure you want to change the base?
Conversation
Thanks for this change! I tested it out with my userspace, and here are my findings:
Thanks again for the help so far! Let me know if there's more testing I can do. :) |
Thanks for that -- the testing I'd done was with Can I get you to attach |
Sure, attached (and renamed to make GitHub happy): parallel_kb_builds.mk.txt If I'm reading this correctly, What's interesting is that compiling with |
That would be my assumption.
Chaining the context through would be possible, but messy (as that function is also used in other places or can come directly from the environment). |
Random side note: Without understanding the underlying implementation details, as a user I feel like it would be nice if layouts were more a "first class" concept in keymap selection. Being able to just say (Though maybe that doesn't make sense, because someone might have two keyboards with the same layout but still want to configure them differently, and build the whole shebang via userspace infra. So actually, on further thought, maybe the environment variables are better after all, even if they're more verbose.) |
Is the usage of nested arrays in the JSON representation for the environment variables intentional? I would expect an object there instead: [
"ai03/polaris",
"bcat",
{
"FORCE_LAYOUT": "60_tsangan_hhkb"
}
] (Maybe even the outer level should be an object with keys like |
Tomato/tomato. Will swap it over, it's of no real consequence. |
… change `$(TARGET)`.
@bcat any luck on confirmation? |
Sorry for the long delay! Yes, I've flashed the firmware files built with this PR and they seem correct to me. Thanks again! |
Thanks mate. Needs some cleanup before it's good to go, will see if can get it sorted over the next week or so. |
Thank you for your contribution! |
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.
__attribute__((weak))
✅
Tested locally and didn't seem to break anything.
Description
A few complaints on Discord and the like for not being able to specify things like
CONVERT_TO
andFORCE_LAYOUT
when using userspace.This adds support for the usual
-e
/--env
parameters toqmk userspace-add
andqmk userspace-remove
, and ensures such extra environment variables are propagated across to each build.Userspace repo version is bumped to
1.1
as a result of the addition to the file format.Types of Changes
FIxes
qmk.json
foruserspace-compile
and GitHub Actions #22850qmk compile
#22590Checklist