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

bug: binary plugins in local directories aren't loaded properly anymore #544

Closed
3 tasks done
calops opened this issue Feb 15, 2023 · 5 comments · Fixed by #548
Closed
3 tasks done

bug: binary plugins in local directories aren't loaded properly anymore #544

calops opened this issue Feb 15, 2023 · 5 comments · Fixed by #548
Labels
bug Something isn't working

Comments

@calops
Copy link

calops commented Feb 15, 2023

Did you check docs and existing issues?

  • I have read all the lazy.nvim docs
  • I have searched the existing issues of lazy.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.9.0-dev-945+gd359f7a53

Operating system/version

Linux 6

Describe the bug

17a3c3a introduces a regression: binary plugins (plugin.so) aren't loaded anymore. It works before that commit. I've read through it but can't pinpoint the issue, although I guess there's a path collection that needs to be extended somewhere.

Steps To Reproduce

Declare a local plugin:

{
    dir = "~/local/plugin",
    name = "myplugin",
    config = function()
       require("myplugin")
    end,
}

Place a binary module myplugin.so in ~/local/plugin/lua/myplugin.so.

The plugin won't be loaded properly, with the standard lua error saying it can't find the module anywhere. On the previous commit, this all works flawlessly.

I'm afraid I don't have a .so to provide right now but I can make a simple one in a few days if it's needed to troubleshoot the issue.

Expected Behavior

The plugin loads.

Repro

No response

@calops calops added the bug Something isn't working label Feb 15, 2023
@calops
Copy link
Author

calops commented Feb 15, 2023

After further digging, it seems that binary modules aren't loaded anywhere (even in paths that should already be in scope, like ~/.config/nvim/lua) except for the current directory (.) from which nvim is launched. Again, this all works on the previous commit.

@elvisgastelum
Copy link

i changed yesterday my neovim config for lazy installation to point to the tag v9.8.0 because i have issues with plugins aren't loaded but i don't identify if was for only binaries or normal plugins, i just rollback version and get it working again

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"

if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		"--branch=v9.8.0", -- This is the version still works for me, but v9.8.1 doesn't work
		lazypath,
	})
end

vim.opt.rtp:prepend(lazypath)

require("lazy").setup('elvisgastelum.plugins')

then clean all plugins, open neovim again and lazy autoinstall with the previous tag.

idk if i need to configure my plugins with a new property or lazy is true by default but this kind of changes should not be done on a bug fixes version. anyway, i only rollback and works as expected.

@folke
Copy link
Owner

folke commented Feb 15, 2023

@elvisgastelum this is clearly a bug, so obviously I wasn't planning for this.

@calops looking into it

@folke folke closed this as completed in 9ca3222 Feb 15, 2023
@folke
Copy link
Owner

folke commented Feb 15, 2023

@calops should work again now. Would be great if you could test and let me know it all works

@calops
Copy link
Author

calops commented Feb 15, 2023

I can confirm it's now working again. Thanks!

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

Successfully merging a pull request may close this issue.

3 participants