-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Migrate from git2
to gix
#531
Conversation
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.
This is awesome, thank you! I especially love the max-performance
feature name :)
Would you mind adding a comment near the gix
and tame-index
requirements that mentions the need to keep them in sync? Without such a comment, I think it's likely we'll forget to do that sooner or later and your wisdom will go to waste until rediscovered by re-reading this PR.
That'd be great! Unfortunately It might be possible to do by scanning the 3rd party crates directly to find which APIs had breaking changes, then separately scanning |
I hope for a future version of
Makes perfect sense and is now done. Please note that I just finished some compile-time optimization work which comes to effect only once |
I trust your judgment. I haven't looked too closely at what the tradeoff is, and I'm happy to do what you think is best. Excited to get
Either way is totally fine. I'm probably not going to manage to make another release before I head to RustConf next week, so waiting is fine and probably won't make any difference. But again, your call, I'm equally happy to wait or merge this as-is. |
Alright, then I will wait for |
Please note that I have removed the `max-performance-safe` feature which pushes the choice to the consumer of (any) library that uses `gix`. It's also causing less C to be compiled by default. ### Checklist * [x] I have read the [Contributor Guide](../../CONTRIBUTING.md) * [x] I have read and agree to the [Code of Conduct](../../CODE_OF_CONDUCT.md) * [x] I have added a description of my changes and why I'd like them included in the section below ### Description of Changes An upgrade to the latest `gix`, which includes less dependencies now and compiles a little faster because of it. It also avoids making decisions about performance (and the inclusion of C-crates) by removing the `max-performance-safe` feature. The motivation for this update is to get a new `tame-index` release for consumption in [this PR](obi1kenobi/cargo-semver-checks#531) so that it can also use the latest `gix` version without duplication. ### Related Issues None --------- Co-authored-by: Jake Shadle <[email protected]>
The CI failure seems to be unrelated. Probably it works when restarted. |
I am a bit puzzled about the reproducible CI error:
Maybe this isn't the switch to I downgraded |
The problem with CI I am running into is as follows:
CC @Jake-Shadle who might have an idea if Thanks everyone for their help. |
Our caching setup just uses the Thanks for all the work you've been doing here, and especially for debugging the problem! |
Ah with the wiped cache, some of the debugging code is causing the job to fail. Sorry about that! |
No worries at all, thanks for your help! Maybe it works now :). |
Evicted the cache again, re-running CI. |
I have seen it green once by the way :)! |
Ah, unfortunately it seems to have failed :( I don't think there's anything particularly unusual about our caching setup, so I'm wondering why other projects haven't run into this issue as well. Perhaps it's just a matter of time / upgrading to newer versions until they do as well? If so, we should probably flag this with whoever we think is best-positioned to contain the problem before it starts affecting other projects. Do you think this is more likely to be a |
Maybe it was a recent My suggestion is to remove the cache in this case and see if CI times are still acceptable or lower than the longest-running job. Then the added time due to the index clone might not even be noticeable. |
I opened #540 to check if the issue might be related to the use of Rust 1.67 in that test case. With that PR, we'll use Rust 1.70 versus stable (currently, Rust 1.72) as the versions we check, which might cause a change in the cache behavior. |
Seems like my guess was correct, the caching issue was related to Rust 1.67 and upgrading the job to 1.70 makes it pass both for cache hits and cache misses. Our next non-patch release will drop 1.67 support anyway, so I don't feel like we have to get to the bottom of it right now. Merging! Thanks for putting this together, much appreciated 🚀 |
Switch from
git2
togix
to increase performance and reduce compile times.tame-index
also usesgix
, which means that previously two differentgit
implementations were used. Now the implementation is unified, reducing the amount of dependencies.Please note that this also means that, to avoid duplication of
gix
in the tree, each timetame-index
is upgraded, one should validate that itsgix
dependency matches up with thegix
dependency used here.Tasks
tame-index
Measurements
Before the change:
After the change:
Why
gix
indicates breaking changes basically by defaultgix
usescargo smart-release
to handle setting manifest versions based on conventional git commit comments, and to release interconnected crates in the correct order, based on need. There is also the notion of safety-bumps, which means that the downstream will indicate breaking changes if an upstream crate indicates a breaking change. This is because some crates may re-export their dependencies, adding their API surface in the process. However, this isn't always the case and generally,gix
indicates breaking changes way more than it would have to. Wouldn't it be nice if breaking changes could be detected instead of assumed?I think it would be a dream if
cargo semver-check
could somehow be integrated into the release-process ofgix
so that safety-bumps could be done based on actual need. Thus far I didn't look into this as it's an optimization, but it would definitely be very, very nice to have. And I am just mentioning this here in case it's interesting or even inspiring.