encore
encore copied to clipboard
Force Runtime DI setup before use.
We recently refactored the runtime to use a DI setup with singletons routing the package level function calls into the runtime instance.
There's a bug where if a package uses one of these package level
functions in an init()
function, but the package doesn't import
any other part of the Encore runtime or expose an API, it would result
in a nil pointer deference, as the singletons had not be initialised
yet.
This commit adds an import to the appinit
package, which initialises
the singletons.
To prevent a cicrular depdency I've had to move parts of appinit
back
into the app
package and link into it with linkname
.
All committers have signed the CLA.