Arnau478 / hevi

Hex viewer
https://arnau478.github.io/hevi/
GNU General Public License v3.0
56 stars 2 forks source link

Add support for multiple config file formats #28

Closed Reokodoku closed 2 months ago

Reokodoku commented 2 months ago

This commit adds support for multiple configuration file formats in anticipation of the implementation of a .zon config file.

With this system we can support .json config files when we replace them with zon ones (for backward compatibility).

Arnau478 commented 2 months ago

Apart from back-compatibility, are there any other advantages? I feel like this adds an unnecessary layer of abstraction and modularity that will just make the codebase worse. Will there ever be two valid config file formats?

Reokodoku commented 2 months ago

The advantage is that (in theory) it will be easier to support zon files, because perhaps the configuration parser will become more complex and therefore making more abstractions will make our future work easier.

Will there ever be two valid config file formats?

Yes if we do backward compatibility, because we will have to support zon and json config files.

Arnau478 commented 2 months ago

I'm sorry, but I don't believe in eternal back-compatibility. We would end up having a modular design but it would only be beneficial to the codebase during a transition period. Also, hevi is not 1.0 yet for a reason: breaking changes can happen and users should be prepared.