-
Notifications
You must be signed in to change notification settings - Fork 9
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
Allow attributes in macro invocations #22
base: master
Are you sure you want to change the base?
Conversation
Allows `#[cfg]` to be used to make certain definitions conditional. Such as for library version feature flags.
There is still a "local ambiguity when calling macro `external_library`" error. That appears to be a real bug.
Currently fails at macro expansion due to existing issue.
Added some testing improvements. I see some issues trying to test I don't think those block this from being merged and released. Though a semver breaking version of the crate will probably be needed at some point to fix those. |
@@ -9,6 +9,7 @@ exclude = ["/dlib-test", "README.tpl"] | |||
readme = "README.md" | |||
keywords = ["dylib", "dlopen"] | |||
categories = ["api-bindings"] | |||
edition = "2021" |
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.
Is this specifically needed for this change?
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.
It shouldn't be necessary, no. It just seems a bit unusual at this point for a crate to be using the default edition.
I don't think there's any need to support Rust versions too old for the 2021 edition at this point.
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.
In that case, could you also update the CI accordingly? It's currently failing because of that change.
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've updated CI to the first version of Rust that supports the 2021 edition.
Just to confirm, have you tested that this changes actually makes it possible to add a feature flag to Smithay/wayland-rs#735 ? |
Yes. Simply adding |
Allows
#[cfg]
to be used to make certain definitions conditional. Such as for library version feature flags.Needed for Smithay/wayland-rs#735 so it can have a feature flag for the libwayland version.
Seems to work, but still needs to be added to
dlib-test
, with CI to test with and without the feature.