Skip to content

Conversation

@decathorpe
Copy link

I'm one of the maintainers of the package for diskonaut in Fedora. I noticed that its dependencies have started to get quite outdated - it's pulling in a lot of old versions or crates that have been obsoleted long ago. So I tried my hand at updating it :)

Changes are split into separate commits so they're hopefully easier to review. Each crate update only required small code changes, if at all:

  • tui v0.19 / crossterm v0.25 required small code changes:

The KeyEvent struct added two more members, which don't seem to be too useful here, so I ignored them in most cases, and set them to reasonable (I hope) defaults in the test code. tui v0.19 is the last release of tui before it was obsoleted by ratatui.

  • ratatui v0.26 / crossterm v0.27: required small code changes:

Layout::split returns an Rc<[]> instead of a Vec, but a simple .to_vec() solved that problem. And the Backend trait added a new window_size method, for which I added an implementation that returns a window with 80 columns and 24 lines (the default terminal size) and 0x0 pixels (the default for terminals that don't support this functionality).

The ratatui::Cell.symbol struct member was made private, but could be replaced by calling the Cell.symbol() method.

I didn't update this all the way to ratatui v0.28, because v0.26 matches the version of ratatui that we currently ship in Fedora. From what I can tell, updating from 0.26 to 0.28 and bumping crossterm from 0.27 to 0.28 accordingly should be straightforward.

  • jwalk v0.8: required small code changes:

The RayonDefaultPool now takes an argument, for which I added the default value (timeout of 1 second, according to the jwalk documentation).

  • unicode-width v0.2: no code changes.

  • nix v0.29: very small changes necessary.

Some functionality that was previously available in the default feature set of nix is now hidden behind the user feature, which I enabled.

  • insta v1: no changes necessary.

  • structopt v0.3 -> clap v4: small code changes necessary.

I changed the import for the derive macro from structopt::Structopt to clap::Parser, updated the attributes from #[structopt(...)] to #[clap(...)], and replaced Opt::from_args() with Opt::parse().


I tried to verify that the behaviour of running diskonaut was unchanged and all tests all passed after each individual commit, and as far as I can tell, printed output and behaviour are unaffected, other than slightly differently formatted and ✨ stylized ✨ help output courtesy of clap v4.

I didn't make any formatting changes or fix rustc / clippy lints along the way to avoid making the PR harder to review.

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.

1 participant