-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
docs: add ADR 057 App Wiring Part I #11873
Conversation
Awesome work on writing this up, and for all the excellent thought that went into this! I think it'll be a huge win for Cosmos! My attempt at breaking down the changes: Feels to me like there are 5 changes / decisions happening here:
I don't know what the current rollout plan is, but I also feel like the native go instantiation can be massively improved in incremental ways using the same ideas.
|
Also presumably as part of this, for special keepers like
I imagine we're going in the former direction? But either direction we want to go, that seems like another component that can be independently spun out / opt-in applied to existing go code. (Giving governance / params an ability to iterate over every module and check if that module registers things they care about. Whether that be through run-time interface casting, dependency injection, or something in the YML config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I really don't have strong feelings on this one way or another as the contents in this ADR are all pretty abstract. Is there a demo or something I can look at to see how this all works and what it looks like?
As long as dev UX becomes easier with little overall cost, I say 👍
@ValarDragon can you say a bit more about what you're doing? I'm not sure the current
I think incremental migration is a requirement for this to work properly. I will add something in this ADR to that effect and will start spec'ing out some ideas as to how that could work. |
@ValarDragon any chance you can assist with
|
do we want to merge this as is then come back to editing based on the many discussions we have had @aaronc |
That's fine with me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging as is, we will be amending the adr in followup prs.
Many of the above discussions have been held in the community call and in breakout calls
* dependency injection `In` and `Out` structs which support `optional` dependencies | ||
* grouped-dependencies (many-per-container) through the `AutoGroupType` tag interface | ||
* module-scoped dependencies via `ModuleKey`s (where each module gets a unique dependency) | ||
* one-per-module dependencies through the `OnePerModuleType` tag interface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's better distinguish one-per-module dependencies from module-scoped dependencies by adding more description. The former is module dependency, the latter is app dependency.
to share resources across different versions of the same module which might have a different protobuf package | ||
versions (ex. `cosmos.bank.module.v2.Module`). | ||
|
||
An example app config in YAML might look like this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we add a note that this is is a potential update, and we focus on the proto based config?
var appConfigYaml []byte | ||
|
||
func main() { | ||
app.Run(app.ParseYamlConfig(appConfigYaml)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should update the example to use go struct?
Before merging I suggest to add some todo list of things to be updated in the ADR. |
I've added a task here for coming back to this in a follow up: #11899. |
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change