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

hal: add optional defmt support. #450

Merged
merged 3 commits into from
Aug 7, 2023
Merged

hal: add optional defmt support. #450

merged 3 commits into from
Aug 7, 2023

Conversation

Dirbaio
Copy link
Member

@Dirbaio Dirbaio commented Apr 21, 2023

No description provided.

@burrbull
Copy link
Member

Defmt is known by its unstability. Is it good idea to depends on it?

@ryankurte
Copy link
Contributor

Defmt is known by its unstability. Is it good idea to depends on it?

fair point, i think it is still useful to have / we'll just have to keep it up to date

@eldruin
Copy link
Member

eldruin commented Apr 24, 2023

How about naming the feature defmt-0-3 to make the stability status of the defmt dependency clear as well as to potentially support other versions like in nb?
It should be noted that this would be the only < 1.0 dependency embedded-hal-bus would have once embedded-hal 1.0 is out.

@Dirbaio Dirbaio marked this pull request as draft July 15, 2023 16:29
@jannic
Copy link
Contributor

jannic commented Jul 31, 2023

Related issue: #460

Making the enums (optionally) derive defmt::Format would be useful for crates using those enums in their structs.
(e.g. rp-rs/rp-hal#654 (comment)). But I agree we have to be cautious regarding the stability of defmt.

@Dirbaio Dirbaio changed the title bus: impl defmt::Format for DeviceError. hal: add optional defmt support. Aug 6, 2023
@Dirbaio
Copy link
Member Author

Dirbaio commented Aug 6, 2023

  • Changed PR to add defmt support everywhere, not just -bus. (adds derive(defmt::Format) to all enums and structs in embedded-hal{,-async,-bus}.
  • Changed feature name to defmt-03
  • Added some CI fixes
    • We weren't actually testing all feature combinations because include makes no sense.
    • remove testing for thumbv6, leave only thumbv7. We don't have any hardware-dependent stuff, this reduces job spam a bit.

@Dirbaio Dirbaio marked this pull request as ready for review August 6, 2023 16:58
@Dirbaio Dirbaio force-pushed the bus-defmt branch 3 times, most recently from 04f1f5c to d749ef0 Compare August 6, 2023 18:47
the GHA `include` field is nonsense.
We have 16 jobs now, starts to hit the GHA free limit of 20. There's no
advantage in testing thumbv6 and thumbv7 because they're almost identical
and nothing in e-h depends on them, so remove thumbv6.
Copy link
Contributor

@ryankurte ryankurte left a comment

Choose a reason for hiding this comment

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

the expected amount of cursed i think but lgtm!

(if we do end up with more defmt versions / features maybe we can split the selection and enabling flags but it's pretty moot for now)

@Dirbaio Dirbaio added this pull request to the merge queue Aug 7, 2023
Merged via the queue into master with commit bf2b8a1 Aug 7, 2023
24 checks passed
@eldruin eldruin deleted the bus-defmt branch August 7, 2023 15: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.

None yet

5 participants