-
Notifications
You must be signed in to change notification settings - Fork 3
Eim 310 git library change attempt #300
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
Conversation
Summary of ChangesHello @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 Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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.
625da7b to
e7bdd43
Compare
e7bdd43 to
bc96817
Compare
Fabricio-ESP
left a comment
There was a problem hiding this 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.
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 devis 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