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

Ensure rocks even if there are no plugins to install #528

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wbthomason
Copy link
Owner

Closes #524 by always checking if we need to ensure the installation of any rocks.

@nanotee I have not tested this at all yet, but I think this is (modulo some small bugfixes) what needs to happen to fix #524.

@nanotee
Copy link
Contributor

nanotee commented Aug 29, 2021

Sorry for taking so long to get back to this. Gave this PR a go, still can't install rocks unfortunately. I think this is because the rocks table is a dict-like table, so getting the length with # always returns 0.

An idea I had to simplify code reuse is to make rocks a plugin type (like git and local). Do you think that would make sense as a long term goal?

@wbthomason
Copy link
Owner Author

Ah, you're right. I can fix that check to work properly.

re: better code reuse: I like that idea in principle, but it would require re-engineering a bit to change how we check if a given plugin is installed/not. Right now we batch the filesystem work for this for plugins, but if we treated rocks as a different kind of plugin we'd need to think about how to restructure. Otherwise, it fits nicely with the existing architecture for defining custom installers/updaters for plugins.

@wbthomason
Copy link
Owner Author

2eaff76 hypothetically fixes the check for rocks to install.

@nanotee
Copy link
Contributor

nanotee commented Sep 4, 2021

Thanks for the quick fix. packer now detects that there are rocks to install, but it can't open the display window:

[packer.nvim] [ERROR 11:41:30] async.lua:20: Error in coroutine: ...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:414: attempt to index local 'display_win' (a nil value)
@wbthomason
Copy link
Owner Author

Whoops. This comes from a bad design decision in how packer opens its display. I'll see if I can figure out a workaround, or just bite the bullet and refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants