Conversation
a1aadfa to
45c3968
Compare
|
As CI is only run once cleared, I've tested this locally with Rust 1.31. (And found that the minimal version was incorrect, that is now fixed). Inconveniently, even the oldest usable portable-atomics version (1.3.0) does not work with Rust 1.31. Is updating the MSRV of this project an option? I haven't bisected, but at least 1.58 works (and works even with portable-atomics 1.70); if we need to stay lower but can move from 1.31, I'm happy to provide a sharper result than "> 1.31 <= 1.58". |
|
How can we help getting this merged? (Trying to reduce the number of patches in Ariel OS). |
This should not have run-time impact on platforms that support atomic boolean compare-and-swap, but enables its use on microcontrollers where the user configures portable-atomic in such a way that atomics can be emulated (eg. through disabling interrupts).
45c3968 to
aa32209
Compare
This restores compatibility with Rust 1.31, but requires actual users for portable-atomics to set that as a feature.
54d190f to
f81fa14
Compare
|
Rebased onto master after #13, so that tests can run through again -- and fixed other things that now failed: No version of portable-atomics is suitably compatible with the 1.31 tested MSRV, so unless you're open to updating the MSRV to 1.34, I've updated this PR to feature-gate portable-atomics as off-by-default, with CI running on both variations. (If the MSRV change is an option, I'm happy to updated things). Please consider reviewing this. |
|
I'm taking the liberty to ping @seanmonstar explicitly (maybe the repo's notification settings are not configured to notify potential reviewers). If you don't want to deal with this, or the change is a no-go, that's perfectly fine too – just please let us know (so we can go from a patched-version situation either towards an upstream or towards a soft-fork we'd maintain). |
|
As a practical way forward, we have uploaded a soft-fork at https://crates.io/crates/try-lock-portable-atomic/ and moved the relevant dependents over. That crate is essentially try-lock with this patch, plus metadata changes to minimize potential for confusion. We'll keep this PR merged in https://github.com/ariel-os/try-lock-portable-atomic with updates on demand. |
This should not have run-time impact on platforms that support atomic boolean compare-and-swap, but enables its use on microcontrollers where the user configures portable-atomic in such a way that atomics can be emulated (eg. through disabling interrupts).
I have not tested whether portable-atomics works with the 1.31 version tested in CI. Should that fail, should I rather feature-gate this, can we update the MSRV of this crate, or should I hack CI to use an older version of portable-atomics (because Rust 1.31 was way before cargo became rust-version aware)?