refactor: initialize version manager before plugin registration - #290
Merged
jfcherng merged 1 commit intoJul 2, 2026
Merged
Conversation
Collaborator
|
Makes sense to me. Wondering will this resolves any existing issue? |
Contributor
Author
Member
|
I think this bug is a side effect of the bug that was just fixed (but not released as of now) - sublimelsp/LSP#2951 |
Member
|
The fix in LSP was released so this shouldn't happen anymore. Up to maintainers whether they want this change or not. I guess it makes sense nonetheless. |
Collaborator
|
I am fine to merge this since it makes sense even if it fixes nothing. Thanks you all. |
jfcherng
marked this pull request as ready for review
July 2, 2026 19:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Rationale
CopilotPlugin.register()can make the plugin available for LSP session startup.on_pre_start_async()checksversion_manager.is_installed, which depends onplugin_storage_dirandserver_versionalready being initialized. Setting those fields before registration avoids anAttributeErrorif startup is triggered before the remainingplugin_loaded()setup has completed.Validation
plugin/__init__.pywith Pythoncompile(...).