You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When you use fx.Annotate together with fx.ResultTags(group:"name"), but return different types in different places, it is very easy to ignore some of them. Because if you have slice of some type, it will be filled with entries of same type, but entries with different type are ignored.
We have many modules in our monorepo and some fx.Module returned different type than others. By accident, but that caused our health checks weren't run for ages. Since everything else worked, we didn't notice missing checks for very long time.
To Reproduce
Here is simple example, where we create 2 clients + DB connection. All 3 produce record inside health check group but, DB one is ignored, because it returns wrong type. However no warning, is actually produced.
Describe the bug
When you use
fx.Annotate
together withfx.ResultTags(
group:"name")
, but return different types in different places, it is very easy to ignore some of them. Because if you have slice of some type, it will be filled with entries of same type, but entries with different type are ignored.We have many modules in our monorepo and some
fx.Module
returned different type than others. By accident, but that caused our health checks weren't run for ages. Since everything else worked, we didn't notice missing checks for very long time.To Reproduce
Here is simple example, where we create 2 clients + DB connection. All 3 produce record inside health check group but, DB one is ignored, because it returns wrong type. However no warning, is actually produced.
Expected behavior
Would be nice to receive some warning or similar notice.
Additional context
I have found that you can ask for same group with another type again. This might make that bit more complicated to spot not used values. Like
The text was updated successfully, but these errors were encountered: