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

Use the more naive crate name to support renaming #835

Merged
merged 2 commits into from
May 14, 2024

Conversation

diondokter
Copy link
Contributor

Fixes #834

::defmt points to the crate called defmt. This is nice to use because it avoids bad renames. One example I saw was use mini_serde as serde.

However, people have started renaming the crate in their own crates. Notably, embedded-hal does this which renames it defmt-03.
With the inclusion of defmt in these kinds of foundational crates, they will want to be able to support multiple defmt versions at the same time and they kinda need the renaming. (I don't see another way to do it)

Previously before #800 this all worked, but this PR changed it from defmt to ::defmt which breaks code. (And defmt released this as a minor update, so everyone who does cargo update will get this).

This PR simply reverts that.
Also note that ::defmt isn't even used everywhere. It was a mix. With this PR it's all the same (as far as I can see).

@diondokter diondokter marked this pull request as ready for review May 13, 2024 21:35
@diondokter
Copy link
Contributor Author

Btw, I suggest merging this an immediately publishing it as version 0.3.8 since the last version breaks a lot of codebases. Some of them will be trivial to fix, but others not.

@Urhengulas
Copy link
Member

@diondokter do you think we should yank 0.3.7?

@Urhengulas Urhengulas added this pull request to the merge queue May 14, 2024
@diondokter
Copy link
Contributor Author

@diondokter do you think we should yank 0.3.7?

Probably yes. It is breaking peoples builds, but not all builds. It's not necessarily your fault, but only your yank will fix it sadly

Merged via the queue into knurling-rs:main with commit ca0f32e May 14, 2024
15 checks passed
@Urhengulas
Copy link
Member

@diondokter I've released defmt-macros v0.3.9 and yanked v0.3.8. Can you test if that un-breaks the builds?

@diondokter diondokter deleted the crate-renamed-support branch May 14, 2024 13:31
@diondokter
Copy link
Contributor Author

@Urhengulas seems to compile on my end!
Thanks for the fast response :)

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.

defmt 0.3.7 breaks embedded-hal with the defmt-03 feature flag
2 participants