Skip to content
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 panics when trying to fetch emojis #389

Closed
3 tasks done
kostya9 opened this issue Oct 9, 2024 · 2 comments
Closed
3 tasks done

Plugin panics when trying to fetch emojis #389

kostya9 opened this issue Oct 9, 2024 · 2 comments
Labels
bug Something isn't working cannot replicate The maintainer cannot replicate this issue

Comments

@kostya9
Copy link

kostya9 commented Oct 9, 2024

Prerequsities

  • I'm on the latest version of the plugin
  • I've installed the required dependencies
  • I've run :h gitlab.nvim.troubleshooting and followed the steps there

Setup Configuration and Environment

return {
	"harrisoncramer/gitlab.nvim",
	dependencies = {
		"MunifTanjim/nui.nvim",
		"nvim-lua/plenary.nvim",
		"sindrets/diffview.nvim",
		"stevearc/dressing.nvim", -- Recommended but not required. Better UI for pickers.
		"nvim-tree/nvim-web-devicons" -- Recommended but not required. Icons in discussion tree.
	},
	enabled = true,
	build = function() require("gitlab.server").build(true) end, -- Builds the Go binary
	config = function()
		require("gitlab").setup({
			debug = {
				request=true,
				response=true,
				gitlab_request=true,
				gitlab_response=true,
			},
			log_path = "D:/gitlab.nvim.log"

		})
	end,
}

OS: Windows

Bug Description

Plugin panics when trying to fetch emojis.

My hypothesis: it uses the wrong working directory.

Reproduction Steps

  1. Check out the feature branch
  2. Open Neovim
  3. Use gls
  4. Observe error
gitlab.nvim: panic: could not find emojis at ./config/emojis.json                                                                        goroutine 1 [running]:                                                                                                                   github.com/harrisoncramer/gitlab.nvim/cmd/app.CreateRouter(0xc000108060, 0x1?, 0xc000193d88, {0xc000193df0, 0x3, 0x6734a7?})             ^IC:/Users/KostiantynSharovarsk/AppData/Local/nvim-data/lazy/gitlab.nvim/cmd/app/server.go:94 +0x3b4b                                    github.com/harrisoncramer/gitlab.nvim/cmd/app.StartServer(0xc000108060, 0xc000236588, {{0xc000124000, 0x3c}, {                           gitlab.nvim: 0xc00012401a, 0xe}, {0xc000124029, 0x13}, {0xc00014c558, 0x17}})                                                            ^IC:/Users/KostiantynSharovarsk/AppData/Local/nvim-data/lazy/gitlab.nvim/cmd/app/server.go:26 +0x156                                     main.main()                                                                                                                              ^IC:/Users/KostiantynSharovarsk/AppData/Local/nvim-data/lazy/gitlab.nvim/cmd/main.go:45 +0x38d                                           gitlab.nvim: Golang gitlab server exited: job_id: 3, exit_code: 1

Screenshots

image


Note: if I add the config folder with emojis to my current working directory (NOT the directory of the plugin, but the repo I'm currently working in) -> it starts working.

@harrisoncramer harrisoncramer added the bug Something isn't working label Oct 11, 2024
@harrisoncramer
Copy link
Owner

harrisoncramer commented Oct 12, 2024

I'm guessing this is related to the issue where the plugin is not building properly in your other issue, let's debug that one first and come back to this. Thanks for your patience!

It looks like in your other ticket you manually built the bin.exe but it's running in the wrong folder; the plugin expects to find the binary at the root directory (the gitlab.nvim folder inside of the lazy directory) and not inside of the cmd folder, which is my guess for what's going wrong here for you.

@harrisoncramer harrisoncramer added the cannot replicate The maintainer cannot replicate this issue label Oct 13, 2024
@harrisoncramer
Copy link
Owner

Fixed by #419

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cannot replicate The maintainer cannot replicate this issue
Projects
None yet
Development

No branches or pull requests

2 participants