Prevent development extension from reloading


I was wondering if there is any way to disable a extension in development (using “activate project as extension”) from reloading because its files changed? My extension is downloading a binary file with an autocompletion program on startup, and this causes the extension to end up in an infinite loop of restarting and downloading the binary again. Should I be solving this in a different way? Thanks!

1 Like

There isn’t currently, though this does sound like something we could make a preference to prevent this from happening!

Good to know! I feel like this must be a common issue. Do you have a suggestion on how this type of feature should be implemented to not run into this issue? I looked at a similar extension for vscode and it seems to be downloading a binary in the same way.

Thanks a lot!

I had this issue as well initially. I solved it by making sure to use the extensions global or workspace storage directory instead of downloading to the extension directory. (here’s my code)

That’s a great solution! Thanks! :slight_smile:

Often a change touching multiple files results in a broken extension until all related changes are saved. For an extension marshaling a language server with a lot of startup overhead, these intermediate reloads are extra annoying. The superfluous reloads from git operations only affecting the .git directory, also a bit annoying.

For these reasons, I would love to have the reload be an explicit command on the Extension menu when using the “Activate Project as Extension” development mode.