Skip to content

Commit

Permalink
chore(deps): bump ratatui to 0.26.2 and crossterm to 0.27.0
Browse files Browse the repository at this point in the history
bumps msrv to 1.74.0

This necessitated 3 changes to the codebase:
- `Spans` was renamed to the more ergonomic `Line` type.
- `Frame` no longer requires a backend type parameter.
- `Table::new` requires a widths parameter, so we use
  `Table::default().rows(rows)` instead of `Table::new(rows)`.

Crossterm on Windows triggers events for key press as well as release
and repeat, which causes duplicate key presses. This change filters out
those events.
  • Loading branch information
joshka committed Apr 25, 2024
1 parent 3193fde commit 3127d33
Show file tree
Hide file tree
Showing 21 changed files with 293 additions and 102 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable]
include:
# Make 1.64 MSRV, as it's Tonic 0.10's MSRV.
- rust: 1.64.0
- rust: 1.74.0
os: ubuntu-latest
# Try to build on the latest nightly. This job is allowed to fail, but
# it's useful to help catch bugs in upcoming Rust versions.
Expand Down
157 changes: 151 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion console-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "console-api"
version = "0.6.0"
license = "MIT"
edition = "2021"
rust-version = "1.64.0"
rust-version = "1.74.0"
authors = ["Eliza Weisman <eliza@buoyant.io>", "Tokio Contributors <team@tokio.rs>",]
readme = "README.md"
repository = "https://github.com/tokio-rs/console/"
Expand Down
2 changes: 1 addition & 1 deletion console-subscriber/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "console-subscriber"
version = "0.2.0"
license = "MIT"
edition = "2021"
rust-version = "1.64.0"
rust-version = "1.74.0"
authors = ["Eliza Weisman <eliza@buoyant.io>", "Tokio Contributors <team@tokio.rs>",]
readme = "README.md"
repository = "https://github.com/tokio-rs/console/"
Expand Down
2 changes: 1 addition & 1 deletion console-subscriber/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ console project.
## Supported Rust Versions

The Tokio console is built against the latest stable release. The minimum
supported version is 1.64. The current Tokio console version is not guaranteed
supported version is 1.74. The current Tokio console version is not guaranteed
to build on Rust versions earlier than the minimum supported version.

## License
Expand Down
6 changes: 3 additions & 3 deletions tokio-console/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.10"
license = "MIT"
repository = "https://github.com/tokio-rs/console"
edition = "2021"
rust-version = "1.64.0"
rust-version = "1.74.0"
authors = ["Eliza Weisman <eliza@buoyant.io>", "Tokio Contributors <team@tokio.rs>",]
readme = "README.md"
default-run = "tokio-console"
Expand Down Expand Up @@ -40,13 +40,13 @@ clap_complete = "~4.1.6"
tokio = { version = "1", features = ["full", "rt-multi-thread"] }
tonic = { version = "0.10", features = ["transport"] }
futures = "0.3"
ratatui = { version = "0.20.1", default-features = false, features = ["crossterm"] }
ratatui = { version = "0.26.2", default-features = false, features = ["crossterm"] }
tower = "0.4.12"
tracing = "0.1"
tracing-subscriber = { version = "0.3" }
tracing-journald = { version = "0.2", optional = true }
prost-types = "0.12"
crossterm = { version = "0.26.1", features = ["event-stream"] }
crossterm = { version = "0.27.0", features = ["event-stream"] }
color-eyre = { version = "0.6", features = ["issue-url"] }
hdrhistogram = { version = "7.3.0", default-features = false, features = ["serialization"] }
# Keep this in sync with the version from `tonic`.
Expand Down
2 changes: 1 addition & 1 deletion tokio-console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ console project.
## Supported Rust Versions

The Tokio console is built against the latest stable release. The minimum
supported version is 1.64. The current Tokio console version is not guaranteed
supported version is 1.74. The current Tokio console version is not guaranteed
to build on Rust versions earlier than the minimum supported version.

## License
Expand Down
6 changes: 3 additions & 3 deletions tokio-console/src/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ impl Connection {
}
}

pub fn render(&self, styles: &crate::view::Styles) -> ratatui::text::Spans {
pub fn render(&self, styles: &crate::view::Styles) -> ratatui::text::Line {
use ratatui::{
style::{Color, Modifier},
text::{Span, Spans},
text::{Line, Span},
};
let state = match self.state {
State::Connected { .. } => Span::styled(
Expand All @@ -202,7 +202,7 @@ impl Connection {
styles.fg(Color::Yellow).add_modifier(Modifier::BOLD),
),
};
Spans::from(vec![
Line::from(vec![
Span::raw("connection: "),
Span::raw(self.target.to_string()),
Span::raw(" "),
Expand Down
Loading

0 comments on commit 3127d33

Please sign in to comment.