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

master seems broken: error[E0277]: ErrorKind doesn't implement std::fmt::Display #2460

Closed
nebiros opened this issue May 11, 2022 · 6 comments
Labels
C-bug Category: This is a bug

Comments

@nebiros
Copy link

nebiros commented May 11, 2022

Summary

from cargo install --path helix-term, latest commit at date: 7b287f63 Blaž Hrastnik 13 hours ago - nix: update flake dependencies

   Compiling helix-view v0.6.0 (/Users/juan.alvarez/Library/Caches/Homebrew/helix--git/helix-view)
error[E0277]: `ErrorKind` doesn't implement `std::fmt::Display`
   --> helix-view/src/handlers/dap.rs:305:81
    |
305 | ...                   e => panic!("Error to start debug console: {}", e),
    |                                                                       ^ `ErrorKind` cannot be formatted with the default formatter
    |
    = help: the trait `std::fmt::Display` is not implemented for `ErrorKind`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: this error originates in the macro `$crate::const_format_args` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.
error: could not compile `helix-view` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `helix-term v0.6.0 (/Users/juan.alvarez/Library/Caches/Homebrew/helix--git/helix-term)`, intermediate artifacts can be found at `/Users/juan.alvarez/Library/Caches/Homebrew/helix--git/target`

Reproduction Steps

I tried this:

  1. cargo install --path helix-term

I expected this to happen:

Compile and install

Instead, this happened:

   Compiling helix-view v0.6.0 (/Users/juan.alvarez/Library/Caches/Homebrew/helix--git/helix-view)
error[E0277]: `ErrorKind` doesn't implement `std::fmt::Display`
   --> helix-view/src/handlers/dap.rs:305:81
    |
305 | ...                   e => panic!("Error to start debug console: {}", e),
    |                                                                       ^ `ErrorKind` cannot be formatted with the default formatter
    |
    = help: the trait `std::fmt::Display` is not implemented for `ErrorKind`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: this error originates in the macro `$crate::const_format_args` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.
error: could not compile `helix-view` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `helix-term v0.6.0 (/Users/juan.alvarez/Library/Caches/Homebrew/helix--git/helix-term)`, intermediate artifacts can be found at `/Users/juan.alvarez/Library/Caches/Homebrew/helix--git/target`

Helix log

No response

Platform

macOS

Terminal Emulator

iTern2

Helix Version

22.03-207-g7b287f63

@nebiros nebiros added the C-bug Category: This is a bug label May 11, 2022
@the-mikedavis
Copy link
Member

I think it's just an MSRV problem. Display for ErrorKind was stabilized in 1.60 https://github.com/rust-lang/rust/blob/a85de162a513d1d11d263783a3f7092fff824b48/RELEASES.md#stabilized-apis. If you update your rust version you should be able to build.

@nebiros
Copy link
Author

nebiros commented May 11, 2022

I think it's just an MSRV problem. Display for ErrorKind was stabilized in 1.60 https://github.com/rust-lang/rust/blob/a85de162a513d1d11d263783a3f7092fff824b48/RELEASES.md#stabilized-apis. If you update your rust version you should be able to build.

Latest version from homebrew is 1.59.0, 🤔

@the-mikedavis
Copy link
Member

the-mikedavis commented May 11, 2022

1.60 was released in early april (2022-04-07) but brew may be behind on packaging it. See also https://www.whatrustisit.com/

In general we've been trying to target 1.57-1.58 because distributions that package helix take some time to update their rust version. We may want to revert/alter 7ae6cad which introduced the display for ErrorKind behavior so we can build on older rust versions. (cc: @archseer)

Edit: I read the backtrace wrong 😅,

e => panic!("Error to start debug console: {}", e),
is the failing line introduced in #2294

@nebiros
Copy link
Author

nebiros commented May 11, 2022

1.60 was released in early april (2022-04-07) but brew may be behind on packaging it. See also https://www.whatrustisit.com/

In general we've been try to target 1.57-1.58 because distributions that package helix take some time to update their rust version. We may want to revert/alter 7ae6cad which introduced the display for ErrorKind behavior so we can build on older rust versions. (cc: @archseer)

Seems like rust 1.60 is broken at homebrew, Homebrew/homebrew-core#98823

@ipstone
Copy link

ipstone commented May 21, 2022

For the moment, I switched to commit 5c25705, things compile fine on M1 mac.

@nebiros
Copy link
Author

nebiros commented May 21, 2022

For the moment, I switched to commit 5c25705, things compile fine on M1 mac ... but somehow file syntax is not working ...

yeah, but is a homebrew issue, you can use asdf and install latest rust stable version from there, guess it will work

the-mikedavis added a commit to the-mikedavis/helix that referenced this issue May 22, 2022
It's very easy to use new rust features without realizing it since
the CI and local development workflows may use the latest rust version.
We try to keep some backwards compatibility with rust versions to make
packaging easier for some OS-level package-managers like Void Linux's.
See helix-editor#1881.

This change adds a new CI check which uses the cargo-msrv crate to
verify an MSRV version recorded in helix-term's Cargo.toml. When
changing MSRV, we can then edit `helix-term/Cargo.toml`'s
`package.metadata.msrv` key.

The MSRV is set at 1.60.0 for the sake of checkmarks on builds but
ideally we want to support 1.57.0. The PR that closes helix-editor#2460 should
set this MSRV metadata key back to 1.57.0.

Closes helix-editor#2482.
the-mikedavis added a commit to the-mikedavis/helix that referenced this issue May 22, 2022
It's very easy to use new rust features without realizing it since
the CI and local development workflows may use the latest rust version.
We try to keep some backwards compatibility with rust versions to make
packaging easier for some OS-level package-managers like Void Linux's.
See helix-editor#1881.

This change adds a new CI check which uses the cargo-msrv crate to
verify an MSRV version recorded in helix-term's Cargo.toml. When
changing MSRV, we can then edit `helix-term/Cargo.toml`'s
`package.metadata.msrv` key.

The MSRV is set at 1.60.0 for the sake of checkmarks on builds but
ideally we want to support 1.57.0. The PR that fixes the MSRV in helix-editor#2460
should set this MSRV metadata key back to 1.57.0.

Closes helix-editor#2482.
the-mikedavis added a commit to the-mikedavis/helix that referenced this issue May 22, 2022
It's very easy to use new rust features without realizing it since
the CI and local development workflows may use the latest rust version.
We try to keep some backwards compatibility with rust versions to make
packaging easier for some OS-level package-managers like Void Linux's.
See helix-editor#1881.

This change adds a new CI check which uses the cargo-msrv crate to
verify an MSRV version recorded in helix-term's Cargo.toml. When
changing MSRV, we can then edit `helix-term/Cargo.toml`'s
`package.metadata.msrv` key.

The MSRV is set at 1.60.0 for the sake of checkmarks on builds but
ideally we want to support 1.57.0. The PR that fixes the MSRV in helix-editor#2460
should set this MSRV metadata key back to 1.57.0.

Closes helix-editor#2482.
the-mikedavis added a commit to the-mikedavis/helix that referenced this issue May 22, 2022
This line uses the Display trait for io::ErrorKind which was stabilized
in Rust 1.60.0. We can set MSRV all the way back to 1.57.0 by replacing
it with a pretty-print.

Closes helix-editor#2460
the-mikedavis added a commit to the-mikedavis/helix that referenced this issue May 23, 2022
This line uses the Display trait for io::ErrorKind which was
stabilized in Rust 1.60.0. We can set MSRV all the way back to
1.57.0 by replacing it with a pretty-print.

Closes helix-editor#2460
the-mikedavis added a commit to the-mikedavis/helix that referenced this issue May 23, 2022
This line uses the Display trait for io::ErrorKind which was
stabilized in Rust 1.60.0. We can set MSRV all the way back to
1.57.0 by replacing it with a pretty-print.

Closes helix-editor#2460.
the-mikedavis added a commit to the-mikedavis/helix that referenced this issue May 23, 2022
This line uses the Display trait for io::ErrorKind which was
stabilized in Rust 1.60.0. We can set MSRV all the way back to
1.57.0 by replacing it with a pretty-print.

Closes helix-editor#2460.
the-mikedavis added a commit to the-mikedavis/helix that referenced this issue May 23, 2022
This line uses the Display trait for io::ErrorKind which was
stabilized in Rust 1.60.0. We can set MSRV all the way back to
1.57.0 by replacing it with a pretty-print.

Closes helix-editor#2460.
the-mikedavis added a commit to the-mikedavis/helix that referenced this issue May 23, 2022
This line uses the Display trait for io::ErrorKind which was
stabilized in Rust 1.60.0. We can set MSRV all the way back to
1.57.0 by replacing it with a pretty-print.

Closes helix-editor#2460.
mtoohey31 pushed a commit to mtoohey31/helix that referenced this issue Jun 15, 2022
This line uses the Display trait for io::ErrorKind which was
stabilized in Rust 1.60.0. We can set MSRV all the way back to
1.57.0 by replacing it with a pretty-print.

Closes helix-editor#2460.
mtoohey31 pushed a commit to mtoohey31/helix that referenced this issue Jun 15, 2022
This line uses the Display trait for io::ErrorKind which was
stabilized in Rust 1.60.0. We can set MSRV all the way back to
1.57.0 by replacing it with a pretty-print.

Closes helix-editor#2460.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants