-
Notifications
You must be signed in to change notification settings - Fork 12
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
Restructure config #28
Conversation
- Move account to array of table of accounts - Make icons configurable
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
|
Oh, sorry I wasn't clear — I think we should move to See https://docs.rs/toml/latest/toml/#deserialization-and-serialization for a reference. |
No worries, I tried to stay consistent with the current codebase to get the changes as small as possible, but I will gladly move the deserialization to serde. |
That took longer than I had hoped, but I finally found some time to do the refactor. Not my best work; there is a fair bit of cloning that can be removed by restructuring or reference counting, but I wanted to keep the changes semi in-scope. Feel free to nitpick, but I'm not sure how soon I can get around to fixing everything. Feedback is always welcome. Thanks |
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.
This is looking pretty good! I left a couple of notes. No rush to get to them though :)
Thanks for the detailed feedback, almost all the suggestions have been applied, only the removal of the clones is not really possible I think (see response on review). This could possibly be solved using references, but I'm not sure if that is worth the hassle. |
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.
Looks good to me!
It also looks as though old configuration files should still work just fine with this new setup — if so, we don't even need to do a new major version I don't think?
I don't think that is correct. Where normally, we would define accounts as named tables. It has been replaced with an array of tables called account now. That does remind me of the fact that we should update the README accordingly. I'll try to push a change later today. Considering the support around the tray-icon has changed as well, I think a major bump is due. One final thing to consider is that if you bump the version, do you want to continue to support both the |
Good call! And yes, I think you're right we should then just have |
BREAKING-CHANGE: This removes the legacy option folder. From now on use folders instead.
Yeah, that did not happen 😅 But, I think it should be correct now. |
Perfect, thank you! Release coming shortly 👍 |
This change includes few but notable changes: - A significant upgrade to the `imap` crate. - Significantly updated parsing for buzz config files (#28), which includes support for user-configured icons. - Support for multiple folders (#24). - A complete swap of the library used for tray icons (#25). From a user's perspective, the main change is that config files need to be updated to match the new format. In particular, this means changing `accounts` from a set of named tables to an array of tables, and moving from `folder = "something"` to `folders = ["something"]`. See the README for an updated example config. Big thanks to @DanielVoogsgerd for the changes in this release!
Released as 2.0.0 🎉 |
As promised, a restructured version of the config as mentioned in: #6.
I tried to keep fairly consistent with the current code structure and not refactor too much.
However, I think it might not be the worst idea to refactor at least the configuration parsing, as this is becoming quite unwieldy.
This however will probably suffice for the major version bump. If you like to see any changes or if you have some tips, let me know, those are always welcome.