Skip to content

Conversation

stackotter
Copy link
Owner

Completed

  • Introduced macros to handle tedious overlay merging, config validation and config flattening. The macro code is more complicated than the corresponding overlay and flattening boilerplate code, but it makes it really simple to add new properties, rename properties, add new validations, introduce a new type with overlays, etc.

Planned

  • Add platform-specific configuration parameters to their corresponding top-level configuration types and catch catch their presence during validation so that we can throw a nice descriptive error rather than Codable's 'encountered unexpected key' error. Currently they are only present in the configuration type's overlay type rather than the top-level type itself.
  • Suggest similar configuration keys when it's possible that the user has typoed a configuration key
  • Introduce interactive commands for editing configuration files. This will probably require adding trivia preservation support to toml++ and may be better suited in a separate PR.
  • Centralise migration-related code to simplify regular configuration-related code.
  • Document configuration macros for contributors
  • Document configuration format for users
  • Make generic enum parser so that we don't need to use swift-parsing all over the place. By enum parsing I'm referring to parsing config syntax such as "platform(macOS)".
  • Maybe include line numbers along with config errors where possible?

@stackotter stackotter added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 12, 2025
@stackotter stackotter force-pushed the config_improvements branch from 036b036 to 4a84c1d Compare August 12, 2025 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant