fx
fx copied to clipboard
A dependency injection based application framework for Go.
This tracks the task of adding documentation on how to use the `fxtest` package to test fx apps in our [public documentation page](https://uber-go.github.io/fx/).
Fx currently emits logs for each constructor or decorator that is provided to the DI container, but it doesn't actually emit logs on which ones that are called. A few...
**Is your feature request related to a problem? Please describe.** This is a documented limitation, but it's somewhat unclear why such a limitation exists: In the `Annotated` struct: ``` //...
The context canceled or deadline exceeded errors should be handled by user hooks. E.g. 1. Hook 1 started. 2. Hook 2 not started due to context expired. Hook 1 did...
In #931, we added checks to ensure that lifecycle hooks only run once to avoid users accidentally running app.Stop twice by doing: app.Run, app.Stop. This seems to have broken some...
**Describe the bug** The `fx.Dotgraph` displayed when visualizing the dependency graph is incorrect when using the new `fx.Private` variable. **To Reproduce** For the following code it prints as expected "foo\nbar"...
Adds the fx.ShutdownError option, to be able to pass a custom error to Shutdowner and retrieve it from the application as the reason it shutdown. Refers #672
**Is your feature request related to a problem? Please describe.** Currently, the fx.App lifecycle management allows us to create and start application components seamlessly. However, there's a missing piece in...
**Is your feature request related to a problem? Please describe.** fx.App.Start and fx.App.Stop enforce the context timeout on start/stop hooks by spawning a goroutine: https://github.com/uber-go/fx/blob/v1.21.0/app.go#L726-L731 fxtest.LIfecycle is supposed to be...
Hello 👋. Fx "under the hood" handling of the shutdown signals is preventing us from fixing a race condition between sidecars and services at the k8s level. For non-fx go...