-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rust: Vendor build files for 3rdparty dependencies. #17976
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
Conversation
We've been observing some performance issues using crate_universe on CI. Therefore, we're moving to vendor the auto-generated BUILD files in our repository. This should provide a nice speed boost, while getting rid of the complexity of the "rust cache" job we've been using when we had a lot of git dependencies. This PR includes a vendor script, and I'll put up a CI job internally that runs that vendor script on Cargo.toml and Cargo.lock changes, to check that the vendored files are in sync.
73da749 to
a66f820
Compare
tausbn
left a comment
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.
Python bits LGTM. 👍
| @@ -24,6 +24,7 @@ include = [ | |||
| [lib] | |||
| path = "bindings/rust/lib.rs" | |||
|
|
|||
| ## When updating these dependencies, run `misc/bazel/3rdparty/update_cargo_deps.sh` | |||
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 one gets a double comment! I assume there's no semantic significance. 🙂
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.
Does it? I tried to add the comment to every Cargo.toml file that contributes to an extractor build, with the exception of ql-for-ql, which we don't build with bazel.
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.
I meant compared to the other Cargo.toml file (edit: the one for plain tsg-python, not the tsp sub-package), where the added line starts with a single comment character. Sorry for the confusing wording.
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.
Ah, double shebang! Yeah that wasn't intentional, but shouldn't change anything either.
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.
LGTM, at least internally consistent - some of the Bazel workings might be lost to me but paths match, moved code makes sense, and bash scripts seem correct, so ![]()
We've been observing some performance issues using
crate_universeon CI. Therefore, we're moving to vendor the auto-generated BUILD files in our repository. This should provide a nice speed boost, while getting rid of the complexity of the "rust cache" job we've been using when we had a lot of git dependencies.This PR includes a vendor script, and I'll put up a CI job internally that runs that vendor script on
Cargo.tomlandCargo.lockchanges, to check that the vendored files are in sync.For rust on linux this saves >1min on CI, macos also ca. 1min, Windows 3min.
I assume similar time savings hold for Ruby, and a bit less for python.