Adds support for referencing an implicit provider. Implicit providers in Swift are just zero-param closures referencing the element (i.e () -> MyDependency). This was added since the runtime library supports this dependency shape.
Adds support for WeakProvider dependencies. This is another provider supported in the runtime library to help break cyclical dependencies for objects that should hold a weak reference to a parent.
Fixes bug in during resolution for finding all subcomponents that were installed. Initially we were only checking the immediate root component for all installed subcomponents, and none of the direct or transitive included modules.
In order to support implicit providers, we had to update the regex pattern used to discern dependencies. This update also allows us to remove a hacky workaround that required removing a trailing ).
Some regex patterns utilize the provided Swift type, and there is an intersection between the regex special characters and characters that can pop up in Swift types. In particular, the ? can be used within bindings to create an optional type (i.e bind(String?.self)). Added a helper to escape these special characters in the provided type so that regex patterns don't blow up.
() -> MyDependency
). This was added since the runtime library supports this dependency shape.WeakProvider
dependencies. This is another provider supported in the runtime library to help break cyclical dependencies for objects that should hold a weak reference to a parent.)
.?
can be used within bindings to create an optional type (i.ebind(String?.self)
). Added a helper to escape these special characters in the provided type so that regex patterns don't blow up.