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

Re-export Peripheral #421

Merged
merged 1 commit into from
Mar 7, 2023
Merged

Re-export Peripheral #421

merged 1 commit into from
Mar 7, 2023

Conversation

jessebraham
Copy link
Member

Closes #339

@bjoernQ @MabezDev any objections?

Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

LGTM, though I do wonder how bad it would be if we just had pub use esp_hal_common::*; in each of the HALs...

@bjoernQ
Copy link
Contributor

bjoernQ commented Mar 7, 2023

Also, LGTM - I think there were some concerns back then but I don't remember what. (I don't even remember if there actually were concerns)

I do wonder how bad it would be if we just had pub use esp_hal_common::*; in each of the HALs...

I think in the early days when the GPIO impl still lived in the chip specific HALs we started things this way. We could probably check what is public in esp-hal-common which shouldn't and do that.

Next step then could be to think about how much sense the chip specific HALs make anymore. It's certainly not just "copy all the stuff to esp-hal-common" but not that much more and for almost all other crates we change the target via features. Would be a major breaking change for sure

@jessebraham
Copy link
Member Author

I do plan on trying to move as much as possible into esp-hal-common in the coming weeks, in an attempt to find out if the chip-specific packages are actually necessary. I do have some concerns about doing this, however they may prove to be worth tolerating given the other benefits. I suppose we'll see when we try.

I'm also not against just re-exporting with a glob, that's something I can add in one of my coming PRs.

@jessebraham jessebraham merged commit 72b9bcb into esp-rs:main Mar 7, 2023
@jessebraham jessebraham deleted the fixes/exports branch March 7, 2023 15:05
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.

consider re-exporting Peripheral
3 participants