Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile with cli feature disabled #555

Closed
wants to merge 2 commits into from

Conversation

haileys
Copy link
Contributor

@haileys haileys commented Jan 19, 2024

espflash does not currently compile with the cli feature disabled. This PR fixes that

Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

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

Hi! Thanks for the fix! We should probably think about adding checks in CI to verify that this does not happen again in the future. Do you mind changing the parse_partition_table from cli mod to flasher in cargo-espflash main.rs?:

--- a/cargo-espflash/src/main.rs
+++ b/cargo-espflash/src/main.rs
@@ -9,13 +9,13 @@ use clap::{Args, CommandFactory, Parser, Subcommand};
 use espflash::{
     cli::{
         self, board_info, checksum_md5, completions, config::Config, connect, erase_flash,
-        erase_partitions, erase_region, flash_elf_image, monitor::monitor, parse_partition_table,
-        partition_table, print_board_info, save_elf_as_image, serial_monitor, ChecksumMd5Args,
-        CompletionsArgs, ConnectArgs, EraseFlashArgs, EraseRegionArgs, EspflashProgress,
-        FlashConfigArgs, MonitorArgs, PartitionTableArgs,
+        erase_partitions, erase_region, flash_elf_image, monitor::monitor, partition_table,
+        print_board_info, save_elf_as_image, serial_monitor, ChecksumMd5Args, CompletionsArgs,
+        ConnectArgs, EraseFlashArgs, EraseRegionArgs, EspflashProgress, FlashConfigArgs,
+        MonitorArgs, PartitionTableArgs,
     },
     error::Error as EspflashError,
-    flasher::{FlashData, FlashSettings},
+    flasher::{parse_partition_table, FlashData, FlashSettings},
     image_format::ImageFormatKind,
     logging::initialize_logger,
     targets::Chip,

@SergioGasquez
Copy link
Member

Also, just noticed that the builds also fails for cargo build --no-default-features that is, with no cli and no serialport feature. Would you like to take a look at this, or should I take over?

@SergioGasquez
Copy link
Member

Fixed in #565

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