Skip to content

Conversation

@Hahihula
Copy link
Collaborator

@Hahihula Hahihula commented Dec 8, 2025

This update has two downsides and two upgrades.
One downside is that users loose the visibility of the clonning process. No progress reporting avalible as the library does not expose the progress information.
Second downside is that the comand cargo tauri dev is now unusable so the developers loose the live reload capabilities as the tauri debug conector colides with the library.
The first bright side is that now the installation is much quicker and second that the size of the offline archives was reduced from 3.5GB to ~1.6GB

@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 represents a significant work-in-progress effort to refactor the application's core Git functionality by replacing the git2 library with gix. The primary objective is to modernize the Git interaction, potentially enhancing performance and maintainability, while also ensuring reliability through a fallback to the native git CLI. The changes involve extensive dependency updates, a complete overhaul of the Git cloning and submodule update logic, and necessary adjustments to the Tauri application's asynchronous environment to integrate the new library effectively.

Highlights

  • Git Library Migration: The application's Git interaction layer has been migrated from the git2 library to gix, a pure-Rust Git implementation, aiming for improved performance and compatibility.
  • Dependency Updates: Numerous Rust crate dependencies in Cargo.lock and Cargo.toml have been updated to support the new gix library and enable additional features for reqwest and tauri.
  • Enhanced Git Operations: New functions for cloning and submodule updates have been implemented using gix, incorporating shallow cloning and a robust fallback mechanism to the native git CLI for fetching single commits.
  • Tauri Integration Adjustments: The Tauri application's asynchronous runtime has been adapted to properly handle gix's blocking network transport by moving Git operations to a dedicated blocking thread.
  • Improved Error Handling and Logging: Error handling for Git operations now uses a more generic string-based approach, and logging verbosity has been increased to Trace for relevant modules to aid debugging.
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

This pull request primarily refactors the Git operations from the git2 crate to the gix crate, along with related dependencies and error handling. The Cargo.lock and Cargo.toml files reflect this change with numerous new gix-related dependencies and updates to existing ones like rustix, thiserror, libc, serde, and tempfile. The idf_im_lib now uses gix for cloning repositories and handling submodules, implementing a new fetch_single_commit strategy that attempts gix first and falls back to the git CLI for fetching specific commits, including progress parsing from the CLI output. The handle_download_error function in src/cli/wizard.rs was updated to handle generic string errors instead of git2::Error. In src/gui/commands/installation.rs, the Git clone operation is now wrapped in std::thread::spawn().join().unwrap() and recurse_submodules is temporarily disabled, with the previous detailed progress monitoring thread commented out. Additionally, a temporary gix clone test was added to src/gui/mod.rs for debugging purposes, and log levels were changed to Trace. Review comments highlight the blocking nature of std::thread::spawn().join().unwrap() in an async context, suggesting tokio::task::spawn_blocking instead, and point out the regression in progress monitoring due to the commented-out thread. The review also recommends removing the temporary gix test code and reverting the log levels from Trace to Info for production builds.

@Hahihula Hahihula force-pushed the EIM-310-git-library-change-attempt branch from 625da7b to e7bdd43 Compare December 9, 2025 08:09
@Hahihula Hahihula changed the title WIP: Eim 310 git library change attempt Eim 310 git library change attempt Dec 9, 2025
@Hahihula Hahihula force-pushed the EIM-310-git-library-change-attempt branch from e7bdd43 to bc96817 Compare December 9, 2025 08:15
Copy link
Collaborator

@Fabricio-ESP Fabricio-ESP left a comment

Choose a reason for hiding this comment

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

Confirmed working. Able to build sample project on Windows, MacOS and Ubuntu, without the need to download submodules history.

@Hahihula Hahihula merged commit 8c959b8 into master Dec 12, 2025
34 of 54 checks passed
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.

3 participants