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

Convert userprefs to a json file instead of header file which has to be included everywhere #5471

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

Conversation

thebentern
Copy link
Contributor

For your consideration is a change to the userPrefs scheme which has a more strategic direction for ad-hoc agent builds. One of the main goals of userPrefs was to enable ad-hoc builds with custom default values. However, boxing this into a header file was always limiting from a web app consumer perspective.

In the past I attempted to bridge this gap by using clang to generate a manifest of the userprefs into a json file which we would then later attempt to tokenize and replace values from user input. That approach was problematic and still had the issue of macros not being defined unless the userPrefs header was included in every single file that required use of them.

This new json based approach ensures availability globally by injecting them as build flags in our custom PIO script, still allows proper macro expansion, and will make consuming in an automated build application much simpler.

image

@panaceya
Copy link
Contributor

Nice description, but it's not clear how to use it. Please provide more examples.

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

Successfully merging this pull request may close these issues.

2 participants