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

Should individual toml config file fields be optional? #117

Open
5tefan opened this issue Nov 19, 2021 · 4 comments
Open

Should individual toml config file fields be optional? #117

5tefan opened this issue Nov 19, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@5tefan
Copy link
Contributor

5tefan commented Nov 19, 2021

In experimenting with the tv.toml config file, it seems to fail to parse and take effect if only some options are present. They must all be present. This was a bit confusing at first!

I think making each field in tv.toml optional would improve the user experience and make the tool more powerful/flexible.

@alexhallam
Copy link
Owner

That makes a lot of sense. I agree, optional config parameters should be available to users.

@zhengpd
Copy link

zhengpd commented Apr 4, 2022

@alexhallam Thanks for the pretty tv tool. Optional config would be good. Or it should be mentioned that "all options must be present in tv.toml" in README. I really didn't know why my 3 lines tv.toml never work (only wanted to change colors), until seeing this issue.

They must all be present.

Thanks @5tefan for the tip.

@alexhallam
Copy link
Owner

Okay, I will get working on this. Thanks for using the tool and contributing issues and suggestions for improvements.

@alexhallam
Copy link
Owner

alexhallam commented Apr 23, 2022

Hi guys. I took another try at this, but did not have success. I just added a comment to the readme. #126 . I am going to leave a reproducible example from the Rust Playground here for anyone to try to tackle.

Here is how to run the rust playground example. The example works as is, but if you add a comment # in front of one of the fields defined in file_contents such as extend_rows you will see that the config returns None. A working example would return a config, but with the one field that is missing not defined.

@alexhallam alexhallam added the bug Something isn't working label Jul 22, 2022
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

No branches or pull requests

3 participants