Skip to content

Conversation

@mrcjkb
Copy link
Contributor

@mrcjkb mrcjkb commented Feb 10, 2023

nvim-dap is a common dependency across Neovim plugins. Using luarocks may alleviate the need for users to specify their plugins' dependencies in their plugin manager (e.g., vim-plug or packer).
See also this blog post for details.

This PR adds a release workflow that publishes this plugin to LuaRocks whenever a tag is pushed, as well as a rockspec that can be used to release to the dev channel or install this plugin from source using the luarocks CLI.

For the release workflow to work, someone with a LuaRocks account will have to add their API key to this repo's secrets.

Note that I have added a shield to the readme that assumes the existence of an mfussenegger/nvim-dap LuaRocks module.

nvim-dap is a common dependency across Neovim plugins.
Using luarocks may alleviate the need for users to specify their
plugins' dependencies in their plugin manager
(e.g., vim-plug or packer). See also
[this blog post](https://teto.github.io/posts/2021-09-17-neovim-plugin-luarocks.html)
for details.

This PR adds a release workflow that publishes this plugin to
[LuaRocks](https://luarocks.org/) whenever a tag is pushed,
as well as a rockspec that can be used to release to the `dev` channel.

For the release workflow to work, someone with a LuaRocks account
will have to add their API key to this repo's secrets.

Note that I have added a shield to the readme that assumes the
existence of an `mfussenegger/nvim-dap` LuaRocks module.
@mrcjkb mrcjkb force-pushed the luarocks-tag-release branch from e4c5825 to 913fa48 Compare February 10, 2023 14:04
Copy link
Owner

@mfussenegger mfussenegger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems okay to me on a first glance. I'll have a closer look before I cut the next release

type = 'builtin',
copy_directories = {
'doc',
'plugin',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have to include the lua folder too, or is that picked up by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"lua" and "lib" (and some other) directories are picked up by default.

@mfussenegger mfussenegger merged commit 049eebe into mfussenegger:master Feb 17, 2023
@mrcjkb mrcjkb deleted the luarocks-tag-release branch February 17, 2023 11:37
@mfussenegger
Copy link
Owner

Merged and tried a dev release. Seems to have worked.

I'd like to point out that I think plugins depending on nvim-dap shouldn't attempt to hide that. There's quite a bit of documentation for it and users should be able to find that.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Feb 17, 2023

Thanks for supporting this!

Yes, I think that's generally good advice if you depend on a plugin that is more than just a library.

I'm just hopeful that it will one day be easier (and maybe common practice) to leverage the dependency resolution capabilities of luarocks.

(See also my post on some of the pain points that follows up on @teto's posts).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants