Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor configuration file loading #1282

Closed
4 of 6 tasks
christianparpart opened this issue Oct 16, 2023 · 2 comments
Closed
4 of 6 tasks

Refactor configuration file loading #1282

christianparpart opened this issue Oct 16, 2023 · 2 comments
Labels
frontend Contour Terminal Emulator (GUI frontend) website Website content or related
Milestone

Comments

@christianparpart
Copy link
Member

christianparpart commented Oct 16, 2023

The current way of loading the config file has been incrementally growing, and thus, also its technical debt. It's time to clean the last(?) dark corner of the source code up.

Main design goals

  • enable the user to have a minimal configuration file (all values should be defaulting)
  • easily maintainable config file syntax (stick with yaml for now?, later toml/...?)
  • allow generating website-documentation out of the config file's key definitions
  • allow easy upgrading, possible auto-updating config entries, if necessary/possible
  • allow auto-constructing a full non-defaulting config file template
  • integrate auto-generated website into ghpages CI hook

Config file syntax

At first I think it should remain YAML, but i'm not hard-lining here.
Later on the following come into my mind, iff it turns out to be an all-inclusive upgrade:

  • YAML: stick with it, known already, but some might not like forced indentation
  • TOML: looks like a mix of yaml and ini, so not too alienating, but easy to understand
  • LUA: do we really want to go for a more dynamic config language to be more powerful?
@christianparpart christianparpart added frontend Contour Terminal Emulator (GUI frontend) website Website content or related labels Oct 16, 2023
@Yaraslaut Yaraslaut added this to the 2023-1 milestone Oct 16, 2023
@christianparpart christianparpart modified the milestones: 2023-1, 2024-1 Jan 1, 2024
@Yaraslaut
Copy link
Member

Info about missing entries implemented in #1585
At the moment, we do not upgrade user config file to preserve comments and if implemented in simplest way upgrade will cause user profiles to specify all values while we allow to set specific values in the profile. Implementation of complete upgrade will require some time and can be done in the future

@Yaraslaut
Copy link
Member

At the moment config loading let easily add config entries and we can generate default config and missing entries from executable, extending to other formats will lead to copy of read/write logic and can be postpones until reflection will appear in c++ (hopefully 26)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Contour Terminal Emulator (GUI frontend) website Website content or related
Projects
None yet
Development

No branches or pull requests

2 participants