Skip to content

Commit

Permalink
🔧 config.ini / JSON dump by @section (#26556)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored Dec 21, 2023
1 parent 738584d commit eeacf76
Show file tree
Hide file tree
Showing 2 changed files with 278 additions and 118 deletions.
21 changes: 20 additions & 1 deletion buildroot/share/PlatformIO/scripts/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,26 @@ def load_boards():
return ''

#
# Extract a schema from the current configuration files
# Extract the current configuration files in the form of a structured schema.
# Contains the full schema for the configuration files, not just the enabled options,
# Contains the current values of the options, not just data structure, so "schema" is a slight misnomer.
#
# The returned object is a nested dictionary with the following indexing:
#
# - schema[filekey][section][define_name] = define_info
#
# Where the define_info contains the following keyed fields:
# - section = The @section the define is in
# - name = The name of the define
# - enabled = True if the define is enabled (not commented out)
# - line = The line number of the define
# - sid = A serial ID for the define
# - value = The value of the define, if it has one
# - type = The type of the define, if it has one
# - requires = The conditions that must be met for the define to be enabled
# - comment = The comment for the define, if it has one
# - units = The units for the define, if it has one
# - options = The options for the define, if it has one
#
def extract():
# Load board names from boards.h
Expand Down
Loading

1 comment on commit eeacf76

@plampix
Copy link
Contributor

@plampix plampix commented on eeacf76 Dec 24, 2023

Choose a reason for hiding this comment

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

The unlink on line 396 of signature.py breaks building Marlin on older linux distrubutions with older python versions/libs likes Debian 10 (Python 3.7.3) when CONFIG_EXPORT is enabled.

I'm fine with that, as I never actually used that feature, but if it can be done in a backwards compatible way, that would be nice.

Please sign in to comment.