Some services, like $fatalError should probably be singletons since they concern the processes (its only use is atm here:
https://github.com/nfroidure/common-services/blob/main/src/process.ts#L84-L88
Some other ain't that simple to determine INJECTOR and SILO_CONTEXT are not singletons and it looks difficult to change their nature:
|
// TEMPFIX: Fatal Errors are global |
|
![FATAL_ERROR, INJECTOR, SILO_CONTEXT].includes(serviceName) && |
Maybe that the autoloader itself should not be a singleton and be tied to its silo context? That said since initializers are the same for all silos, the autoloader would be a singleton that finally load the same things for each silos? Weird... Or not?
Have to think about it more, let's not include it into the v16.
Some services, like
$fatalErrorshould probably be singletons since they concern the processes (its only use is atm here:https://github.com/nfroidure/common-services/blob/main/src/process.ts#L84-L88
Some other ain't that simple to determine INJECTOR and SILO_CONTEXT are not singletons and it looks difficult to change their nature:
knifecycle/src/index.ts
Lines 397 to 398 in 86a34ca
Maybe that the autoloader itself should not be a singleton and be tied to its silo context? That said since initializers are the same for all silos, the autoloader would be a singleton that finally load the same things for each silos? Weird... Or not?
Have to think about it more, let's not include it into the v16.