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
{{ message }}
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.
No provider found for OpaqueToken (Instance of 'OpaqueToken<String>') <String>('baseUrl'):
Service -> OpaqueToken (Instance of 'OpaqueToken<String>') <String>('baseUrl').
This error makes it appear as through a provider for Service was found. Furthermore, the fact that it knew to inject baseUrl implies that a ClassProvider(Service) was provided. I have a suspicious that when the factory of FactoryProvider is null, the compiler treats this condition as though the provider is a ClassProvider.
It's probably beneficial that we throw a build error if a FactoryProvider explicitly provides null, since this would never be desired.
The text was updated successfully, but these errors were encountered:
When a
FactoryProvider
is configured with a null factory, the generated code behaves as though aClassProvider
was used instead.Consider the following example.
If we configured the following injector:
We see this error:
This error makes it appear as through a provider for
Service
was found. Furthermore, the fact that it knew to injectbaseUrl
implies that aClassProvider(Service)
was provided. I have a suspicious that when the factory ofFactoryProvider
is null, the compiler treats this condition as though the provider is aClassProvider
.It's probably beneficial that we throw a build error if a
FactoryProvider
explicitly provides null, since this would never be desired.The text was updated successfully, but these errors were encountered: