-
Notifications
You must be signed in to change notification settings - Fork 290
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
fx.ValidateApp fails on a valid graph when using fx.Decorate #1018
Comments
Thanks for reporting this. I've reproduced the panic and will look into it. |
JacobOaks
added a commit
to JacobOaks/dig
that referenced
this issue
Jan 9, 2023
Currently, decorators still run even when dry run is set in the container (see Fx issue: uber-go/fx#1018) This changes decorators to use the scope's invoker when decorating, causing it to fill-in zero-valued results instead of actually running the function when the dry run option is set.
JacobOaks
added a commit
to uber-go/dig
that referenced
this issue
Jan 9, 2023
Currently, decorators still run even when dry run is set in the container (see Fx issue: uber-go/fx#1018) This changes decorators to use the scope's invoker when decorating, causing it to fill-in zero-valued results instead of actually running the function when the dry run option is set.
This issue was fixed in Dig. If you update your dependency to the latest version of Dig (v1.16.1), that should address the issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Functions inside
fx.Decorate
are invoked withnil
s as required parameters when callingfx.ValidateApp
.To Reproduce
If I take a snippet from the docs, and make a unit test,
fx.ValidateApp
will panic.Expected behavior
If an app can run,
fx.ValidateApp
should not cause a panic.Additional context
n/a
The text was updated successfully, but these errors were encountered: