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 impls for the Defmt logging crate #1632

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BenFordTytherington
Copy link

  • Add impls for the main structs where it is obvious how to do so
  • Gate this behind a new cargo feature called "defmt"

- Add impls for the main structs where it is obvious how to do so
- Gate this behind a new cargo feature called "defmt"
@djc
Copy link
Member

djc commented Dec 2, 2024

I am not excited about adding these. Unfortunately coherence is a bit of a challenge especially in cases like these where (a) neither crate is clearly more "high-level" than the other and (b) neither crate has a stable (1.0+) API. At the very least, I think we'd want this to be a defmt-03 feature.

@BenFordTytherington
Copy link
Author

From Defmts perspective, implementing the trait here is a better solution due to being able to access all the private fields. Additionally, defmt 1.0 is planned to be released early next year, with hopefully no breaking changes compared to the current version.

@djc
Copy link
Member

djc commented Dec 2, 2024

From Defmts perspective, implementing the trait here is a better solution due to being able to access all the private fields. Additionally, defmt 1.0 is planned to be released early next year, with hopefully no breaking changes compared to the current version.

Well, if that's the case I'm going to want to hold off until defmt 1 has been released.

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.

2 participants