-
Notifications
You must be signed in to change notification settings - Fork 375
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
fix: load config defaults if not specified in existing config #1544
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1544 +/- ##
==========================================
- Coverage 55.95% 55.92% -0.04%
==========================================
Files 435 435
Lines 66306 66612 +306
==========================================
+ Hits 37101 37252 +151
- Misses 26303 26460 +157
+ Partials 2902 2900 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please go ahead and resolve&merge after addressing 👍
…nolang#1544) ## Description This PR fixes the flow of loading Gno configuration files. Previously, configuration files were loaded without applying default values, causing to funky behavior. Additionally, this PR drops the config TOML template, instead relying on the TOML package itself to marshal. Issue spotted in gnolang#1238 Note: I've tried to keep the original functionality of `LoadOrMakeConfigWithOptions`, because if this is changed or broken up in its current state, things start breaking across dimensions. Funky behavior that's fixed: The `EventStore` fields were not being saved in the original config (since we utilized a template for it, and this was not present in the template). Now, config files should properly save on disk the event store configuration. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
Description
This PR fixes the flow of loading Gno configuration files.
Previously, configuration files were loaded without applying default values, causing to funky behavior.
Additionally, this PR drops the config TOML template, instead relying on the TOML package itself to marshal.
Issue spotted in #1238
Note:
I've tried to keep the original functionality of
LoadOrMakeConfigWithOptions
, because if this is changed or broken up in its current state, things start breaking across dimensions.Funky behavior that's fixed:
The
EventStore
fields were not being saved in the original config (since we utilized a template for it, and this was not present in the template). Now, config files should properly save on disk the event store configuration.Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description