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

Limit the creation of uncessary EncodingConfigs #7631

Closed
4 tasks
robert-zaremba opened this issue Oct 22, 2020 · 2 comments
Closed
4 tasks

Limit the creation of uncessary EncodingConfigs #7631

robert-zaremba opened this issue Oct 22, 2020 · 2 comments
Labels
T: Tests Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.

Comments

@robert-zaremba
Copy link
Collaborator

robert-zaremba commented Oct 22, 2020

Summary

In some tests we are creating and using encoding config in addition to the codec object in app:

suite.encodingConfig = simapp.MakeEncodingConfig()

Moreover we have RegisterInterfaces module functions which use a module global codec variable.

Related to:

Problem Definition

Managing codec objects is cumbersome and error prone. Errors usually panic and it's hard to debug.

Proposal

Make a canonical way how we will use codec in tests and in modules.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@amaury1093 amaury1093 changed the title Limit Limit the creation of uncessary EncodingConfigs Oct 22, 2020
@amaury1093 amaury1093 added the Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. label Oct 22, 2020
@aaronc
Copy link
Member

aaronc commented Oct 22, 2020

Ideally the tests for each module would not depend on all of simapp. Instead each module would be able to quickly bundle up the modules it needs for testing into a lightweight "sim app". Obviously this would be a pretty big lift given the current state of how modules are initialized. But if we are aiming towards a 1.0 with more decoupling it's something good to aim for.

@julienrbrt
Copy link
Member

Fixed with #12747.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Tests Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

No branches or pull requests

4 participants