Glib Smaga

Results 32 comments of Glib Smaga

> Would it be possible to split this into two commits to simplify review, i.e. one commit just moving the code to internal/cmd and one commit migrating to cobra? Done....

Hit the data race in tests, need to figure out if this is something about this PR that triggered it ``` === RUN TestAgentClose ================== WARNING: DATA RACE Write at...

@recht I see the confusion, but everything is working as intended here. The `optional:"true"` instructs dig that it's ok for `SomeDep` to be missing from container. Remove that tag and...

> Sure, but if I added it to the container and it's not valid shouldn't that trigger an error? Not necessarily. I agree that your intent perhaps was not captured...

If components were checked upon registration, a strict order would have to be enforced on the constructors getting registered which is difficult/impossible given the modular nature of Fx. You're free...

It was merged in https://github.com/uber-go/dig/pull/233, but 1.8.0 has not been released

> cannot use dig.Name("myExporter1") (type dig.ProvideOption) as type dig.InvokeOption in argument to container.Invoke: > dig.ProvideOption does not implement dig.InvokeOption (missing dig.unimplemented method) The types `dig.ProvideOption`, part of the `container.Provide`, and...

The main reason for that is that the typical logger inside a typical application requires configuration to set itself up properly. Configuration loading is part of the lifecycle managed by...

> you're saying significantly slower, but benchmarking dig shows its ~1500ns for a provide, that's not that bad ... `Provide` is not the only thing that needs to be benched,...