Skip to content

fix: only check Go version when building the server#572

Open
snejugal wants to merge 7 commits into
harrisoncramer:developfrom
snejugal:fix-go-check
Open

fix: only check Go version when building the server#572
snejugal wants to merge 7 commits into
harrisoncramer:developfrom
snejugal:fix-go-check

Conversation

@snejugal

@snejugal snejugal commented Jul 1, 2026

Copy link
Copy Markdown

I use NixOS and prefer to keep my environment clean. As such, I prebuilt the plugin's server binary using Nix and specified its path in setup. However, setup forcibly checks Go version and aborts if I don't have it installed, which doesn't make sense because Go is only required to build the server and I already have one. Thus I moved the check to server.build function when it actually needs to build the server. I also touched version.lua to remove the annoying go: command not found message when starting Neovim (I'm not sure if this is a good way to fix it since I'm not a Lua programmer, so I'm open to suggestions).

Comment thread lua/gitlab/version.lua Outdated
@jakubbortlik jakubbortlik changed the title Fix: only check Go version when actually building the server fix: only check Go version when building the server Jul 1, 2026
Comment thread lua/gitlab/version.lua Outdated
Comment thread lua/gitlab/version.lua Outdated
Comment thread lua/gitlab/server.lua Outdated
Comment thread lua/gitlab/version.lua
end

local go_version = vim.version.parse(go:wait().stdout, { strict = false })
return go_version ~= nil and vim.version.ge(go_version, { 1, 25, 0 })

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snejugal Could you please update the version to 1.25.1 - this is the actual version in
go.mod. Ideally, I'd like to see the version pulled out to a variable and used in the return value of check_go_version as well, so that they don't drift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants