[API] A (stable) way to load and unload scarpet apps
altrisi opened this issue ยท 0 comments
I'd like to suggest a stable API to load (and unload) Scarpet apps from extensions. Not exactly a "give me a list I'll load them" but a way to load apps by calling a method where you for example provide the app's name only (to be loaded from current available places such as world folder or builtin), a path, or at least something.
Right now the "way" to load apps (CarpetScriptServer.addScriptHost
) is not really stable, given it has changed multiple times for things like adding the command validator or the StoreNode from the download
command.
My suggestion (just an example) would be to expose a builder pattern that would prepare the arguments to call that method by itself, that when new arguments are added would just use default values for those, and when they are being removed would both deprecate instead of remove them directly and maybe try to keep them working at least temporarily (if not, at least keep the API method as a noop for binary compat).