-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Conf
macro improvements
#7150
Conf
macro improvements
#7150
Conversation
r? @llogiq (rust-highfive has picked a reviewer for you, use r? to override) |
Thank you, that is a solid improvement! @bors r+ |
📌 Commit 1e22e56 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
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 broke the documentation generation script. The script works with regexes. I assume the change from ,
to =
is the problem here. See commit 0ae8be3
Also cc @xFrednet making you aware that the conf macro changed a bit, since I think you already have started / finished work on this for the metadata collection monster.
Yup, my implementation will be slightly effected by this change, but still very manageable. The ping was definitely good! <3 @camsteffen Could you also adapt the documentation with the new configuration syntax. I think the only effected area should be this: Adding configuration to a lint |
Whoops. Yes I can fix those two things. |
@camsteffen When working on the documentation, I recommend using |
`Conf` macro improvements part 2 changelog: none Follow-up to #7150 I made the default value required again for `define_Conf!` so that it can be parsed by the magic Python. I guess it's just as well for readability. r? `@flip1995`
changelog: Allow
default_trait_access
in macrosMainly this is a change to use serde as in Manually implementing Deserialize for a struct, which opens the door for a cleaner implementation overall.
default_trait_access
in macros (tangential, but used in this PR)TryConf { conf, errors }
instead of using a globalERRORS
variable.define_Conf!
macro(name, "name", ..)
#[conf_deprecated(message)]
. Message shows in error.Default::default()
if omitted.impl Default for Conf
(notoml::from_str("")
)