You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As my current project ramps up from tiny to small, I am looking for a more power config system. I see others with similar concerns. #3788#4462#3952#4451
As I see it, the current model is override (or replace). Simply put, if a duplicate key is found the last one loaded wins and replaces all the options. The other issues and feature requests are looking for a merge option which combines other entries found.
To illustrate, consider the case of our code running in 2 modes: staging and production, and on 2 boards: esp32_s2 and esp32_s3. These two each have configs. And these configs makes sense across all combinations.
Currently extending directly via extends or indirectly via [env: prefix overrides values. So we have to currently include all previous flags by referencing them on a per-key basis
Hopefully my contrived example accurately illustrates the current status quo.
Proposal
I propose adding a an option that operates like extends, but it merges instead of overrides. For now, lets call this extend_merge (but we can call it whatever). In this case, we'd still have the first part.
In my little contrived case, the lines of code saved are minimal. But it is easy to imagine a case where the number of keys set in staging is 6-10, and then we'd save all those other lines.
The text was updated successfully, but these errors were encountered:
Background
As my current project ramps up from tiny to small, I am looking for a more power config system. I see others with similar concerns. #3788 #4462 #3952 #4451
As I see it, the current model is override (or replace). Simply put, if a duplicate key is found the last one loaded wins and replaces all the options. The other issues and feature requests are looking for a merge option which combines other entries found.
To illustrate, consider the case of our code running in 2 modes:
staging
andproduction
, and on 2 boards:esp32_s2
andesp32_s3
. These two each have configs. And these configs makes sense across all combinations.Current
Currently extending directly via
extends
or indirectly via[env:
prefix overrides values. So we have to currently include all previous flags by referencing them on a per-key basisHopefully my contrived example accurately illustrates the current status quo.
Proposal
I propose adding a an option that operates like
extends
, but it merges instead of overrides. For now, lets call thisextend_merge
(but we can call it whatever). In this case, we'd still have the first part.But then the 2nd part would reference this directly without knowing the keys:
In my little contrived case, the lines of code saved are minimal. But it is easy to imagine a case where the number of keys set in
staging
is 6-10, and then we'd save all those other lines.The text was updated successfully, but these errors were encountered: