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

Minor fix in query_bench set_nested_value benchmark: #630

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

osa1
Copy link
Member

@osa1 osa1 commented Apr 25, 2022

rebuild shallow clones the message and returns an updated message, so
return value should be used.

Thanks to @sigurdm for noticing this.

`rebuild` shallow clones the message and returns an updated message, so
return value should be used.

Thanks to @sigurdm for noticing this.
@osa1 osa1 requested a review from sigurdm April 25, 2022 10:58
Copy link
Collaborator

@sigurdm sigurdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

osa1 added a commit to osa1/protobuf.dart that referenced this pull request Apr 25, 2022
This catches issues like google#630 where we forgot to use return value of
`rebuild`. Since `rebuild` does not update in-place, forgetting to use
the return value is often a bug.

This adds `meta` as a dependency but it should not affect generated
code. We may also want to use `meta` in the future for things like:

- Annotating `GeneratedMessage` methods that are supposed to be used by
  the generated code with `@protected`.

- Annotating generated message classes with `@sealed`. This help with
  maintaining backwards compatibility when adding new members to
  generated messages or to `GeneratedMessage`.
osa1 added a commit to osa1/protobuf.dart that referenced this pull request Apr 25, 2022
This catches issues like google#630 where we forgot to use return value of
`rebuild`. Since `rebuild` does not update in-place, not using the
return value is often a bug.

This adds `meta` as a dependency but it should not affect generated
code. We may also want to use `meta` in the future for things like:

- Annotating `GeneratedMessage` methods that are supposed to be used by
  the generated code with `@protected`.

- Annotating generated message classes with `@sealed`. This help with
  maintaining backwards compatibility when adding new members to
  generated messages or to `GeneratedMessage`.
@osa1 osa1 merged commit 5731242 into google:master Apr 25, 2022
@osa1 osa1 deleted the query_bench_fix branch April 25, 2022 12:01
osa1 added a commit that referenced this pull request May 6, 2022
This catches issues like #630 where we forgot to use return value of
`rebuild`. Since `rebuild` does not update in-place, not using the
return value is often a bug.

This adds `meta` as a dependency but it should not affect generated
code. We may also want to use `meta` in the future for things like:

- Annotating `GeneratedMessage` methods that are supposed to be used by
  the generated code with `@protected`.

- Annotating generated message classes with `@sealed`. This help with
  maintaining backwards compatibility when adding new members to
  generated messages or to `GeneratedMessage`.
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.

2 participants