Skip to content
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

chore: Move third-party proto files into their own module #20556

Merged
merged 4 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion buf.work.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
version: v1
directories:
- proto
- proto/third-party
- proto/vector
- lib/vector-core/proto
34 changes: 19 additions & 15 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ fn main() {

#[cfg(feature = "protobuf-build")]
{
println!("cargo:rerun-if-changed=proto/dd_trace.proto");
println!("cargo:rerun-if-changed=proto/dnstap.proto");
println!("cargo:rerun-if-changed=proto/ddsketch_full.proto");
println!("cargo:rerun-if-changed=proto/dd_metric.proto");
println!("cargo:rerun-if-changed=proto/google/pubsub/v1/pubsub.proto");
println!("cargo:rerun-if-changed=proto/google/rpc/status.proto");
println!("cargo:rerun-if-changed=proto/vector.proto");
println!("cargo:rerun-if-changed=proto/third-party/dnstap.proto");
println!("cargo:rerun-if-changed=proto/third-party/google/pubsub/v1/pubsub.proto");
println!("cargo:rerun-if-changed=proto/third-party/google/rpc/status.proto");
println!("cargo:rerun-if-changed=proto/vector/dd_metric.proto");
println!("cargo:rerun-if-changed=proto/vector/dd_trace.proto");
println!("cargo:rerun-if-changed=proto/vector/ddsketch_full.proto");
println!("cargo:rerun-if-changed=proto/vector/vector.proto");

// Create and store the "file descriptor set" from the compiled Protocol Buffers packages.
//
Expand All @@ -144,15 +144,19 @@ fn main() {
prost_build,
&[
"lib/vector-core/proto/event.proto",
"proto/dnstap.proto",
"proto/ddsketch_full.proto",
"proto/dd_metric.proto",
"proto/dd_trace.proto",
"proto/google/pubsub/v1/pubsub.proto",
"proto/google/rpc/status.proto",
"proto/vector.proto",
"proto/third-party/dnstap.proto",
"proto/vector/ddsketch_full.proto",
"proto/vector/dd_metric.proto",
"proto/vector/dd_trace.proto",
"proto/third-party/google/pubsub/v1/pubsub.proto",
"proto/third-party/google/rpc/status.proto",
"proto/vector/vector.proto",
],
&[
"proto/third-party",
"proto/vector",
"lib/vector-core/proto/",
],
&["proto/", "lib/vector-core/proto/"],
)
.unwrap();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/loki-logproto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn main() -> Result<()> {
"proto/stats.proto",
"proto/logproto.proto",
],
&["proto", "../../proto"],
&["proto", "../../proto/third-party"],
)?;
Ok(())
}
2 changes: 1 addition & 1 deletion lib/prometheus-parser/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn main() {
prost_build
.compile_protos(
&["proto/prometheus-remote.proto"],
&["proto", "../../proto"],
&["proto", "../../proto/third-party"],
)
.unwrap();
}
5 changes: 4 additions & 1 deletion lib/vector-core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ fn main() {
.protoc_arg("--experimental_allow_proto3_optional")
.btree_map(["."])
.bytes(["raw_bytes"])
.compile_protos(&["proto/event.proto"], &["proto", "../../proto"])
.compile_protos(
&["proto/event.proto"],
&["proto", "../../proto/third-party", "../../proto/vector"],
)
.unwrap();
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions proto/vector/buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.