Update dependencies and bump MSRV (#578)

* Update  dependencies to their latest versions

* Bump MSRV to 1.73.0

* Update `CHANGELOG.md`
This commit is contained in:
Jesse Braham 2024-02-06 21:57:43 +00:00 committed by GitHub
parent 8814e83fa0
commit 0ae82dcaaf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 1127 additions and 923 deletions

View File

@ -112,7 +112,7 @@ jobs:
with:
arch: ${{ matrix.platform.arch }}
target: ${{ matrix.platform.target }}
toolchain: "1.70"
toolchain: "1.73"
- run: cargo check ${{ matrix.platform.features }}

View File

@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Created `FlashData`, `FlashDataBuilder` and `FlashSettings` structs to reduce number of input arguments in some functions (#512, #566)
- `espflash` will now exit with an error if `defmt` is selected but not usable (#524)
- Unify configuration methods (#551)
- MSRV bumped to `1.73.0` (#578)
### Removed

1926
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
name = "cargo-espflash"
version = "3.0.0-dev"
edition = "2021"
rust-version = "1.70"
rust-version = "1.73"
description = "Cargo subcommand for flashing Espressif devices"
repository = "https://github.com/esp-rs/espflash"
license = "MIT OR Apache-2.0"
@ -15,19 +15,19 @@ bin-dir = "{ bin }{ binary-ext }"
pkg-fmt = "zip"
[dependencies]
cargo_metadata = "0.18.0"
clap = { version = "4.4.6", features = ["derive", "wrap_help"] }
env_logger = "0.10.0"
cargo_metadata = "0.18.1"
clap = { version = "4.4.18", features = ["derive", "wrap_help"] }
env_logger = "0.10.2"
esp-idf-part = "0.4.1"
espflash = { version = "3.0.0-dev", path = "../espflash" }
log = "0.4.20"
miette = { version = "5.10.0", features = ["fancy"] }
serde = { version = "1.0.188", features = ["derive"] }
thiserror = "1.0.49"
toml = "0.8.2"
miette = { version = "7.0.0", features = ["fancy"] }
serde = { version = "1.0.196", features = ["derive"] }
thiserror = "1.0.56"
toml = "0.8.10"
[target.'cfg(unix)'.dependencies]
cargo = { version = "0.73.1", features = ["vendored-openssl"] }
cargo = { version = "0.76.0", features = ["vendored-openssl"] }
[target.'cfg(windows)'.dependencies]
cargo = "0.73.1"
cargo = "0.76.0"

View File

@ -2,7 +2,7 @@
# cargo-espflash
[![Crates.io](https://img.shields.io/crates/v/cargo-espflash?labelColor=1C2C2E&color=C96329&logo=Rust&style=flat-square)](https://crates.io/crates/cargo-espflash)
![MSRV](https://img.shields.io/badge/MSRV-1.70-blue?labelColor=1C2C2E&logo=Rust&style=flat-square)
![MSRV](https://img.shields.io/badge/MSRV-1.73-blue?labelColor=1C2C2E&logo=Rust&style=flat-square)
![Crates.io](https://img.shields.io/crates/l/cargo-espflash?labelColor=1C2C2E&style=flat-square)
Cross-compiler and Cargo extension for flashing Espressif devices.
@ -25,7 +25,7 @@ Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-H2**, **ESP32-P4**, and **ES
## Installation
If you are installing `cargo-espflash` from source (ie. using `cargo install`) then you must have `rustc>=1.70.0` installed on your system.
If you are installing `cargo-espflash` from source (ie. using `cargo install`) then you must have `rustc>=1.73.0` installed on your system.
If you are running **macOS** or **Linux** then [libuv] must also be installed; this is available via most popular package managers. If you are running **Windows** you can ignore this step.

View File

@ -2,7 +2,7 @@
name = "espflash"
version = "3.0.0-dev"
edition = "2021"
rust-version = "1.70"
rust-version = "1.73"
description = "A command-line tool for flashing Espressif devices"
repository = "https://github.com/esp-rs/espflash"
license = "MIT OR Apache-2.0"
@ -24,42 +24,42 @@ required-features = ["cli", "serialport"]
[dependencies]
addr2line = { version = "0.21.0", optional = true }
base64 = "0.21.4"
bytemuck = { version = "1.14.0", features = ["derive"] }
clap = { version = "4.4.6", features = ["derive", "env", "wrap_help"], optional = true }
clap_complete = { version = "4.4.3", optional = true }
comfy-table = { version = "7.0.1", optional = true }
base64 = "0.21.7"
bytemuck = { version = "1.14.1", features = ["derive"] }
clap = { version = "4.4.18", features = ["derive", "env", "wrap_help"], optional = true }
clap_complete = { version = "4.4.10", optional = true }
comfy-table = { version = "7.1.0", optional = true }
crossterm = { version = "0.25.0", optional = true } # 0.26.x causes issues on Windows
ctrlc = { version = "3.4.0", optional = true }
ctrlc = { version = "3.4.2", optional = true }
# defmt dependencies are pinned since defmt does not guarantee MSRV even for patch releases
defmt-decoder = { version = "=0.3.9", features = ["unstable"], optional = true }
defmt-parser = { version = "=0.3.3", features = ["unstable"], optional = true }
dialoguer = { version = "0.10.4", optional = true }
dialoguer = { version = "0.11.0", optional = true }
directories = { version = "5.0.1", optional = true }
env_logger = { version = "0.10.0", optional = true }
env_logger = { version = "0.10.2", optional = true }
esp-idf-part = "0.4.1"
flate2 = "1.0.27"
flate2 = "1.0.28"
hex = { version = "0.4.3", features = ["serde"], optional = true }
indicatif = { version = "0.17.7", optional = true }
lazy_static = { version = "1.4.0", optional = true }
log = "0.4.20"
md-5 = "0.10.6"
miette = { version = "5.10.0", features = ["fancy"] }
miette = { version = "7.0.0", features = ["fancy"] }
parse_int = { version = "0.6.0", optional = true }
regex = { version = "1.9.6", optional = true }
rppal = { version = "0.14.1", optional = true }
serde = { version = "1.0.188", features = ["derive"] }
serialport = { version = "4.2.2", optional = true }
regex = { version = "1.10.3", optional = true }
rppal = { version = "0.17.1", optional = true }
serde = { version = "1.0.196", features = ["derive"] }
serialport = { version = "4.3.0", optional = true }
sha2 = "0.10.8"
slip-codec = "0.3.4"
strum = { version = "0.25.0", features = ["derive"] }
thiserror = "1.0.49"
toml = "0.8.2"
slip-codec = "0.4.0"
strum = { version = "0.26.1", features = ["derive"] }
thiserror = "1.0.56"
toml = "0.8.10"
update-informer = { version = "1.1.0", optional = true }
xmas-elf = "0.9.0"
xmas-elf = "0.9.1"
[target.'cfg(unix)'.dependencies]
libc = "0.2.101"
libc = "0.2.153"
[features]
default = ["cli", "serialport"]

View File

@ -3,7 +3,7 @@
[![Crates.io](https://img.shields.io/crates/v/espflash?labelColor=1C2C2E&color=C96329&logo=Rust&style=flat-square)](https://crates.io/crates/espflash)
[![docs.rs](https://img.shields.io/docsrs/espflash?labelColor=1C2C2E&color=C96329&logo=rust&style=flat-square)](https://docs.rs/espflash)
![MSRV](https://img.shields.io/badge/MSRV-1.70-blue?labelColor=1C2C2E&logo=Rust&style=flat-square)
![MSRV](https://img.shields.io/badge/MSRV-1.73-blue?labelColor=1C2C2E&logo=Rust&style=flat-square)
![Crates.io](https://img.shields.io/crates/l/espflash?labelColor=1C2C2E&style=flat-square)
A library and command-line tool for flashing Espressif devices.
@ -27,7 +27,7 @@ Supports the **ESP32**, **ESP32-C2/C3/C6**, **ESP32-H2**, **ESP32-P4**, and **ES
## Installation
If you are installing `espflash` from source (ie. using `cargo install`) then you must have `rustc>=1.70.0` installed on your system.
If you are installing `espflash` from source (ie. using `cargo install`) then you must have `rustc>=1.73.0` installed on your system.
If you are running **macOS** or **Linux** then [libuv] must also be installed; this is available via most popular package managers. If you are running **Windows** you can ignore this step.

View File

@ -21,7 +21,7 @@ use crossterm::{
};
use log::error;
use miette::{IntoDiagnostic, Result};
use strum::{Display, EnumIter, EnumString, EnumVariantNames};
use strum::{Display, EnumIter, EnumString, VariantNames};
use crate::{
cli::monitor::parser::{InputParser, ResolvingPrinter},
@ -35,7 +35,7 @@ mod line_endings;
mod symbols;
#[cfg_attr(feature = "cli", derive(clap::ValueEnum))]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Display, EnumIter, EnumString, EnumVariantNames)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Display, EnumIter, EnumString, VariantNames)]
#[non_exhaustive]
#[strum(serialize_all = "lowercase")]
pub enum LogFormat {

View File

@ -5,7 +5,7 @@ use std::{io, os::fd::AsRawFd};
use std::{thread::sleep, time::Duration};
use log::debug;
use strum::{Display, EnumIter, EnumString, EnumVariantNames};
use strum::{Display, EnumIter, EnumString, VariantNames};
use crate::{
command::{Command, CommandType},
@ -311,7 +311,7 @@ pub fn construct_reset_strategy_sequence(
#[cfg_attr(feature = "cli", derive(clap::ValueEnum))]
#[derive(
Debug, Default, Clone, Copy, PartialEq, Eq, Display, EnumIter, EnumString, EnumVariantNames,
Debug, Default, Clone, Copy, PartialEq, Eq, Display, EnumIter, EnumString, VariantNames,
)]
#[non_exhaustive]
#[strum(serialize_all = "lowercase")]
@ -332,7 +332,7 @@ pub enum ResetBeforeOperation {
#[cfg_attr(feature = "cli", derive(clap::ValueEnum))]
#[derive(
Debug, Default, Clone, Copy, PartialEq, Eq, Display, EnumIter, EnumString, EnumVariantNames,
Debug, Default, Clone, Copy, PartialEq, Eq, Display, EnumIter, EnumString, VariantNames,
)]
#[non_exhaustive]
pub enum ResetAfterOperation {

View File

@ -212,6 +212,11 @@ pub enum Error {
#[diagnostic(code(espflash::verify_failed))]
VerifyFailed,
#[cfg(feature = "cli")]
#[error(transparent)]
#[diagnostic(code(espflash::dialoguer_error))]
DialoguerError(#[from] dialoguer::Error),
#[error("Internal Error")]
InternalError,
}

View File

@ -21,7 +21,8 @@ use miette::{Context, IntoDiagnostic, Result};
use serde::{Deserialize, Serialize};
#[cfg(feature = "serialport")]
use serialport::UsbPortInfo;
use strum::{Display, EnumIter, EnumVariantNames};
use strum::IntoEnumIterator;
use strum::{Display, EnumIter, VariantNames};
use self::stubs::FlashStub;
use crate::{
@ -54,17 +55,7 @@ const EXPECTED_STUB_HANDSHAKE: &str = "OHAI";
/// Note that not all frequencies are supported by each target device.
#[cfg_attr(feature = "cli", derive(clap::ValueEnum))]
#[derive(
Debug,
Default,
Clone,
Copy,
Hash,
PartialEq,
Eq,
Display,
EnumVariantNames,
Serialize,
Deserialize,
Debug, Default, Clone, Copy, Hash, PartialEq, Eq, Display, VariantNames, Serialize, Deserialize,
)]
#[non_exhaustive]
#[repr(u8)]
@ -111,7 +102,7 @@ impl FlashFrequency {
/// Supported flash modes
#[cfg_attr(feature = "cli", derive(clap::ValueEnum))]
#[derive(Copy, Clone, Debug, Default, EnumVariantNames, Serialize, Deserialize)]
#[derive(Copy, Clone, Debug, Default, VariantNames, Serialize, Deserialize)]
#[non_exhaustive]
#[strum(serialize_all = "lowercase")]
pub enum FlashMode {
@ -138,7 +129,7 @@ pub enum FlashMode {
Eq,
PartialEq,
Display,
EnumVariantNames,
VariantNames,
EnumIter,
Serialize,
Deserialize,
@ -240,7 +231,6 @@ impl FromStr for FlashSize {
type Err = Error;
/// Create a [FlashSize] from a string
fn from_str(s: &str) -> Result<Self, Self::Err> {
use strum::{IntoEnumIterator, VariantNames};
let upper = s.to_uppercase();
FlashSize::VARIANTS
.iter()

View File

@ -8,7 +8,7 @@ use std::collections::HashMap;
use esp_idf_part::{AppType, DataType, Partition, PartitionTable, SubType, Type};
use serde::{Deserialize, Serialize};
use strum::{Display, EnumIter, EnumString, EnumVariantNames};
use strum::{Display, EnumIter, EnumString, VariantNames};
#[cfg(feature = "serialport")]
use self::flash_target::{FlashTarget, MAX_RAM_BLOCK_SIZE};
@ -50,17 +50,7 @@ mod flash_target;
/// Note that not all frequencies are supported by each target device.
#[cfg_attr(feature = "cli", derive(clap::ValueEnum))]
#[derive(
Debug,
Default,
Clone,
Copy,
Hash,
PartialEq,
Eq,
Display,
EnumVariantNames,
Serialize,
Deserialize,
Debug, Default, Clone, Copy, Hash, PartialEq, Eq, Display, VariantNames, Serialize, Deserialize,
)]
#[non_exhaustive]
#[repr(u32)]
@ -94,7 +84,7 @@ impl XtalFrequency {
/// All supported devices
#[cfg_attr(feature = "cli", derive(clap::ValueEnum))]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Display, EnumIter, EnumString, EnumVariantNames)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Display, EnumIter, EnumString, VariantNames)]
#[non_exhaustive]
#[strum(serialize_all = "lowercase")]
pub enum Chip {