Niclas Hedhman a écrit : > The org.apache.zest.spi.module.ModuleSpi contains access methods to a bunch > of useful SPI internals, such as EntityStore, TypeLookup and more. > > Should we not just kill this class and provide that via @Structure > injection, since that is what we do with factories (and ServiceFinder?) > > If not, shouldn't then everything be moved to the Module or ModuleSpi as > methods, instead of injectable types? > > WDYT?
Everything in ModuleSpi but TypeLookup is a service and is already injectable using @Service. And in fact, TypeLookup is already accessible from Module. So, +1 from me to ditch ModuleSpi. I'm not sure about moving them all to Module or only providing them through @Service injection.I find it pretty convenient to be able to access these base services from a Module, without having a dozen of injections.
