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

Refactor x/auth/client/utils/ #5555

Merged
merged 2 commits into from
Jan 24, 2020
Merged

Refactor x/auth/client/utils/ #5555

merged 2 commits into from
Jan 24, 2020

Conversation

alessio
Copy link
Contributor

@alessio alessio commented Jan 23, 2020

Packages named utils, common, or misc provide clients with no
sense of what the package contains. This makes it harder for
clients to use the package and makes it harder for maintainers
to keep the package focused. Over time, they accumulate dependencies
that can make compilation significantly and unnecessarily slower,
especially in large programs. And since such package names are
generic, they are more likely to collide with other packages
imported by client code, forcing clients to invent names to
distinguish them.

cit. https://blog.golang.org/package-names


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)

@alessio alessio force-pushed the alessio/tiny-package-syndrome branch from 83cb542 to ed62e75 Compare January 23, 2020 10:41
@alessio alessio marked this pull request as ready for review January 23, 2020 10:41
@alessio alessio added the R4R label Jan 23, 2020
Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

LGTM. Please use authclient alias in every package except auth

x/auth/client/errors.go Outdated Show resolved Hide resolved
x/bank/client/cli/tx.go Outdated Show resolved Hide resolved
x/bank/client/cli/tx.go Outdated Show resolved Hide resolved
x/bank/client/cli/tx.go Outdated Show resolved Hide resolved
x/bank/client/rest/tx.go Outdated Show resolved Hide resolved
x/distribution/client/rest/tx.go Outdated Show resolved Hide resolved
x/distribution/client/rest/tx.go Outdated Show resolved Hide resolved
x/distribution/client/rest/tx.go Outdated Show resolved Hide resolved
x/distribution/client/rest/tx.go Outdated Show resolved Hide resolved
x/genutil/client/cli/gentx.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

LGTM. Please use authclient alias in every package except auth

x/auth/types/errors.go Show resolved Hide resolved
x/auth/types/errors.go Show resolved Hide resolved
x/auth/types/errors.go Show resolved Hide resolved
x/gov/client/rest/tx.go Outdated Show resolved Hide resolved
x/gov/client/rest/tx.go Outdated Show resolved Hide resolved
x/upgrade/client/cli/tx.go Outdated Show resolved Hide resolved
x/upgrade/client/cli/tx.go Outdated Show resolved Hide resolved
x/upgrade/client/rest/tx.go Outdated Show resolved Hide resolved
x/upgrade/client/rest/tx.go Outdated Show resolved Hide resolved
x/upgrade/client/rest/tx.go Outdated Show resolved Hide resolved
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.

Please hold off on merging this until 0.38 is released and proto work is done on auth.

@alessio alessio added the S:blocked Status: Blocked label Jan 23, 2020
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 -- just fix the changelog 👍

CHANGELOG.md Outdated Show resolved Hide resolved
Packages named utils, common, or misc provide clients with no
sense of what the package contains. This makes it harder for
clients to use the package and makes it harder for maintainers
to keep the package focused. Over time, they accumulate dependencies
that can make compilation significantly and unnecessarily slower,
especially in large programs. And since such package names are
generic, they are more likely to collide with other packages
imported by client code, forcing clients to invent names to
distinguish them.

 cit. https://blog.golang.org/package-names
@alessio alessio force-pushed the alessio/tiny-package-syndrome branch from a0831c4 to a81d630 Compare January 24, 2020 00:31
@alessio alessio removed the S:blocked Status: Blocked label Jan 24, 2020
Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

ACK

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

@alessio alessio merged commit b647824 into master Jan 24, 2020
@alessio alessio deleted the alessio/tiny-package-syndrome branch January 24, 2020 16:40
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.

3 participants