Skip to content

Conversation

@rcgoodfellow
Copy link
Contributor

@rcgoodfellow rcgoodfellow commented Sep 24, 2025

Fixes

Which is closed as completed, but has not been done yet.

After removing structopt I bumped dependencies. This required going to rust 1.90 to pick up some features OPTE is now using that have only been stable since 1.90. Then clippy got angry with me and I needed let chains to solve some of the clippy rage cleanly. So I also moved to 2024.

The majority of the changes in this PR are dealing with clippy in going to Rust 1.90/2024.

The move from structopt to clap is in the first commit. Then there are a bunch of commits dealing with the rust version bump. Then c82dae4 adds the link apply command and the commits that follow fix up a few things with aliases I noticed when using the new swadm to do some debugging on a racklette.

@rcgoodfellow rcgoodfellow marked this pull request as ready for review September 25, 2025 02:56
@rcgoodfellow rcgoodfellow changed the title Move from structopt to clap, Rust 1.90, Rust 2024 edition structopt -> clap, Rust 1.90/2024, swadm link apply command Sep 25, 2025
@rcgoodfellow rcgoodfellow changed the title structopt -> clap, Rust 1.90/2024, swadm link apply command structopt -> clap, Rust 1.88/2024, swadm link apply command Sep 25, 2025
@rcgoodfellow rcgoodfellow changed the title structopt -> clap, Rust 1.88/2024, swadm link apply command structopt -> clap, Rust 1.90/2024, swadm link apply command Sep 26, 2025
@rcgoodfellow
Copy link
Contributor Author

Able to move to 1.90 after


// Parse all of the arguments to an action
fn get_action_args(variant: &Variant) -> Result<Vec<ActionArg>> {
fn get_action_args(variant: &Variant) -> Result<Vec<ActionArg<'_>>> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is weird. I guess it's because ActionArg contains Ident<'a>? I wonder why Ident has a lifetime. Hmm. Not for today.

// we wouldn't expect this state to change other than at our direction, this
// callback will generally be a no-op. The only exception would be if somebody
// were using the bf cli to manipulate ports, at which point all bets are off as
// to what's happening with the port.
Copy link
Collaborator

Choose a reason for hiding this comment

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

really? Huh.

// Sizes of the port and LAG bitmap arrays in a multicast group
pub const BF_MC_PORT_ARRAY_SIZE: usize = (BF_PORT_COUNT as usize + 7) / 8;
pub const BF_MC_LAG_ARRAY_SIZE: usize = (BF_LAG_COUNT as usize + 7) / 8;
pub const BF_MC_PORT_ARRAY_SIZE: usize = (BF_PORT_COUNT as usize).div_ceil(8);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did clippy pick this up? I'm surprised.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Clippy did indeed.

}
}

/// A Vlan identifier, made up of a port, link, and vlan tag.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I thought I took all this out as part of the latest ECMP work. Hmm.

@rcgoodfellow rcgoodfellow merged commit 78ecc2d into main Sep 26, 2025
6 checks passed
@rcgoodfellow rcgoodfellow deleted the ry/cli-updates branch September 26, 2025 18:51
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