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

Pin maybe-async-cfg to version 0.2.4 due to breaking changes in latest. #218

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

jakerr
Copy link
Contributor

@jakerr jakerr commented Nov 10, 2024

With the configuration currently in master

cargo build --all-features --release

Will use the latest maybe-async-cfg which is 0.2.5. This causes compilation errors.

This change pins the version to =0.2.4 rather than attempting to upgrade to the latest version. I'll leave that as an excersise to someone with more experience with maybe-async-cfg.

--
Details about the errors encountered:

When 0.2.5 is selected we see the following compilation errors and many other similar ones:

error[E0277]: `Result<(), DisplayError>` is not a future
   --> src/size.rs:184:56
    |
184 |         Command::ComPinConfig(true, false).send(iface).await
    |                                                       -^^^^^
    |                                                       ||
    |                                                       |`Result<(), DisplayError>` is not a future
    |                                                       help: remove the `.await`
    |
    = help: the trait `Future` is not implemented for `Result<(), DisplayError>`, which is required by `Result<(), DisplayError>: IntoFuture`
    = note: Result<(), DisplayError> must be a future or must implement `IntoFuture` to be awaited
    = note: required for `Result<(), DisplayError>` to implement `IntoFuture`

error[E0119]: conflicting implementations of trait `size::DisplaySize` for type `size::DisplaySize128x64`
  --> src/size.rs:77:1
   |
77 | impl DisplaySize for DisplaySize128x64 {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | first implementation here
   | conflicting implementation for `size::DisplaySize128x64`
error[E0277]: the trait bound `size::DisplaySize128x32: DisplaySizeAsync` is not satisfied
  --> src/mode/terminal.rs:48:30
   |
48 | impl TerminalDisplaySize for DisplaySize128x32 {
   |                              ^^^^^^^^^^^^^^^^^ the trait `DisplaySizeAsync` is not implemented for `size::DisplaySize128x32`
   |
help: this trait has no implementations, consider adding one
  --> src/size.rs:33:1
   |
33 | pub trait DisplaySize {
   | ^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `TerminalDisplaySizeAsync`
  --> src/mode/terminal.rs:23:32
   |
23 | pub trait TerminalDisplaySize: DisplaySize {
   |                                ^^^^^^^^^^^ required by this bound in `TerminalDisplaySizeAsync`

With the configuration currently in master

> cargo build --all-features --release

Will use the latest `maybe-async-cfg` which is `0.2.5`.
This causes compilation errors.

This change pins the version to `=0.2.4` rather than attempting to upgrade to the latest version.
I'll leave that as an excersise to someone with more experience with maybe-async-cfg.

--
Details about the errors encountered:

Under Semantic Versioning (semver), a version change from 0.2.4 to 0.2.5 is considered a patch
release, which indicates that the update should contain only backwards-compatible bug fixes or minor
improvements. In other words, it shouldn't introduce breaking changes to existing functionality.

However, when 0.2.5 is selected we see the following compilation errors and many other similar ones:

```bash
error[E0277]: `Result<(), DisplayError>` is not a future
   --> src/size.rs:184:56
    |
184 |         Command::ComPinConfig(true, false).send(iface).await
    |                                                       -^^^^^
    |                                                       ||
    |                                                       |`Result<(), DisplayError>` is not a future
    |                                                       help: remove the `.await`
    |
    = help: the trait `Future` is not implemented for `Result<(), DisplayError>`, which is required by `Result<(), DisplayError>: IntoFuture`
    = note: Result<(), DisplayError> must be a future or must implement `IntoFuture` to be awaited
    = note: required for `Result<(), DisplayError>` to implement `IntoFuture`

error[E0119]: conflicting implementations of trait `size::DisplaySize` for type `size::DisplaySize128x64`
  --> src/size.rs:77:1
   |
77 | impl DisplaySize for DisplaySize128x64 {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | first implementation here
   | conflicting implementation for `size::DisplaySize128x64`
error[E0277]: the trait bound `size::DisplaySize128x32: DisplaySizeAsync` is not satisfied
  --> src/mode/terminal.rs:48:30
   |
48 | impl TerminalDisplaySize for DisplaySize128x32 {
   |                              ^^^^^^^^^^^^^^^^^ the trait `DisplaySizeAsync` is not implemented for `size::DisplaySize128x32`
   |
help: this trait has no implementations, consider adding one
  --> src/size.rs:33:1
   |
33 | pub trait DisplaySize {
   | ^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `TerminalDisplaySizeAsync`
  --> src/mode/terminal.rs:23:32
   |
23 | pub trait TerminalDisplaySize: DisplaySize {
   |                                ^^^^^^^^^^^ required by this bound in `TerminalDisplaySizeAsync`
```
Copy link
Member

@eldruin eldruin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for noticing and handling this!

@eldruin eldruin merged commit f3a2f7a into rust-embedded-community:master Nov 11, 2024
11 of 12 checks passed
@jakerr jakerr deleted the pin-version branch November 11, 2024 11:15
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

Successfully merging this pull request may close these issues.

2 participants