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

Bump dependency on newer cosmos-sdk #1106

Merged
merged 1 commit into from
May 17, 2020
Merged

Bump dependency on newer cosmos-sdk #1106

merged 1 commit into from
May 17, 2020

Conversation

michaelfig
Copy link
Member

Update to newer cosmos-sdk Golang API.

@michaelfig michaelfig requested a review from kriskowal May 13, 2020 23:39
Copy link
Member

@kriskowal kriskowal left a comment

Choose a reason for hiding this comment

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

With a recommendation to embrace the application’s global scope until the layers we’re building upon give us the option of using a third-party dependency injection system like go.uber.org/fx or google’s wire.

@@ -497,6 +498,19 @@ func (app *AgoricApp) SimulationManager() *module.SimulationManager {
return app.sm
}

// MakeCodecs constructs the *std.Codec and *codec.Codec instances used by
Copy link
Member

Choose a reason for hiding this comment

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

This constructor is maintaining a global registry. Would it be safer to construct codecs in an init func and expose the single app codec in global scope? As much as I dislike building atop the global registry pattern, I think it would be safer to have globals than having a function that can only be safely called once.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for your comment.

I don't like ignoring these valuable insights, but I feel like my hands are tied. I'm merging changes directly from the Gaia repo (https://github.com/cosmos/gaia) so that I'm prepared to merge future changes without much effort, too.

If you want to file an issue there describing your suggestion and motivation from a seasoned Golang programmer's perspective, that could have some impact since they tend to refactor things every few weeks.

@michaelfig michaelfig merged commit fdac401 into master May 17, 2020
@michaelfig michaelfig deleted the mfig/update-goz-1b branch May 17, 2020 19:05
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