Skip to content

Conversation

@criemen
Copy link
Collaborator

@criemen criemen commented Nov 13, 2024

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.

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.

@github-actions github-actions bot added Python Ruby Rust Pull requests that update Rust code labels Nov 13, 2024
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.
@criemen criemen force-pushed the criemen/rust-3rdparty branch from 73da749 to a66f820 Compare November 13, 2024 12:23
@criemen criemen marked this pull request as ready for review November 13, 2024 12:56
@criemen criemen requested review from a team as code owners November 13, 2024 12:56
Copy link
Contributor

@tausbn tausbn left a 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`
Copy link
Contributor

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. 🙂

Copy link
Collaborator Author

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.

Copy link
Contributor

@tausbn tausbn Nov 13, 2024

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.

Copy link
Collaborator Author

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.

@criemen criemen changed the title Rust: Vendor 3rdparty dependencies. Rust: Vendor build files for 3rdparty dependencies. Nov 14, 2024
Copy link
Member

@oscarsj oscarsj left a 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 :shipit:

@criemen criemen merged commit 3fdd35c into main Nov 14, 2024
20 checks passed
@criemen criemen deleted the criemen/rust-3rdparty branch November 14, 2024 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Python Ruby Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants