Verify manager dependency installations and detect cargo dependencies - #5322
Conversation
There was a problem hiding this comment.
Pull request overview
Improves dependency installation diagnostics and Cargo dependency discovery.
Changes:
- Captures installer output and verifies installation results.
- Adds dynamic dependency command resolution and Cargo binary-directory detection.
- Simplifies Scoop and Vcpkg installation commands.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
CargoBinDirectoryTests.cs |
Tests Cargo directory discovery. |
Vcpkg.cs |
Simplifies Git installation command. |
Scoop.cs |
Simplifies dependency commands. |
Cargo.cs |
Adds Cargo dependency detection and resolution. |
ManagerDependency.cs |
Supports dynamic install commands. |
MissingDependencyDialog.axaml.cs |
Captures output and reports failures. |
MissingDependencyDialog.axaml |
Adds installer output display. |
lang_en.json |
Adds diagnostic messages. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
src/UniGetUI.PackageEngine.Tests/CargoBinDirectoryTests.cs:56
- This fixed probe name makes the test depend on the developer/runner environment: if that executable already exists on
PATHor under the currentCARGO_HOME, the initialAssert.Falsefails before the fixture redirectsCARGO_HOME. Generate a unique probe name so the test remains isolated.
string binaryName = OperatingSystem.IsWindows()
? "cargo-unigetui-detection-probe.exe"
: "cargo-unigetui-detection-probe";
src/UniGetUI.Avalonia/Views/DialogPages/MissingDependencyDialog.axaml.cs:166
- Cancel can be clicked while the command resolver is still running. In that window
_installProcessis null, soCancelInstallonly sets_canceled; when the resolver returns, this method still launches the installer before killing it. That can trigger elevation prompts or other side effects after the user canceled. Check_canceledbefore starting the process.
var (fileName, arguments) = await Task.Run(_dep.GetInstallCommand);
There was a problem hiding this comment.
🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉
Integration Details
{
"deliveryId": "1694aa50-a0c1-11f1-90c0-821a712439c3",
"headSha": "baa11ed84966ca52e1ee452cd4aca1066ece8ecd",
"reviewer": "copilot-pull-request-reviewer[bot]"
}Upstream-Commit: 20f3296 Upstream-PR: Devolutions#5322
Upstream-Commit: 20f3296 Upstream-PR: Devolutions#5322
This pull request introduces several improvements to the dependency installation experience, especially for Cargo-based package managers, and enhances error handling and diagnostics for missing dependencies. The main themes are improved process output handling, more robust dependency detection, and better user feedback during installation failures.
Dependency installation and diagnostics improvements:
The
MissingDependencyDialognow captures and displays the output from dependency installers in real time, showing the last lines of output in case of failure to help users diagnose issues. The dialog also provides clearer, more actionable error messages and retry options. (src/UniGetUI.Avalonia/Views/DialogPages/MissingDependencyDialog.axaml,src/UniGetUI.Avalonia/Views/DialogPages/MissingDependencyDialog.axaml.cs,src/Languages/lang_en.json)The
ManagerDependencystruct now supports a custom command resolver, allowing dependencies to specify how their install commands are constructed dynamically. This enables more flexible and accurate installation routines for dependencies. (src/UniGetUI.PackageEngine.Interfaces/ManagerDependency.cs)Cargo package manager enhancements:
PATHbut also by searching known Cargo bin directories, improving detection reliability. The logic for finding these directories is encapsulated in new helper methods, which are thoroughly unit tested. (src/UniGetUI.PackageEngine.Managers.Cargo/Cargo.cs,src/UniGetUI.PackageEngine.Tests/CargoBinDirectoryTests.cs)cargo-binstallandcargo-updateare installed and found more reliably. (src/UniGetUI.PackageEngine.Managers.Cargo/Cargo.cs)Minor improvements and fixes:
src/UniGetUI.PackageEngine.Managers.Scoop/Scoop.cs,src/UniGetUI.PackageEngine.Managers.Vcpkg/Vcpkg.cs)