Skip to content

Conversation

@mikee47
Copy link
Owner

@mikee47 mikee47 commented Feb 6, 2026

As suggested in #89 this PR changes the build logic to detect when a schema has changed due to build variables.

Input .cfgdb schema is parsed and expressions evaluated. This schema is written as a .json file to out/Esp8266/debug/ConfigDB/schema.
Now, this is done as a pre-parsing stage and the .json is only updated if it is different to the existing one. This is managed by a new --preprocess flag for dbgen.py.
Standard make logic then detects the new files(s) and does a full rebuild.

Additional changes:

  • Add support for conditional selection using dictionary values
  • Revert output directory to out/ConfigDB

@mikee47 mikee47 marked this pull request as draft February 6, 2026 15:44
@mikee47 mikee47 marked this pull request as ready for review February 6, 2026 15:45
@mikee47 mikee47 force-pushed the feature/conditional-rebuild branch 3 times, most recently from eb3227f to 88f29b7 Compare February 7, 2026 20:07
@mikee47
Copy link
Owner Author

mikee47 commented Feb 7, 2026

makes me wonder if the DSL needs a switch statement)

I've added a commit with a suggested way to handle a switch/choose using a dict. The first key which evaluates True is chosen.

    "TestMode": {
      "type": "string",
      "ctype": "Color",
      "@enum": {
        "SMING_RELEASE": [
          "silent",
          "error"
        ],
        "1": [
          "silent",
          "error",
          "debug",
          "info"
        ]
      }
    }

@mikee47 mikee47 force-pushed the feature/conditional-rebuild branch from 92dc604 to 7160d3a Compare February 7, 2026 20:21
@mikee47 mikee47 force-pushed the feature/conditional-rebuild branch from 9da2270 to f239588 Compare February 8, 2026 12:08
@mikee47 mikee47 merged commit 7125474 into develop Feb 8, 2026
18 checks passed
@mikee47 mikee47 deleted the feature/conditional-rebuild branch February 8, 2026 12:28
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.

1 participant