-
Notifications
You must be signed in to change notification settings - Fork 975
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
Node
pkg refactoring
#958
Comments
easiest -> hardest
|
I am starting to become really conflicted about how the interface between the cmd/flags and the node subpackages should look. These flags and their parsing are clearly logically closer to the command themselves than the actual implementation of the options. It seems like a bad pattern to have the subpackages themselves modifying the "global" state (by handling setting the Env themselves). I think the best solution (for now) may be to keep the flags and their parsing methods in cmd, but to move the options and configs to the subpackages. This is what Hlib is experimenting with in renaynay#90 and I really like it. I have spent quite a bit of time now trying to figure out the best way to move the flags into the subpackages themselves, but will abandon this and move forward with only moving the opts and configs, and creating modules for the individual subpackages - based on top of Hlib's PR |
Eventually™️, we still should find a way for any module to hold the set of E.g. there is a In our case right now, we have onlu flags for the |
Moving |
Closed by #997 |
fx.Modules
(e.g. header components go into node/header)fx.Module
Env
in favour of vanilla context.WithValue wrappers #965Desired outcome:
The text was updated successfully, but these errors were encountered: