bugwarrior icon indicating copy to clipboard operation
bugwarrior copied to clipboard

Consider simplifying ini config parsing

Open Lotram opened this issue 1 month ago • 8 comments

I started working on static config models. While doing that, I added some tests on the load.parse_file function. I then realized that all the parsing done in ini2toml_plugin is not used when parsing a ini file (except for the ini2toml command).

I see 2 problems with that:

  • The result of parse_file is quite different, depending on the input file (toml vs ini)
  • The ini parsing logic is duplicated between parse_file and ini2toml_plugin, with different results

Can't we simplify this ? We could either

  • add ini2toml to required dependencies and always use it when parsing an ini file (we could even write the toml file ourselves ? )
  • keep it as optional, but force the user to install it if they want to keep an ini file (or suggest to run it once to use a toml file instead)
  • same, but always raising an error when trying to parse an ini file, and ask the user to migrate to toml file, using the ini2toml command

I know those solutions are drastic, and we probably want to deprecate it first, but I think we should avoid having multiple ways to parse a config file, and multiple results.

Lotram avatar Jan 06 '26 17:01 Lotram