Closed elpiel closed 1 year ago
nb
is considered stable starting with its 1.0
release. Merging this would mean we would depend on a non-stable dependency. See: Rust API guidelines/C-STABLE
There are crates that define unstable
features but I agree that we can go without this PR.
There is still the defmt::Debug2Format
which can be used for such occasions although it's not ideal when the nb
crate does not derive(Format)
.
Thanks anyway.
Just my two cents: I think an unstable optional dependency doesn't violate C-STABLE at all. It doesn't influence users who restrict themselves to stable dependencies in any way. And users of defmt
already live in unstable land so it is fine for them. And of course it would help these users immensely if such a feature is made available.
I think the only question is how to make it obvious that the feature is unstable. Maybe naming the feature flag unstable-defmt
or just leaving a comment about this in Cargo.toml
.
@Rahix Thanks for the feedback. I suggest we discuss this in today's WG meeting.
Ah, unfortunately I won't be able to make it to the meeting today :/ It'd be fine for me if you want to discuss this with the others regardless. I don't have strong feelings about it, just thought it deserves a bit more discussion maybe.
We had a brief discussion at the meeting today and concluded it should be fine to support this, behind a feature name like defmt-0.3
(both to indicate it's unstable, and in case we later want to add support for a future defmt version without removing this one).
@elpiel, would you mind renaming the feature to "defmt-0.3"?
No, I don't have anything against it. Will do it tomorrow. Thanks for the updates!
@adamgreig I've updated the PR.
Sadly, I had to add quotes around the name of the feature as it uses a .
.
I've update the CI workflow + bumped actions/checkout
to v3 and added docs to lib.rs for the unstable feature.
Timed out.
bors.toml
needs updating as well
Done @eldruin
Build succeeded:
A small PR for impl defmt::Format for Error when E also impls defmt::Format