Closed mrcjkb closed 5 months ago
Can you provide a brief overview and comparison to https://github.com/nvim-lua/nvim-package-specification ?
I'm still missing something like luarocks update --all
, but I see the point of having a separate package index.
@matu3ba Sure :smile:
The workflow doesn't define any specification. I uses the existing rockspec format, which has been well-established in the Lua ecosystem (it's the de facto standard).
It's difficult to build an opinion on the Neovim package spec, because it's still WIP. So I can only give you my (opinionated) thoughts based on what I know about the current status.
source = luarocks://
in its schema. When it is finished, it should be compatible with LuaRocks, so I don't see a conflict between the two approaches.--dev
flag.luarocks-tag-release
workflow, you can build non-lua binaries in GitHub CI (using make
or cmake
), and distribute them with your plugin. No need to tell users to manually build them after installing from scm.luarocks update --all
: To minimise dependency hell. PackSpec won't solve that problem.
If you specify plugins as dependencies in a rockspec, you can pin them with a lock file and update them with the --pin
flag.version
in its schema; and the readme says plugin authors should have a git tag that matches that version. I don't agree with that UX. What if you want the version
on your main branch to be scm
or dev
? Some plugin authors don't want to maintain tags, but prefer rolling releases. All of these use cases are supported by RockSpec. The luarocks-tag-release
action supports them too, and solves the pain point of polluting your repository with multiple version-named rockspecs.It requires a LuaRocks account
Do you have an idea how to handle that? It should at least not cause failures if the credentials are missing. I think assuming tagged releases is fine (and actually good that it doesn't do anything if there are no tags).
The action will (and should) fail if the API key is missing. But one could add
if: env.LUAROCKS_API_KEY != null
to the step that runs the action. This would skip it if the API key isn't set.
and actually good that it doesn't do anything if there are no tags
We do have plans to add support for luarocks test
and also testing luarocks install
(and maybe upload
) in PRs - which we will recommend. Otherwise the only way to test that the workflow doesn't break would be to merge and tag.
These could also be skipped if the API key isn't set.
@teto and I are trying to promote the use of LuaRocks to distribute Neovim plugins.
Would you be open to a PR that adds the luarocks-tag-release GitHub action to this template?
By now, it has matured enough that most Neovim plugins only need to add the action, without any inputs.
Its use could be seen as controversial, because: