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

ADR 023 Protobuf Naming and Versioning #6083

Merged
merged 25 commits into from
Jun 5, 2020
Merged

ADR 023 Protobuf Naming and Versioning #6083

merged 25 commits into from
Jun 5, 2020

Conversation

aaronc
Copy link
Member

@aaronc aaronc commented Apr 27, 2020

Description

In light of #6030 and our transition to Any, we can make our protobuf names just a bit more concise without going overboard and losing descriptiveness. We can also make our file organization a bit more standard so that clients have an easier time running codegen.


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@aaronc aaronc added T: ADR An issue or PR relating to an architectural decision record WIP labels Apr 27, 2020
@codecov
Copy link

codecov bot commented Apr 27, 2020

Codecov Report

Merging #6083 into master will decrease coverage by 0.89%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #6083      +/-   ##
==========================================
- Coverage   55.72%   54.83%   -0.90%     
==========================================
  Files         450      444       -6     
  Lines       27036    26771     -265     
==========================================
- Hits        15067    14681     -386     
- Misses      10886    11048     +162     
+ Partials     1083     1042      -41     

@aaronc aaronc added T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. T: Dev UX UX for SDK developers (i.e. how to call our code) S:proposed and removed WIP labels Apr 27, 2020
@aaronc aaronc marked this pull request as ready for review April 27, 2020 20:52
@aaronc aaronc added the R4R label Apr 27, 2020
@clevinson clevinson added this to the v0.39 milestone May 4, 2020
@aaronc aaronc requested a review from clevinson as a code owner May 7, 2020 14:48
@clevinson clevinson added T: Proto Breaking Protobuf breaking changes: generally don't do this! and removed T: Proto Breaking Protobuf breaking changes: generally don't do this! labels May 19, 2020
Copy link
Contributor

@clevinson clevinson left a comment

Choose a reason for hiding this comment

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

As someone relatively new to the SDK codebase, I'm finding most of these changes to be an improvement on readability.

I get that we can avoid this being #api-breaking by making use of type aliases, but it would be nice to have an explicit strategy for whether we plan to maintain these type aliases indefinitely, or if they would get deprecated at some later point (6 months / 1 year in the future?).

Also, it would be nice to clarify whether new modules should create the corresponding type aliases for legacy naming conventions, or if that is considered necessary. In my opinion, i'd rather only include aliases where absolutely necessary (for backwards compatiblity of existing modules).

docs/architecture/adr-023-protobuf-naming.md Outdated Show resolved Hide resolved
@clevinson clevinson mentioned this pull request May 19, 2020
8 tasks
client/keys/parse.go Outdated Show resolved Hide resolved
@aaronc
Copy link
Member Author

aaronc commented May 19, 2020

I get that we can avoid this being #api-breaking by making use of type aliases, but it would be nice to have an explicit strategy for whether we plan to maintain these type aliases indefinitely, or if they would get deprecated at some later point (6 months / 1 year in the future?).

Also, it would be nice to clarify whether new modules should create the corresponding type aliases for legacy naming conventions, or if that is considered necessary. In my opinion, i'd rather only include aliases where absolutely necessary (for backwards compatiblity of existing modules).

I don't have a strong preference here. As I've said in the ADR, I think Msg just ends up being noise for the .proto files. Maybe for the SDK it makes sense. But even for the SDK, Msg has never been very descriptive for me. If we want to denote an action, why don't we use "action", "operation", or "command"? The word "message" makes me thing of email and chat. And as I noted in the ADR, maybe just using a verb suffices...

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to write this up @aaronc. In principle, I agree with the bulk of the proposal. On the few things I don't understand or disagree with, I've commented on 👍

docs/architecture/adr-023-protobuf-naming.md Outdated Show resolved Hide resolved
docs/architecture/adr-023-protobuf-naming.md Outdated Show resolved Hide resolved
docs/architecture/adr-023-protobuf-naming.md Outdated Show resolved Hide resolved
docs/architecture/adr-023-protobuf-naming.md Outdated Show resolved Hide resolved
docs/architecture/adr-023-protobuf-naming.md Outdated Show resolved Hide resolved
@alexanderbez
Copy link
Contributor

I would like to get this merged. Anything I can help with @aaronc? Can you resolve any issues?

@aaronc
Copy link
Member Author

aaronc commented Jun 5, 2020

@alexanderbez just updated this. Can you take a look and see if it looks good to move forward?

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

ACK

@alexanderbez alexanderbez added the A:automerge Automatically merge PR once all prerequisites pass. label Jun 5, 2020
@mergify mergify bot merged commit 7eeb086 into master Jun 5, 2020
@mergify mergify bot deleted the aaronc/proto-naming branch June 5, 2020 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. S:proposed T: ADR An issue or PR relating to an architectural decision record T: Dev UX UX for SDK developers (i.e. how to call our code) T: Proto Breaking Protobuf breaking changes: generally don't do this! Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants