-
Notifications
You must be signed in to change notification settings - Fork 50
harry/move go binary and deps #520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
@jakubbortlik This seems to work for me, if you wouldn't mind trying the upgrade path that'd be helpful. Basically, however you have this plugin pinned/installed locally, change the branch to this version. Ideally (if you are running an older version of Go) you should see a failure. If you upgrade Go, and try to run the plugin, it should auto re-compile the server. Then subsequent restarts wouldn't recompile. Please review this PR when you get a chance, I can merge it after you've confirmed the upgrade path. We will use this approach moving forward -- any new release will generate a tag which is baked into the Go binary, which ensures that folks' Go code is recompiled on any changes to the plugin, since it's tag-based. |
|
Hi Harrison, I'm glad that you've found the time to do this! I'll try to test the upgrade process soon. Currently, my Go version is already 1.25.5, and just switching to this branch worked flawlessly (mismatch detected, Go binary automatically rebuilt, server restarted). So I'll try to find the time for downgrading Go and trying again. |
Updates Go to 1.25.1 and updates Go packages to new Gitlab location.
This will be a Major version bump, since it requires users to update their Go versions.
Upgrade Steps
The plugin now includes a
/versionendpoint which returns the version of the Go binary. The binary's version is baked in when it's built as the lastgit tagwhich is what we use for releases. When a user upgrades their plugin, the next time the server starts:luacode will call this version endpoint.The next time the user starts the server, the
/versionendpoint will return the tag version that matches Lua, and no rebuild and restart will occur. This should ensure that all users have the latest version of the binary on their machine that's linked to the Lua code. Whenever they upgrade the plugin,gitlab.nvimwill rebuild the Go binary whenever the server notices a mismatch.