-
Notifications
You must be signed in to change notification settings - Fork 3
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
Bulk install fails to write to rocks.toml #28
Bulk install fails to write to rocks.toml #28
Comments
Oof, that is going to be tricky to solve. We use asynchronous write operations when writing to rocks.toml I guess a potential solution would be:
@sarmong What is your use case for bulk installs? |
I am just discovering rocks.nvim and to see how my current config will work with it, I just fed the table with all of my plugins into What I did now is just ran a macro to generate toml declarations for each plugin. The problem with this approach is I don't have the Some more issues:
I understand that this is due to async nature of it. But maybe there should be a separation between a Should I open separate issues in the core for these? I really like the idea and the concept of this plugin manager, but the migration experience from another manager is rather frustrating. I also sometimes get neovim terminated with 139 error (iirc) after running |
Interesting. I have been thinking of creating a migration script for popular plugin managers. If it uses
I'm not too sure about supporting bulk installs beyond maybe fixing the concurrency issues. It would add quite a bit of complexity that would be redundant with the migration tool. |
IMHO, a generic approach that accepts Instead of a separate plugin that will need to be 'disposed', it would be as easy as copying a lua code and sourcing it. Something like this: local plugins = vim.tbl_map(function(p)
return { name: p.source, rev = p. version }
end, MiniDeps.get_current_session())
rocks.install(plugins)
-- or even
for _, p in ipairs(plugins)
rocks.install(p)
end I'd say it not only useful as a migration tool (although, IMHO migration experience is vital for the adoption of the plugin), but also there may be cases when you need to install many packages at once. Say, if you install Right now you can't use this command, and if a user tries to run multiple I haven't look into the implementation of the plugin yet, can
If there are problems with that - then a quick fix to improve UX would be to immediately error out on |
Adding support for bulk installations to
as well as (added by rocks-git):
I fear that adding additional signatures like
would significantly increase complexity and overwhelm users. When we prevent race conditions in As for a lua API (see When the two fixes have been merged, bulk installations will be possible. |
If you call
vim.cmd("Rocks install " .. plugin)
synchronously for many plugins in a row the following happens.If I try to bulk install 100 plugins, about 3 gets added to rocks.toml
The text was updated successfully, but these errors were encountered: