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

Update to embedded-hal 1.0 where possible #136

Merged
merged 2 commits into from
Apr 15, 2024
Merged

Update to embedded-hal 1.0 where possible #136

merged 2 commits into from
Apr 15, 2024

Conversation

qwandor
Copy link
Member

@qwandor qwandor commented Apr 9, 2024

0.2 is still used for I2C for now.

Comment on lines +38 to +39
[features]
embedded-hal-02 = ["microbit-common/embedded-hal-02"]
Copy link
Contributor

Choose a reason for hiding this comment

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

I would recommend not making embedded-hal 0.2 an optional feature (yet).
There's still a lot of the driver ecosystem that has not updated to 1.0, and if your target audience is newbies you want to give them the least amount of things they must change.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to let people avoid both the extra dependency which may be unnecessary, and the confusing error messages (e.g. in hints to add missing use statements for traits) that come from depending on two different versions of the same library.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough. I hadn't seen those particular errors first-hand in a while, so I did up a quick test and I agree - those messages are going to be tricky for newbies to parse and understand.
Optional 0.2 hal does look like a better option than the alternative.

Base automatically changed from update-nrf to main April 15, 2024 14:56
@qwandor qwandor added this pull request to the merge queue Apr 15, 2024
Merged via the queue into main with commit 4d1eac2 Apr 15, 2024
9 checks passed
@qwandor qwandor deleted the embedded-hal branch April 15, 2024 15:00
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