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

fix: generate Name::full_name properly #923

Merged
merged 1 commit into from Sep 25, 2023

Conversation

NBonaparte
Copy link
Contributor

full_name() seems to generate the full name in the wrong order (given the examples in the doc comments, TypeName.google.protobuf instead of google.protobuf.TypeName).

@LucioFranco LucioFranco merged commit 97cd4e2 into tokio-rs:master Sep 25, 2023
11 checks passed
@tarcieri
Copy link
Contributor

tarcieri commented Oct 3, 2023

Would it be possible to get a point release with this?

tony-iqlusion added a commit to cosmos/cosmos-rust that referenced this pull request Oct 3, 2023
The `Name` trait added upstream in `prost` can be used to compute the
type URL using `Name::type_url`:

tokio-rs/prost#896

The new `Any::{from_msg, to_msg}` methods can be used to serialize
`Message` types to/from messages.

This commit switches from the `TypeUrl` trait to `Name` and relies
more on upstream functionality in `prost`.

Unfortunately it shipped with a bug in the default `Name::full_name`
method, so a workaround is temporarily used until a fix ships:

tokio-rs/prost#923
tony-iqlusion added a commit to cosmos/cosmos-rust that referenced this pull request Oct 3, 2023
The `Name` trait added upstream in `prost` can be used to compute the
type URL using `Name::type_url`:

tokio-rs/prost#896

The new `Any::{from_msg, to_msg}` methods can be used to serialize
`Message` types to/from messages.

This commit switches from the `TypeUrl` trait to `Name` and relies
more on upstream functionality in `prost`.

Unfortunately it shipped with a bug in the default `Name::full_name`
method, so a workaround is temporarily used until a fix ships:

tokio-rs/prost#923
tony-iqlusion added a commit to cosmos/cosmos-rust that referenced this pull request Oct 3, 2023
The `Name` trait added upstream in `prost` can be used to compute the
type URL using `Name::type_url`:

tokio-rs/prost#896

The new `Any::{from_msg, to_msg}` methods can be used to serialize
`Message` types to/from messages.

This commit switches from the `TypeUrl` trait to `Name` and relies
more on upstream functionality in `prost`.

Unfortunately it shipped with a bug in the default `Name::full_name`
method, so a workaround is temporarily used until a fix ships:

tokio-rs/prost#923
felipepimsil pushed a commit to felipepimsil/cosmos-rust that referenced this pull request Dec 18, 2023
The `Name` trait added upstream in `prost` can be used to compute the
type URL using `Name::type_url`:

tokio-rs/prost#896

The new `Any::{from_msg, to_msg}` methods can be used to serialize
`Message` types to/from messages.

This commit switches from the `TypeUrl` trait to `Name` and relies
more on upstream functionality in `prost`.

Unfortunately it shipped with a bug in the default `Name::full_name`
method, so a workaround is temporarily used until a fix ships:

tokio-rs/prost#923
renovate bot added a commit to smartive/zitadel-rust that referenced this pull request May 2, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [prost](https://togithub.com/tokio-rs/prost) | dependencies | patch |
`0.12` -> `0.12.4` |
| [prost-types](https://togithub.com/tokio-rs/prost) | dependencies |
patch | `0.12` -> `0.12.4` |

---

### Release Notes

<details>
<summary>tokio-rs/prost (prost)</summary>

###
[`v0.12.4`](https://togithub.com/tokio-rs/prost/releases/tag/v0.12.4)

[Compare
Source](https://togithub.com/tokio-rs/prost/compare/v0.12.3...v0.12.4)

*PROST!* is a [Protocol
Buffers](https://developers.google.com/protocol-buffers/) implementation
for the [Rust Language](https://www.rust-lang.org/). `prost` generates
simple, idiomatic Rust code from `proto2` and `proto3` files.

This patch update brings new features and fixes:

-   Bump MSRV to 1.70 (minimum supported Rust version)
- Rename cargo feature `prost-derive` to `derive`
([#&#8203;992](https://togithub.com/tokio-rs/prost/issues/992))
- Add [@&#8203;generated](https://togithub.com/generated) comment on top
of generated files
([#&#8203;935](https://togithub.com/tokio-rs/prost/issues/935))
- Optimize implementation of prost::Name when generated by prost-build
([#&#8203;956](https://togithub.com/tokio-rs/prost/issues/956))

##### Dependencies

- build(deps): Allow itertools 0.12
([#&#8203;948](https://togithub.com/tokio-rs/prost/issues/948))
- build(deps): Allow heck 0.5
([#&#8203;1012](https://togithub.com/tokio-rs/prost/issues/1012))
- build(deps): Allow multimap 0.10
([#&#8203;1013](https://togithub.com/tokio-rs/prost/issues/1013))

##### Documentation

- Improve protoc not found error message
([#&#8203;937](https://togithub.com/tokio-rs/prost/issues/937))
- build: Add development container config
([#&#8203;949](https://togithub.com/tokio-rs/prost/issues/949))
- docs: Fixed README typos
([#&#8203;952](https://togithub.com/tokio-rs/prost/issues/952) /
[#&#8203;967](https://togithub.com/tokio-rs/prost/issues/967) /
[#&#8203;970](https://togithub.com/tokio-rs/prost/issues/970))

##### Internal

- chore: Fix minimal versions
([#&#8203;920](https://togithub.com/tokio-rs/prost/issues/920))
- fix: fq_message_name should begin with one dot
([#&#8203;981](https://togithub.com/tokio-rs/prost/issues/981))
- improve encode_varint performance by bounding its loop
([#&#8203;940](https://togithub.com/tokio-rs/prost/issues/940))
- style: Remove duplicate function call
([#&#8203;989](https://togithub.com/tokio-rs/prost/issues/989))
- test: Improve test decode_varint_slow
([#&#8203;977](https://togithub.com/tokio-rs/prost/issues/977))
- chore: Add dep: prefix to feature dependencies
([#&#8203;919](https://togithub.com/tokio-rs/prost/issues/919))
- Minor clippy lint fixes.
([#&#8203;1006](https://togithub.com/tokio-rs/prost/issues/1006))
- chore: Use taiki-e/install-action to setup cargo-machete
([#&#8203;909](https://togithub.com/tokio-rs/prost/issues/909))
- chore: Remove which dependency.
([#&#8203;962](https://togithub.com/tokio-rs/prost/issues/962))
- chore: Update to actions/checkout@v4
([#&#8203;910](https://togithub.com/tokio-rs/prost/issues/910))

###
[`v0.12.3`](https://togithub.com/tokio-rs/prost/releases/tag/v0.12.3)

[Compare
Source](https://togithub.com/tokio-rs/prost/compare/v0.12.2...v0.12.3)

*PROST!* is a [Protocol
Buffers](https://developers.google.com/protocol-buffers/) implementation
for the [Rust Language](https://www.rust-lang.org/). `prost` generates
simple, idiomatic Rust code from `proto2` and `proto3` files.

This patch updates brings a few new fixes:

- [Fix code generation for Name trait
(](https://togithub.com/tokio-rs/prost/commit/acc1df83f73cda03c10722fbb739c7920b6b9048)[https://github.com/tokio-rs/prost/pull/944](https://togithub.com/tokio-rs/prost/pull/944)[)](https://togithub.com/tokio-rs/prost/commit/acc1df83f73cda03c10722fbb739c7920b6b9048)

###
[`v0.12.2`](https://togithub.com/tokio-rs/prost/releases/tag/v0.12.2)

[Compare
Source](https://togithub.com/tokio-rs/prost/compare/v0.12.1...v0.12.2)

*PROST!* is a [Protocol
Buffers](https://developers.google.com/protocol-buffers/) implementation
for the [Rust Language](https://www.rust-lang.org/). `prost` generates
simple, idiomatic Rust code from `proto2` and `proto3` files.

This patch updates brings a few new features and fixes:

- feat: Generate implementation for Name trait
([tokio-rs/prost#931)
- fix: generate Name::full_name properly
([tokio-rs/prost#923)

###
[`v0.12.1`](https://togithub.com/tokio-rs/prost/compare/v0.12.0...v0.12.1)

[Compare
Source](https://togithub.com/tokio-rs/prost/compare/v0.12.0...v0.12.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 9pm,before 6am" in timezone
Europe/Zurich, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/smartive/zitadel-rust).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMzEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjMzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants