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

Naming consistency between PAC and HAL crates #3

Open
Rua opened this issue Jul 26, 2020 · 1 comment
Open

Naming consistency between PAC and HAL crates #3

Rua opened this issue Jul 26, 2020 · 1 comment

Comments

@Rua
Copy link

Rua commented Jul 26, 2020

I'm not sure if this is the right place to post, as this concerns many of the stm32-rs projects and not just this one. It has bothered me for a while that the PAC crate is named stm32f1 while the HAL crate is named stm32f1xx-hal. You have to remember that the HAL crates have the extra xx on the end. Would it be possible to make this consistent? Either add xx to the PAC crates or, which is my preference, remove it from the HAL crates. Then the naming scheme is simply that you add -hal to a PAC crate to get the corresponding HAL crate.

@adamgreig adamgreig transferred this issue from stm32-rs/stm32-rs Jul 27, 2020
@adamgreig
Copy link
Member

I've transferred this issue to our new meta repository which is meant for this sort of discussion.

As you might have guessed the current naming scheme came about more or less by accident; I made the stm32f1 crate and friends as a private project in 2017, and at the same time crates like stm32f103 existed for PACs; a very early HAL was stm32f30x-hal because it supported the F301/2/3; eventually stm32f3xx-hal was started; some time later the stm32-rs organisation was created and stm32f3xx-hal and stm32f1xx-hal moved in; subsequent HALs like L0, F7, H7, etc, were created following the same naming scheme.

At the moment (but see #2) the HALs are more or less autonomous; being in the stm32-rs org is mostly for convenience and some limited amount of bus factor, so there's no central group who could say "OK, we're renaming all the HAL crates". On the other hand, each individual HAL crate could readily move to a new name and perhaps enough stm32-rs members would support the idea to make it happen.

From a practical point of view I don't think it would be too hard to do a rename; you could imagine having one last release in the old name with a big notice to move to the new name and a deprecation warning, and release a compatible new crate with the same minor version. The recent RTFM to RTIC rename could be a good example.

However, I also don't know that it would necessarily be worth the effort -- users basically need either the PAC or the HAL, since once you're using the HAL you already have the PAC available from hal::pac (or hal::stm32, etc). It's a historical quirk but it doesn't seem like it should be a big point of confusion. On the other hand, doing a rename means all existing links need to update, all users need to update, all downstream dependencies need to update, the crates.io history is lost, etc. It would need to be worth the cost.

Anyway, I don't run any of the HAL crates, so these are basically some thoughts on the idea; the actual HAL maintainers are the people to listen to.

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

No branches or pull requests

2 participants