RFC: requirements.lua #176
Replies: 6 comments 20 replies
-
I think having a way for plugins to under the hood specify dependencies as either I don't know much about Even if that isn't the case is there good reason to deviate? I guess it won't be a solution for being able to specify other |
Beta Was this translation helpful? Give feedback.
-
Rather than a list, having |
Beta Was this translation helpful? Give feedback.
-
I'm coming at this more from the plugin maker space, so I think any time a user has to copy & paste into their init.lua, it's a very bad plan, because it makes it difficult to update any dependency or install instructions. I like the idea of I think if we pioneer One other random thought I had was a way of taking a rockspec and converting to |
Beta Was this translation helpful? Give feedback.
-
I like this idea overall. Changes to dependencies could finally be synced through updates (and therefore reverted through downgrades, as well as tested in branches). It keeps things centrally sourced as opposed to requiring each plugin user to copy configs. Perhaps we could create a repo of common definitions for plugins which don't want to target packer / are targeted towards vim? We would still be able to benefit from the centralization of configuration then. Additionally, even other package managers besides |
Beta Was this translation helpful? Give feedback.
-
Thanks, everyone - there's a lot of good thinking and suggestions here. Given the feedback, I'm proposing something like the following: The
|
Beta Was this translation helpful? Give feedback.
-
I think this is a great idea. Maybe we should have a way to specify the version of the dependency? For example many plugins use plenary but it might have breaking changes, so we can specify a version of plenary to use so the whole system won't break when plenary updates. Maybe the version can be the commit hash. This way we can symlink the entry point of each dependency to the plugin's |
Beta Was this translation helpful? Give feedback.
-
I'd like to make it easier for plugin authors to specify the rocks and other plugins that their plugins depend upon. To this end, I'm thinking about introducing the
requirements.lua
convention/format.This would be a Lua file included at the top level of a plugin. It should be a module returning a table with two optional keys:
rocks
andplugins
. Therocks
key would specify a list of Luarocks packages the plugin depends on in the same format as therocks
key in apacker
plugin specification; theplugins
key would specify a list of plugins the plugin depends on in the same format as a plugin name in apacker
plugin specification.If a user includes
rocks = true
orrequires = true
in a plugin specification, thenpacker
will search for arequirements.lua
file in the relevant plugin's install directory and ensure the relevant dependencies (just therocks
, if any, ifrocks = true
, and both plugins and rocks ifrequires = true
- this allows configuration of dependent packages, if customization is required).What do people think of this? Would it be helpful? Is it a good approach to solving this problem?
Beta Was this translation helpful? Give feedback.
All reactions