-
Notifications
You must be signed in to change notification settings - Fork 138
Vendor dependencies #2883
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
base: main
Are you sure you want to change the base?
Vendor dependencies #2883
Conversation
This allows us to simplify the logic which ensures that we never depend on crate versions which are incompatible with our MSRV. It also avoids a performance bottleneck on our MSRV in which updating the crates.io index is very slow. gherrit-pr-id: Gd8dc83951469fd1467ddb65d2ac524b709fe9503
Summary of ChangesHello @joshlf, 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 implements a dependency vendoring strategy to enhance the project's reliability and build efficiency. By vendoring dependencies, the project gains better control over crate versions, ensuring compatibility with its MSRV, and mitigates performance issues associated with fetching from Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
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 vendors dependencies to address MSRV compatibility and to improve build performance by avoiding updates to the crates.io index. The approach taken is to use .cargo/config.toml files to redirect dependency resolution to local vendor directories, which is the standard method for vendoring in Cargo. The changes for the tools directory, including its own vendoring setup, appear correct and self-contained. However, there's a critical issue with the configuration at the root level that will likely break the build for the main crate.
| [source.crates-io] | ||
| replace-with = "vendored-sources" | ||
|
|
||
| [source.vendored-sources] | ||
| directory = "vendor" | ||
|
|
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 configuration file redirects Cargo to use a local vendor directory for crates.io dependencies. However, the corresponding vendor directory at the root of the repository is not included in this pull request. While the tools directory has its own tools/vendor directory added, the main crate's dependencies (especially the dev-dependencies that were unpinned in Cargo.toml) will not be found. This will cause builds and tests for the main zerocopy crate to fail.
Please either add the root vendor directory or remove this configuration file if it's not intended to be part of this change.
This allows us to simplify the logic which ensures that we never depend
on crate versions which are incompatible with our MSRV. It also avoids a
performance bottleneck on our MSRV in which updating the crates.io index
is very slow.