uber / needle

Compile-time safe Swift dependency injection framework
Apache License 2.0
1.84k stars 144 forks source link

Generated Code doesn't work with package specification #435

Open satoshi-baba-0823 opened 2 years ago

satoshi-baba-0823 commented 2 years ago

I have a multi-module configuration, but if I specify a package with RootComponent, NeedleGenerated is not generated correctly.

I'll show you an example below. If you remove the HogeModule designation, it works fine.

Example

import HogeModule
final class RootComponent: BootstrapComponent {
    var hogeComponent: HogeBuilder {
        HogeModule.HogeComponent(parent: self)
    }
}
public func registerProviderFactories() {
    __DependencyProviderRegistry.instance.registerDependencyProviderFactory(for: "^->RootComponent") { component in
        return EmptyDependencyProvider(component: component)
    }   
}