swift-bundler icon indicating copy to clipboard operation
swift-bundler copied to clipboard

Config improvements (tracking issue)

Open stackotter opened this issue 2 months ago • 0 comments

This is a top-level tracking issue for various config improvements I plan on making.

  • [ ] 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 avatar Oct 21 '25 03:10 stackotter