embassy-rs / nrf-softdevice

Apache License 2.0
256 stars 76 forks source link

feat: added nightly feature gate #172

Closed Yandrik closed 1 year ago

Yandrik commented 1 year ago

This should enable the nrf-softdevice crate to be used on stable rust. Note that the only tests I performed are building it with and without the nightly feature flag. So please do double-check that I didn't blow anything up. A non-async flash write implementation might also be a good idea. I have one, but it's not really production ready. Basically just the async one, but ripped apart without the async stuff. Do tell whether I should add that.

Dirbaio commented 1 year ago

Could you add nightly+stable checking in CI? so we don't accidentally introduce nightly-only features when building for stable.

Yandrik commented 1 year ago

Could you add nightly+stable checking in CI? so we don't accidentally introduce nightly-only features when building for stable.

* in `ci.sh` make sure everything gets built with the `nightly` feature.

* copy to `ci_stable.sh`, make it not enable `nightly` and not build the examples, add a workflow for it.

The examples auto-depend on the nightly feature now, so they'll build with that by default. I'll remove them from the stable ci file

Yandrik commented 1 year ago

Should be done & working, tho I haven't actually checked macro error reporting

Yandrik commented 1 year ago

I believe that the macro checks aren't quite right yet, tho they do panic at least

Yandrik commented 1 year ago

I don't quite get why GitHub Actions has a problem with building futures-core here, it works on my machine. Could you take a look?

Dirbaio commented 1 year ago

It needs rustup target add. With nightly it's done by the rust-toolchain.toml file, but with +stable it dosen't.

Perhaps the easiest fix is to a rust-toolchain-stable.toml file, and mv it to rust-toolchain.toml when doing stable testing. and not doing +stable on the commands.

Yandrik commented 1 year ago

this looks better

Dirbaio commented 1 year ago

Looks great! Thank you for your work :)