Skip to content

Conversation

Siprj
Copy link

@Siprj Siprj commented Oct 21, 2025

Fix the need for an empty [settings] section in the config.toml to get default values for the whole section.

This was caused by inconsistency in default instance and serde instances for the SettingsModuleConfig data structure.

Closes #291

@github-actions github-actions bot added the bug Something isn't working label Oct 21, 2025
@Siprj
Copy link
Author

Siprj commented Oct 21, 2025

Actually, when I'm thinking about it. Maybe it is worth rewriting all the types in the config module to have consistent default implementations to the serde derivations. Also, it would help with reducing the amount of small functions that just return a single value.

If there is interest in this change. I'm willing to do it. The question then would be if it should be part of this PR or part of some refactoring PR.

@MalpenZibo
Copy link
Owner

It's a good idea 👌 . We can do it in this PR or in different PRs.

From my point of view, there's no difference.

@Siprj Siprj changed the title Fix the need for empty [settings] section to get default configuration fix(config) Make Default and Deserialize more in sync Oct 22, 2025
Fix the need for empty [settings] section in the `config.toml` to get
default values for the whole section.

This was caused by inconsistency in default instance and serde instances
for the `SettingsModuleConfig` data structure. This PR helps to reduce
the chance of it ever happening again.
@Siprj
Copy link
Author

Siprj commented Oct 22, 2025

Ok, I added the discussed refactoring. I think it is ready to be reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Shutdown/reboot/suspend/logout buttons do nothing

2 participants