Skip to content
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

Add paths to types in server and service macros #254

Merged

Conversation

petekubiak
Copy link
Collaborator

gatt_server and gatt_service proc macros can now be used without having to add use trouble_host::prelude::*

Closes #245 .

@petekubiak
Copy link
Collaborator Author

/test

Copy link
Member

@lulf lulf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I think another improvement would be to use '::trouble_host::...(with the::` prefix), which ensures that it will not be confused if someone adds a mod trouble_host{} in their project.

But I think that's highly unlikely :)

@lulf lulf merged commit 0d179c7 into embassy-rs:main Jan 20, 2025
3 checks passed
@ivmarkov
Copy link
Contributor

Keep in mind that the current approach does not support crate renaming.

@ivmarkov
Copy link
Contributor

We use this guy in rs-matter: https://docs.rs/proc-macro-crate/latest/proc_macro_crate/

@petekubiak petekubiak deleted the remove-proc-macro-dependency-on-prelude branch January 20, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proc-macros do not work unless I explicitly import some stuff (as in the trouble prelude)
3 participants