Skip to content

Use gix for cargo package #15534

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Byron
Copy link
Member

@Byron Byron commented May 16, 2025

This should also help fixing these spurious "cannot package because some excluded file is untracked" issues.

Tasks

  • step-by-step conversion of vcs.rs
  • use proper feature toggle
  • cleanup

@rustbot rustbot added A-git Area: anything dealing with git Command-package labels May 16, 2025
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for kicking of this!

Regardless the approach taken here. I wonder if it is possible to avoid checking repo state completely. In PathSource::list_files we already walked through it. And maybe we can attach extra info in PathEntry. Of course it'll slow down list_files a bit, but with that we could perhaps resolve #14941?.

It is just a bit relevant to this PR though. We can still merge this when ready.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's about time I get started with this - this setup here is super-hacky, but it's designed to allow a very step-wise conversion, hopefully allowing to work on it 15 minutes at a time.

Regarding #14941, I hope with #14955 I have found a representative issue. Right now I can't tell how that should be solved, so I'd probably go for having a gitoxide alternative for cargo package here and tackle the related issues another time. Ideally, the new implementation will be a bit faster and I hope I can test that on the aws-sdk-rust repository.

Copy link
Member Author

@Byron Byron May 17, 2025

Choose a reason for hiding this comment

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

I couldn't resist to profile the aws-sdk-rust publishing step in Cargo and here is a picture of the run so far.

Screenshot 2025-05-17 at 12 54 31 Screenshot 2025-05-17 at 12 55 45

I don't know if this will ever finish, and I don't know how they can even get this published, maybe it just takes a very long time.

The culprit, maybe among other things, may be repo.status_file() calls for which there isn't an equivalent in gitoxide anyway. Thus I think this will look very differently when this PR is done and maybe that's an avenue for aws-sdk-rust to publish much faster.

I will definitely test that once it's working and share results :).

Copy link
Member

Choose a reason for hiding this comment

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

Oops I linked to the wrong issue. Was meant to say #14955

@Byron Byron force-pushed the gix-status-for-cargo-package branch from 5f3986e to 085cb8a Compare May 17, 2025 12:09
This should also help fixing these spurious "cannot package because
some excluded file is untracked" issues.
@Byron Byron force-pushed the gix-status-for-cargo-package branch from 085cb8a to 7a409fd Compare May 17, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-git Area: anything dealing with git Command-package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants