-
Notifications
You must be signed in to change notification settings - Fork 39
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
Plugin fails to build #390
Comments
Interesting. I'm not a Windows user so this would be hard for me to debug, as you've already determined there's something going wrong here: local file_path = u.current_file_path()
local parent_dir = vim.fn.fnamemodify(file_path, ":h:h:h:h")
state.settings.bin_path = parent_dir
state.settings.bin = parent_dir .. (u.is_windows() and "\\bin.exe" or "/bin")
if not override then
local binary_exists = vim.loop.fs_stat(state.settings.bin)
if binary_exists ~= nil then
return
end
end
local cmd = u.is_windows() and "cd %s\\cmd && go build -o bin.exe && move bin.exe ..\\"
or "cd %s/cmd && go build -o bin && mv bin ../bin"
local command = string.format(cmd, state.settings.bin_path)
local null = u.is_windows() and " >NUL" or " > /dev/null"
-- If you add this line we can see the command that's actually being run
print(command .. null)
local installCode = os.execute(command .. null)
if installCode ~= 0 then
u.notify("Could not install gitlab.nvim!", vim.log.levels.ERROR)
return false
end
u.notify("Gitlab.nvim installed successfully!", vim.log.levels.INFO)
return true To debug this, I'd probably want to know the exact command the plugin is trying to run. You can see that if you change into the plugin directory and edit that function in To find the source code for this plugin, run the following ex command to see where the plugins are on your system. Then change into your Lazy directory, and into the Gitlab directory:
|
This is something to do with your setup, if you're able to post more information about the command that's actually running and further debug that Lua file, that'd be great. With an EC2 instance running Windows and with the basic requirements needed for this plugin (Lazy, Neovim, Go, and the bare bones configuration from the Readme), the plugin created and moved the |
Hey @kostya9 are you able to provide the above information? Specifically I'm looking for the actual command the plugin is trying to run on your machine, since I'm not able to replicate. It's probably a path or command issue of some kind. |
Sorry for the long delay. The command looks fine, but it fails for some reason. When I copy this command and run manually - it works. Now that I think about it - this may be connected to the fact that I use PowershellCore as terminal instead of the default things, and maybe my vim terminal settings are causing this issue. Although looking at the docs, the os.execute() should use the system shell, not my vim configuration... |
That's hugely helpful, thank you. I've opened up an MR that should fix this: #419 Do you mind checking out this branch and tell me if the server builds correctly? You should be able to check out a specific branch with Lazy, then run this to force a rebuild:
|
Hi @harrisoncramer, How do I know if I built it correctly? I now get an error:
|
Ah, okay I think that was due to me using forward slashes in the emoji location, I've made this fix: Could you pull down the latest for this branch, rebuild the server, and try again: #419 |
Thanks. I will try it tomorrow, thank you for your reply! |
Hi @harrisoncramer, I tried it out and it's running well. However, I encountered this issue: I can't close any of the I also noticed that the time displayed was incorrect: The comments here are ones I just posted. |
I'm not sure why your diagnostics wouldn't close. But both of these are separate issues from this original issue, if you are unable to resolve them please open up a separate ticket. I'll close this one out now. |
Thank you so much for your support! This is a great plugin. |
Checked on my machine, it now works too, thanks! |
Prerequsities
:h gitlab.nvim.troubleshooting
and followed the steps thereSetup Configuration and Environment
OS: Windows
Bug Description
When installing the plugin, it does not build the server binary. At the same time, building manually via
go build -o bin.exe
works (running in gitlab.nvim/cmd directory).My hypothesis: it tries to build the binary in the wrong directory.
Reproduction Steps
Screenshots
The text was updated successfully, but these errors were encountered: