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

feat: add a progress bar for source ( git ) dependencies #2898

Merged
merged 15 commits into from
Jan 16, 2025

Conversation

nichmor
Copy link
Contributor

@nichmor nichmor commented Jan 14, 2025

Overview

Adding progress bar for source ( git ) operations.

This is how it looks when solving metadata for source dependencies.

new-git-pb.mov

How to test it?

You can add these git dependencies in our examples/pixi-build/cpp-sdl/pixi.toml [dependencies]

boost-check = { git = "https://github.com/nichmor/pixi-build-examples", branch = "main", subdirectory = "boost-check" }
bzip2 = { git = "https://github.com/wolfv/pixi-build-examples", branch = "main", subdirectory = "build-recipe/recipes/bzip2" }

and run pixi install.

If you want to take a look again, please remove cache, git cache, and pixi.lock so retrieving metadata will start again.

@nichmor nichmor marked this pull request as ready for review January 14, 2025 11:02
@nichmor nichmor requested a review from baszalmstra January 14, 2025 11:03
Copy link
Contributor

@baszalmstra baszalmstra left a comment

Choose a reason for hiding this comment

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

The reporter that you pass in now is very specific to git. In the future when we also fetch source archives via URLs we might want something similar.

I also think we might want to have a reporter per clone instead of one progress bar for all the git clones?

The reporter also doesnt actually report any progress other than start and finish. Is there not a way to get more fain grained progress?

crates/pixi_utils/src/prefix_guard.rs Outdated Show resolved Hide resolved
examples/pixi-build/cpp-sdl/pixi.toml Outdated Show resolved Hide resolved
src/build/mod.rs Outdated Show resolved Hide resolved
src/environment.rs Outdated Show resolved Hide resolved
@nichmor
Copy link
Contributor Author

nichmor commented Jan 14, 2025

The reporter that you pass in now is very specific to git. In the future when we also fetch source archives via URLs we might want something similar.

I also think we might want to have a reporter per clone instead of one progress bar for all the git clones?

The reporter also doesnt actually report any progress other than start and finish. Is there not a way to get more fain grained progress?

I sticked to the same trait definition as uv ( having only on checkout _start and _finish ).
We are using mostly git from subprocess, so I don't have a good view of how we could report this progress

@nichmor nichmor changed the title feat: add a progress bar for git dependencies feat: add a progress bar for source ( git ) dependencies Jan 15, 2025
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

This looks good to me, and I like the output!

I've not touched the progress bars myself so maybe good to let @baszalmstra review this technically.

crates/pixi_git/src/resolver.rs Outdated Show resolved Hide resolved
nichmor and others added 2 commits January 16, 2025 11:06
Co-authored-by: Bas Zalmstra <zalmstra.bas@gmail.com>
@baszalmstra baszalmstra merged commit 6a102f7 into prefix-dev:main Jan 16, 2025
28 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