Skip to content

Conversation

@Hahihula
Copy link
Collaborator

@Hahihula Hahihula commented Jan 8, 2026

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @Hahihula, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the robustness of the offline installer by implementing more rigorous error handling and failure conditions. The installer will now correctly identify and report when critical steps, such as downloading Python wheels or processing specific ESP-IDF versions, fail. This prevents silent failures and ensures that the build process terminates with an error if an incomplete or non-functional installer would otherwise be produced, leading to a more reliable and predictable build outcome.

Highlights

  • Enhanced Error Handling for Wheel Downloads: The download_wheels_for_python_versions function now explicitly tracks failed Python versions and will return an error if all attempts to download wheels for the specified Python versions are unsuccessful. This prevents the installer from proceeding without necessary components.
  • Comprehensive Failure Tracking: A new failed_versions vector has been introduced in the main build process to keep track of any ESP-IDF versions that encounter issues during their processing, such as wheel download failures.
  • Robust Build Termination on Failure: The offline installer build process will now terminate with an error status if any ESP-IDF version fails to be processed. This ensures that incomplete or corrupted installers are not generated, providing clearer feedback on build integrity.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request aims to make the offline installer fail if it cannot download any Python wheels. The changes introduce logic to track failures during wheel downloads for different Python and ESP-IDF versions. If all Python wheel downloads fail for a given ESP-IDF version, that version is marked as failed. If any ESP-IDF version fails, the entire process now exits with an error code. This correctly implements the intended behavior.

However, I've found a few critical issues that will cause compilation errors, such as a non-mutable variable being modified and the use of an undefined system module. There's also a logic bug that would cause an error when no Python versions are specified for wheel generation, and a minor issue with an unused import. I've provided suggestions to fix these issues.

};

// ITERATE OVER EACH VERSION AND BUILD SEPARATE ARCHIVE
let failed_versions = vec![];

Choose a reason for hiding this comment

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

critical

The failed_versions vector is modified later in the code (e.g., line 681), so it needs to be declared as mutable. This will cause a compilation error as it is.

Suggested change
let failed_versions = vec![];
let mut failed_versions = vec![];

return;
} else {
error!("Some versions failed to process: {:?}", failed_versions);
system.exit(1);

Choose a reason for hiding this comment

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

critical

The system alias is not defined. This will cause a compilation error. You should use std::process::exit(1) directly.

Suggested change
system.exit(1);
std::process::exit(1);

Comment on lines +322 to +329
if versions_failed.len() >= python_versions.len() {
Err(format!(
"Failed to download wheels for Python versions: {:?}",
versions_failed.join(", ")
))
} else {
Ok(())
}

Choose a reason for hiding this comment

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

high

There are a couple of issues with this error handling logic:

  1. Edge Case with Empty python_versions: If python_versions is empty, versions_failed.len() will be 0, and python_versions.len() will also be 0. The condition 0 >= 0 will be true, causing the function to incorrectly return an error when it should succeed.
  2. Error Message Formatting: The format specifier {:?} is used with versions_failed.join(", "), which returns a String. This will wrap the list of versions in quotes in the final error message (e.g., "3.10, 3.11"). Using {} would be more appropriate for cleaner output.

I suggest modifying the condition to handle the empty case correctly and adjusting the format specifier. It's also good practice to check if versions_failed is not empty before comparing lengths.

Suggested change
if versions_failed.len() >= python_versions.len() {
Err(format!(
"Failed to download wheels for Python versions: {:?}",
versions_failed.join(", ")
))
} else {
Ok(())
}
if !versions_failed.is_empty() && versions_failed.len() == python_versions.len() {
Err(format!(
"Failed to download wheels for all specified Python versions: {}",
versions_failed.join(", ")
))
} else {
Ok(())
}

use log::error;
use log::info;
use log::warn;
use tauri::http::version;

Choose a reason for hiding this comment

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

medium

This import of tauri::http::version appears to be unused in the file and can be removed to keep the code clean.

@Hahihula Hahihula force-pushed the EIM-395-offline-installer-builder-now-fails-if-no-wheels branch from a543591 to 40780fb Compare January 8, 2026 15:03
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