rust-embedded / bare-metal

Abstractions common to microcontrollers
Apache License 2.0
116 stars 17 forks source link

Deprecate in favour of `critical_section`. #46

Closed reitermarkus closed 2 years ago

adamgreig commented 2 years ago

I think the plan we discussed is to re-export CriticalSection and Mutex from critical-section and publish that as a new release, and simultaneously (or later) deprecate the crate. That way, people using the current types can immediately gain compatibility with critical-section, and the types are already identical for this reason.

reitermarkus commented 2 years ago

So just leave 1.x alone without any deprecation?

If people need to upgrade bare_metal to 2.0 just for it to show the deprecation, they might as well switch to critical_section 1.0 immediately instead which takes only marginally more work.

adamgreig commented 2 years ago

The idea was to publish 1.1 with the re-exported critical-section types, and also mark them (or the whole crate) as deprecated.

reitermarkus commented 2 years ago

I thought we'd need to release 2.0 since the MSRV of critical_section is higher.

adamgreig commented 2 years ago

We don't consider increasing the MSRV to be a breaking change, so we can release 1.1 with a higher MSRV.

reitermarkus commented 2 years ago

Okay, I will change this then to re-export the types from critical_section instead.

reitermarkus commented 2 years ago

The deprecate attribute doesn't work on re-exports.

bors[bot] commented 2 years ago

Timed out.

adamgreig commented 2 years ago

Could you update the required bors status in https://github.com/rust-embedded/bare-metal/blob/master/.github/bors.toml#L8 for the new MSRV?

bors[bot] commented 2 years ago

Build succeeded: