feat(deps): support both embassy-executor 0.9.x and 0.10.x#80
feat(deps): support both embassy-executor 0.9.x and 0.10.x#80kaspar030 wants to merge 1 commit intoprobe-rs:masterfrom
Conversation
Signed-off-by: Kaspar Schleiser <kaspar@schleiser.de>
|
|
||
| let spawn_invoker = if cfg!(feature = "embassy09") { | ||
| quote!( spawn(#ident_invoker()).unwrap() ) | ||
| } else if cfg!(feature = "embassy010") { |
There was a problem hiding this comment.
Maybe make this the else case.
| } | ||
| ); | ||
|
|
||
| let spawn_invoker = if cfg!(feature = "embassy09") { |
There was a problem hiding this comment.
This is basically #79 but supporting both executors.
| @@ -21,7 +21,8 @@ darling = "0.21.1" | |||
|
|
|||
| [features] | |||
| embassy = [] | |||
There was a problem hiding this comment.
Here embassy means "any embassy executor".
| # Enables async test and init functions using embassy-executor. | ||
| # Note: You need to enable at least one executor feature on embassy unless you are using the `external-executor` feature | ||
| embassy = ["embedded-test-macros/embassy", "dep:embassy-executor"] | ||
| embassy = ["embassy09"] |
There was a problem hiding this comment.
Here,
embassyjust selectsembassy09for backwards compatibility.embassy-anytoggles code where the executor version doesn't matter
Happy to bikeshed this, maybe _embassy? It is only used internally.
There was a problem hiding this comment.
A semver breaking embedded-test version could also change the executor version that embassy points to. (e.g., e-t 0.9 could make embassy select embassy010, to make the then-current e-e version the default).
|
|
||
| // Reexport the embassy stuff | ||
| #[cfg(all(feature = "embassy", not(feature = "ariel-os")))] | ||
| #[cfg(all(feature = "embassy-any", not(feature = "ariel-os")))] |
There was a problem hiding this comment.
This is now checking for embassy-any as plain embassy is used for backwards-compatibly selecting embassy-09. See below.
|
I can reproduce the ci errors. Somehow the |
This adds Cargo features for switching between
embassy-executor 0.9.xand0.10.x, as discussed in #71.I tried to make this backwards compatible (the
embassyfeature selectsembassy09).(Includes #79)