console icon indicating copy to clipboard operation
console copied to clipboard

chore(deps): bump ratatui to 0.26.2 and crossterm to 0.27.0

Open joshka opened this issue 1 year ago • 11 comments

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.

joshka avatar Feb 03 '24 00:02 joshka

It looks like this change requires a MSRV bump, as the new ratatui seems not to support Rust 1.64.0: https://github.com/tokio-rs/console/actions/runs/7763271246/job/21175134601#step:8:1

hawkw avatar Feb 06 '24 17:02 hawkw

It looks like this change requires a MSRV bump, as the new ratatui seems not to support Rust 1.64.0: https://github.com/tokio-rs/console/actions/runs/7763271246/job/21175134601#step:8:1

Thanks - bumped this to 1.70

joshka avatar Feb 06 '24 18:02 joshka

@joshka mind rebasing this branch onto the latest master and resolving the lockfile conflicts? Once that's done, this should be good to merge!

hawkw avatar Feb 08 '24 17:02 hawkw

1:31 PM]joshka: I notice that some tests are failing now - digging to check what's happening
[1:31 PM]Hayden (he/him): if it's the self wakes test then it's known flaky. 
[1:31 PM]Hayden (he/him): (I need to remove it)
[1:37 PM]joshka: Ah got it - yep it was that. I did't a quick cargo update on main and saw the tests fail there too (it didn't fail before then)

joshka avatar Feb 15 '24 21:02 joshka

Squashed and rebased

joshka avatar Apr 01 '24 21:04 joshka

There are some proto changes:

/// Each `ResourceUpdate` contains any resource data that has changed since the last
diff --git a/console-api/src/generated/rs.tokio.console.tasks.rs b/console-api/src/generated/rs.tokio.console.tasks.rs
index 41b8396..e8ee5fa 100644
--- a/console-api/src/generated/rs.tokio.console.tasks.rs
+++ b/console-api/src/generated/rs.tokio.console.tasks.rs
@@ -1,3 +1,4 @@
+// This file is @generated by prost-build.
 /// A task state update.
 ///
 /// Each `TaskUpdate` contains any task data that has changed since the last
diff --git a/console-api/src/generated/rs.tokio.console.trace.rs b/console-api/src/generated/rs.tokio.console.trace.rs
index [220](https://github.com/tokio-rs/console/actions/runs/8603263859/job/23574759021?pr=515#step:6:221)b55a..be3516e 100644
--- a/console-api/src/generated/rs.tokio.console.trace.rs
+++ b/console-api/src/generated/rs.tokio.console.trace.rs
@@ -1,3 +1,4 @@
+// This file is @generated by prost-build.
 /// Start watching trace events with the provided filter.
 #[allow(clippy::derive_partial_eq_without_eq)]
 #[derive(Clone, PartialEq, ::prost::Message)]
test bootstrap ... FAILED

Because there are some other issues in this PR, I would recommend:

  1. This PR only focuses on bumping the rataui version.
  2. If the rataui requires a higher MSRV, we bump the MSRV but do not change other dependencies' versions.

Perhaps we could address the issue of the failed test that was caused by changes in other dependencies.

Also, this would help us make sure the scope of this PR is not extended. We can only focus on bumping the rataui version.

Thank you for your patch again!

0xPoe avatar Apr 09 '24 10:04 0xPoe

I've fixed the PR to just focus on the Ratatui changes (and bumped it to 0.26.2 which was released after this PR was created). I've also bumped crossterm to 0.27.0 to avoid incompatible versions, and fixed a small bug which hits most crossterm based apps on Windows (duplicate key presses).

I've bumped all the projects to MSRV 1.74 as this is the version that we build with in Ratatui. I'm not sure if it was right to just bump the tokio-console project or all the files, but this seems to be the least likely to cause CI pain (e.g. building the libs with 1.64 and the tui app with 1.74).

joshka avatar Apr 25 '24 20:04 joshka

Lint CI fixed in https://github.com/tokio-rs/console/pull/548

0xPoe avatar May 08 '24 13:05 0xPoe

@joshka There are some unused imports after your change. Could you please help to remove them? Thanks!

0xPoe avatar May 09 '24 03:05 0xPoe

@joshka There are some unused imports after your change. Could you please help to remove them? Thanks!

Done

joshka avatar May 09 '24 05:05 joshka

@hawkw Could you please rereview and approve (if you're happy with it) this PR? Your request for changes is blocking at the moment. Thanks!

hds avatar May 09 '24 08:05 hds