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
Server TOML config template can get out of sync with config.go #20097
Comments
Yes 100% agree, we are going to use struct annotations and |
Could you please point me where you see a missing field between the config.go and the toml.go? I cannot find any. |
I don't see any missing fields, but I do see bugs:
|
Right, I see. We could fix those inconsistencies indeed regarding the comments. |
Is there an existing issue for this?
What happened?
server/config/toml.go includes contents that are similar to those of server/config/config.go, but any synchronization between the two locations is manual so there are undesirable differences (and some undesirable similarities, such as using the CamelCase Go names to comment on TOML settings like
halt-height
).To remedy this, I would recommend programmatically deriving the TOML template from the Go config structs and their doc comments in a build step. Here's a proof of concept that parses Go source text and emits TOML template text: https://go.dev/play/p/W74nda-DQKZ
Cosmos SDK Version
main
How to reproduce?
No response
The text was updated successfully, but these errors were encountered: