Skip to content

Commit

Permalink
Merge #48 #51
Browse files Browse the repository at this point in the history
48: Add message and enum attributes r=neoeinstein a=horacimacias

This PR passes message and enum attribute options https://github.com/tokio-rs/prost/releases/tag/v0.11.6

51: build(deps): bump tokio from 1.24.1 to 1.25.0 in /example/build-with-buf r=neoeinstein a=dependabot[bot]

Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.1 to 1.25.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/tokio-rs/tokio/releases">tokio's releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.25.0</h2>
<h1>1.25.0 (January 28, 2023)</h1>
<h3>Fixed</h3>
<ul>
<li>rt: fix runtime metrics reporting (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/5330">#5330</a>)</li>
</ul>
<h3>Added</h3>
<ul>
<li>sync: add <code>broadcast::Sender::len</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/5343">#5343</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>fs: increase maximum read buffer size to 2MiB (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/5397">#5397</a>)</li>
</ul>
<p><a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/5330">#5330</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/5330">tokio-rs/tokio#5330</a>
<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/5343">#5343</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/5343">tokio-rs/tokio#5343</a>
<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/5397">#5397</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/5397">tokio-rs/tokio#5397</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/tokio-rs/tokio/commit/88b1eb54fb66461b9f3524f4b5316241a019279a"><code>88b1eb5</code></a> chore: prepare Tokio v1.25.0 release (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/5408">#5408</a>)</li>
<li><a href="https://github.com/tokio-rs/tokio/commit/1f50c57185d28a1d118adc22bf587541e3b7edcc"><code>1f50c57</code></a> metrics: fix <code>steal_count</code> docs, add <code>steal_operations</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/5330">#5330</a>)</li>
<li><a href="https://github.com/tokio-rs/tokio/commit/a18b3645f3b206eaa63200707422a4deaea984e8"><code>a18b364</code></a> chore: update year in LICENSE files (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/5402">#5402</a>)</li>
<li><a href="https://github.com/tokio-rs/tokio/commit/fe2dcb9453d6c7fbab0e32861c6bff65d77b172a"><code>fe2dcb9</code></a> io: increase <code>MAX_BUF</code> from 16384 to 2MiB (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/5397">#5397</a>)</li>
<li><a href="https://github.com/tokio-rs/tokio/commit/c90757f07a1b15d7e26a710003d8e98a83db1ffc"><code>c90757f</code></a> tests: condition unwinding tests on <code>cfg(panic = &quot;unwind&quot;)</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/5384">#5384</a>)</li>
<li><a href="https://github.com/tokio-rs/tokio/commit/f3f8e4f17fba222a3fe729a05c70e1dd99584e01"><code>f3f8e4f</code></a> chore: update nix to 0.26 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/5385">#5385</a>)</li>
<li><a href="https://github.com/tokio-rs/tokio/commit/42bec961894426ca5ce0b76105dda82c76dcd43c"><code>42bec96</code></a> Merge branch 'tokio-1.24.x' into master</li>
<li><a href="https://github.com/tokio-rs/tokio/commit/4f6a95badc181ff0fa3b8462350bf6cd45547792"><code>4f6a95b</code></a> chore: prepare Tokio v1.24.2 release</li>
<li><a href="https://github.com/tokio-rs/tokio/commit/3d33610ed2420111982e5a42c764761c9060e6ab"><code>3d33610</code></a> Merge branch 'tokio-1.20.x' into tokio-1.24.x</li>
<li><a href="https://github.com/tokio-rs/tokio/commit/38a9c6c1a5bc81ec0e44a73ea9ebbc682f4f2baf"><code>38a9c6c</code></a> Merge branch 'tokio-1.20.x' into master</li>
<li>Additional commits viewable in <a href="https://github.com/tokio-rs/tokio/compare/tokio-1.24.1...tokio-1.25.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.24.1&new-version=1.25.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` use these labels` will set the current labels as the default for future PRs for this repo and language
- ``@dependabot` use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- ``@dependabot` use these assignees` will set the current assignees as the default for future PRs for this repo and language
- ``@dependabot` use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/neoeinstein/protoc-gen-prost/network/alerts).

</details>

Co-authored-by: Horaci Macias <hmacias@avaya.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 24, 2023
3 parents 0571a5a + 038cd34 + f8a4609 commit 92b203d
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 25 deletions.
18 changes: 10 additions & 8 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions example/build-with-buf/Cargo.lock

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

4 changes: 2 additions & 2 deletions protoc-gen-prost-crate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ categories = ["encoding"]

[dependencies]
once_cell = "1.10.0"
prost-build = { version = ">=0.11.0, <0.11.2", default-features = false }
prost-types = { version = "0.11.0", default-features = false }
prost-build = { version = "0.11.6", default-features = false }
prost-types = { version = "0.11.6", default-features = false }
prost = { version = "0.11.0", default-features = false, features = ["std"] }
protoc-gen-prost = { version = "0.2.0", path = "../protoc-gen-prost" }
regex = { version = "1.5.5", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions protoc-gen-prost-serde/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ categories = ["encoding"]

[dependencies]
pbjson-build = "0.5.1"
prost-build = { version = ">=0.11.0, <0.11.2", default-features = false }
prost-types = { version = "0.11.0", default-features = false }
prost-build = { version = "0.11.6", default-features = false }
prost-types = { version = "0.11.6", default-features = false }
prost = { version = "0.11.0", default-features = false, features = ["std"] }
protoc-gen-prost = { version = "0.2.0", path = "../protoc-gen-prost" }
regex = { version = "1.5.5", default-features = false }
Expand Down
10 changes: 4 additions & 6 deletions protoc-gen-prost/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@ rust-version = "1.62"
readme = "README.md"
keywords = ["protobuf", "serialization", "prost"]
categories = ["encoding"]
exclude = [
"proto"
]
exclude = ["proto"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
once_cell = "1.10.0"
prost-build = { version = ">=0.11.0, <0.11.2", default-features = false }
prost-types = { version = "0.11.0", default-features = false }
prost = { version = "0.11.0", default-features = false, features = ["std"] }
prost-build = { version = "0.11.6", default-features = false }
prost-types = { version = "0.11.6", default-features = false }
prost = { version = "0.11.6", default-features = false, features = ["std"] }
regex = { version = "1.5.5", default-features = false }

[profile.release]
Expand Down
24 changes: 24 additions & 0 deletions protoc-gen-prost/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ struct ProstParameters {
extern_path: Vec<(String, String)>,
type_attribute: Vec<(String, String)>,
field_attribute: Vec<(String, String)>,
enum_attribute: Vec<(String, String)>,
message_attribute: Vec<(String, String)>,
compile_well_known_types: bool,
retain_enum_prefix: bool,
}
Expand All @@ -244,6 +246,12 @@ impl ProstParameters {
for (proto_path, attribute) in &self.field_attribute {
config.field_attribute(proto_path, attribute);
}
for (proto_path, attribute) in &self.enum_attribute {
config.enum_attribute(proto_path, attribute);
}
for (proto_path, attribute) in &self.message_attribute {
config.message_attribute(proto_path, attribute);
}

if self.compile_well_known_types {
config.compile_well_known_types();
Expand Down Expand Up @@ -323,6 +331,22 @@ impl ProstParameters {
prefix.to_string(),
module.replace(r"\,", ",").replace(r"\\", r"\"),
)),
Param::KeyValue {
param: "enum_attribute",
key: prefix,
value: module,
} => self.enum_attribute.push((
prefix.to_string(),
module.replace(r"\,", ",").replace(r"\\", r"\"),
)),
Param::KeyValue {
param: "message_attribute",
key: prefix,
value: module,
} => self.message_attribute.push((
prefix.to_string(),
module.replace(r"\,", ",").replace(r"\\", r"\"),
)),
_ => return Err(param),
}

Expand Down
8 changes: 3 additions & 5 deletions protoc-gen-tonic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ edition = "2021"
readme = "README.md"
keywords = ["protobuf", "serialization", "prost", "grpc", "tonic"]
categories = ["encoding"]
exclude = [
"proto"
]
exclude = ["proto"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
heck = "0.4.0"
prettyplease = "0.1.9"
prost-build = { version = ">=0.11.0, <0.11.2", default-features = false }
prost-types = { version = "0.11.0", default-features = false }
prost-build = { version = "0.11.6", default-features = false }
prost-types = { version = "0.11.6", default-features = false }
prost = { version = "0.11.0", default-features = false, features = ["std"] }
protoc-gen-prost = { version = "0.2.0", path = "../protoc-gen-prost" }
regex = { version = "1.5.5", default-features = false }
Expand Down

0 comments on commit 92b203d

Please sign in to comment.