eclipse-sisu / sisu-project

Sisu Inject
https://eclipse.dev/sisu/
Eclipse Public License 2.0
18 stars 15 forks source link

SetUpModule is package-private which makes extension difficult #70

Closed collinpeters closed 1 year ago

collinpeters commented 1 year ago

I needed to override setUp to add an additional module in InjectedTest but its current implementation uses this SetUpModule which is package-private. So I either have to put my class in the org.eclipse.sisu.launch package or duplicate that code. Can this be made public?

https://github.com/eclipse/sisu.inject/blob/6fa4bc1a635f1e8ec91e438bcb059f414d713f70/org.eclipse.sisu.inject/src/org/eclipse/sisu/launch/InjectedTest.java#L64-L68

mcculls commented 1 year ago

Hi @collinpeters - the recommended way to install modules is via the configure method:

    @Override
    public void configure( final Binder binder )
    {
        binder.install( new MyModule() );
    }

this guarantees that the custom module will be wrapped inside the WireModule

collinpeters commented 1 year ago

Thanks!