Skip to content

Commit

Permalink
Use the vendored prost everywhere.
Browse files Browse the repository at this point in the history
This also introduces a `ProtoOptions` struct much like `CodegenOptions`,
so adding new options in the future is easier.

Note: this also needs to whitelist the ZLib license, as the dependency
graph now includes [`tinyvec`](https://github.com/Lokathor/tinyvec).
  • Loading branch information
wildarch committed Jul 3, 2020
1 parent ee8e601 commit 2eeb6a0
Show file tree
Hide file tree
Showing 13 changed files with 186 additions and 129 deletions.
1 change: 1 addition & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ allow = [
"ISC",
"MIT",
"OpenSSL",
"Zlib",
]

[[licenses.clarify]]
Expand Down
25 changes: 4 additions & 21 deletions examples/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ trusted_information_retrieval_client = { path = "trusted_information_retrieval/c
# Third party.
expect = { path = "../third_party/expect" }
roughenough = { path = "../third_party/roughenough" }
prost = { path = "../third_party/prost" }
prost-build = { path = "../third_party/prost/prost-build" }
prost-derive = { path = "../third_party/prost/prost-derive" }
prost-types = { path = "../third_party/prost/prost-types" }
53 changes: 18 additions & 35 deletions oak/server/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions oak/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ oak_runtime = { path = "rust/oak_runtime" }
oak_utils = { path = "../../oak_utils" }
# Third party.
roughenough = { path = "../../third_party/roughenough" }
prost = { path = "../../third_party/prost" }
prost-derive = { path = "../../third_party/prost/prost-derive" }
prost-build = { path = "../../third_party/prost/prost-build" }
prost-types = { path = "../../third_party/prost/prost-types" }
12 changes: 2 additions & 10 deletions oak_abi/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions oak_abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ prost-types = "*"
[build-dependencies]
oak_utils = { path = "../oak_utils" }
prost-build = "*"

[patch.crates-io]
prost-build = { path = "../third_party/prost/prost-build" }
prost = { path = "../third_party/prost" }
prost-types = { path = "../third_party/prost/prost-types" }
12 changes: 9 additions & 3 deletions oak_abi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
// limitations under the License.
//

// Keep clippy from complaining about a needless call to `Default::default()`.
#[allow(clippy::needless_update)]
fn main() {
// Exclude generation of service code, as it would require a reference to the Oak SDK to
// compile.
oak_utils::compile_protos_without_services(
oak_utils::compile_protos_with_options(
&[
"../oak/proto/application.proto",
"../oak/proto/grpc_encap.proto",
Expand All @@ -29,5 +29,11 @@ fn main() {
"../third_party/google/rpc/status.proto",
],
&[".."],
oak_utils::ProtoOptions {
// Exclude generation of service code, as it would require a reference to the Oak SDK to
// compile.
generate_services: false,
..Default::default()
},
);
}
12 changes: 2 additions & 10 deletions oak_utils/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions oak_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ tonic-build = { version = "*", default-features = false, features = [
"prost",
"transport"
] }

[patch.crates-io]
prost-build = { path = "../third_party/prost/prost-build" }
prost = { path = "../third_party/prost" }
Loading

0 comments on commit 2eeb6a0

Please sign in to comment.