-
-
Notifications
You must be signed in to change notification settings - Fork 137
➖ remove pro-macro-crate (#1365)
#1590
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
base: main
Are you sure you want to change the base?
Conversation
zvariant_derive/src/utils.rs
Outdated
| pub fn zvariant_path() -> TokenStream { | ||
| if let Ok(FoundCrate::Name(name)) = crate_name("zvariant") { | ||
| let ident = format_ident!("{}", name); | ||
| pub fn zvariant_path(crate_path: Option<&str>) -> TokenStream { |
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.
but nothing passes Some to this? 🤔
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.
I think I was thinking ahead to potentially adding the crate attribute. For now I just took the param out. Thanks for catching that
Yeah, that's the idea.
Correct and I think we should add the
Thanks! |
CodSpeed Performance ReportMerging #1590 will not alter performanceComparing Summary
|
27cdd13 to
d6c6bc7
Compare
Any chance you could add that? We can already merge and advertise that in the docs then. Best to do that in a separate PR and then rebase this one on top of main when that's merged. |
Allows users to specify custom crate paths via the `krate` attribute when they have renamed zbus/zvariant in Cargo.toml. As discussed in z-galaxy#1590
Allows users to specify custom crate paths via the `krate` attribute when they have renamed zbus/zvariant in Cargo.toml. As discussed in z-galaxy#1590
Allows users to specify custom crate paths via the `krate` attribute when they have renamed zbus/zvariant in Cargo.toml. As discussed in z-galaxy#1590
Updates `def_attrs!` macro to support `crate` attribute, allowing users to specify custom crate paths when zbus/zvariant are renamed. Users write: #[derive(Type, crate = "...")] Devs access: attrs.crate_path As discussed in z-galaxy#1590
|
Accidentally deleted this branch on my fork. |
closes #1365
If I understood this issue correctly, I think this should cleanly drop the crate. The path functions now simply return the default
::zvariant/::zbuspaths. Users who rename the crate will need to use the original name or a future crate attribute could be added if needed.If you had something else in mind I'm happy to amend.
P.s. I love the work you've all done.
zbusis awesome!