Hi,
I have written a plugin that I want to make available using Package Control. Since a lot of the code is not specific to the plugin, but really general python or sublime-specific, I have made it use a Git submodule where this general code is defined. The question is then how I can ensure this submodule is also “installed” as part of this package. The code is hosted on Github, which does not support downloading zip archives including the submodules (right?). As far as I understand I have the following options:
-
Copy the source code instead of using a submodule. Obviously tedious and error-prone if I intend to create several plugins and having to synchronize code between them.
-
Use the support for dependencies within package control. If I understand this correctly this will however simply install a non-user-installable package under Packages/. How would this work with two different plugins, both being dependent on this package (and likely different versions of it)?
-
Have plugin-specific python code to somehow initialize all submodules using something like ‘git submodule update --init --recursive’. It needs to be run post install and on every update of the plugin, so I guess this can simply be run every time the plugin is loaded? A drawback of this is that it relies on Git, which is something not all users have installed.
-
Request the user to manually do what is mentioned in 3)
-
Either manually or through Github Actions archive the submodules and check them in to the plugin repository (or any other https-supporting webservice).
Am I missing something here? Seems like this is an issue that someone else should have already encountered?