Commit graph

5 commits

Author SHA1 Message Date
Daniel Verkamp
a360baa819 Cargo.toml: upgrade protobuf 2.x -> 3.x
system_api bindings have been regenerated with protobuf 3.2; this should
be okay to land before the full ChromeOS system_api migration, since
crosvm always uses its own copy of the bindings rather than the ones
provided by the dev-rust/system_api package.

The protoc-rust crate is replaced with protobuf_codegen in 3.x.

BUG=b:277243607
BUG=b:279834784
TEST=tools/dev_container tools/presubmit

Change-Id: I6aad45ded2639d7506a7238800584bebab196455
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4405309
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
2023-04-28 19:32:01 +00:00
Maciek Swiech
a1e56e4420 proto_build_tools: dont fail silently
if the call to protoc_rust::Codegen::run() fails, it fails silently (or
rather, with a println! that is not displayed unless `cargo build` is
invoked more verbosely) which can result in errors later on during
compilation, making it hard to track the root cause. this change adds an
expect call to make the code panic on error.

however, due to various cfg and other changes, there can be the
expectation of an `out/generated.rs` file still existing when no protos
have been compiled, so we also add a quick guard for empty proto paths
in the generation code.

BUG=none
TEST=cargo build

Change-Id: If5a67a45a5de937b6569c1f631a180401b860cee
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4210068
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Maciek Swiech <drmasquatch@google.com>
2023-01-31 18:03:00 +00:00
Daniel Verkamp
ac0fc378a3 Fix remaining Chrome/Chromium OS instances
These should be written as ChromeOS and ChromiumOS (without the space)
to match the updated branding. The copyright headers were already
migrated to the new style (https://crrev.com/c/3894243), but there were
some more instances left over.

BUG=None
TEST=tools/cargo-doc

Change-Id: I8c76aea2eb33b2e370ab71ee9b5cc0a4cfd00585
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4129934
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-01-03 22:14:30 +00:00
Daniel Verkamp
dfe9869d6c Rust 1.65: Fix clippy borrow_deref_ref, needless_borrow, and explicit_auto_deref lints
BUG=b:260784028
TEST=tools/clippy

Change-Id: I85cd5e096bc7b977fe1d9b231c08338b65e71780
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4064714
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-11-30 19:33:31 +00:00
Noah Gold
232d47446c proto_build_tools: add crate for proto build tools.
In addition to DRYing out our proto code, we're switching to using
PathBufs to reduce the potential for cross platform errors.

BUG=b:256951877
TEST=builds

Change-Id: Ib7588de231afe67853c099e4f81683731b9439de
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4021590
Reviewed-by: Vikram Auradkar <auradkar@google.com>
2022-11-12 01:02:23 +00:00