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

Configuration cleanup #1893

Merged
merged 16 commits into from
Jan 10, 2025
Merged

Configuration cleanup #1893

merged 16 commits into from
Jan 10, 2025

Conversation

CendioOssman
Copy link
Member

This cleans up some code, but the primary feature is that the man pages and --help are easier to read.

This should have been cleaned up in adaedc9.
The configuration objects already now how to convert themselves to and
from strings. Use that existing code, rather than poorly duplicate it.
All parameters can be converted to and from strings, so this is a
reasonable default for most settings. We don't need to bail out for
complex types.
This allows smooth upgrades for users if the defaults change in the
future.
We don't consistently use these, so they are just confusing.

Instead, we rely on the linker to not include unnecessary objects, and
hence irrelevant configuration objects.
Avoid rolling our own linked list when we have the standard library.
Now that we are based on a normal std::list, we can use normal iterators
to go through the parameters.
This is a "parameter", not an "option", so let's make sure it's in the
correct section.
The latter is the legacy alias, so prefer the former in the
documentation.
Makes it much easier to find all the different options.
It's possible to configure multiple loggers with different settings.
This was properly described in the --help output, but not the man pages.
@CendioOssman CendioOssman requested a review from samhed January 7, 2025 21:38
This is more in line with our other tools, and keeps all the X options
together in the usage output.
This is a lot more readable than "0"/"1", which can easily be confused
with integer parameters.

Note that this breaks some backwards compatibility. Older clients will
not be able to parse configuration files generated by newer clients, as
they had a bug where they could only understand "0" and "1".
@CendioOssman CendioOssman merged commit 87a2e83 into TigerVNC:master Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant