-
-
Notifications
You must be signed in to change notification settings - Fork 262
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
Add the ability to point to a local repository #1424
Comments
Hello! The core registry contains 300+ packages each located in their own file. To fully load the registry one would have to read and YAML parse each file individually. This would have a very noticeable performance impact, as mason.nvim currently needs to load registries synchronously (i.e. freezing the editor). The If you want to manage the registry version, you could pin the registry version directly like so: require("mason").setup {
registries = {
"github:mason-org/mason-registry@2023-08-12-hairy-coin"
}
} You can then replace the version component by pulling the latest version from the GitHub API and substituting it, should be fairly easy with |
Oh I see! Well, the shortcoming with the solution for pinning the registry version is, you cannot rely on |
Not sure I'm following re: dependabot and keeping packages up to date. This is already done upstream through Renovate, and will result in a new registry version whenever a package version is updated. I think allowing local registry sources could be interesting from a testing perspective, but it will have certain penalties if one wants to use it outside of testing. |
Oh, |
Ah ok I thought you were referring to using dependabot to update the packages themselves. I need to provide a way for external contributors to locally test package contributions, and I've thought about using this approach for that, so I'll see if it's feasible. |
I've opened an implementation for this in #1457. Again this is primarily for testing purposes, if you intend to use this for normal usage you might run some functionality glitches. This is because in order for the packages contained in a local registry (i.e. require("mason").setup()
require("mason-registry").refresh(function () end) -- see :h mason-registry.refresh() Using a While I do some more testing, would you mind giving it a spin as well and see if it behaves acceptably? |
Neat! I'll give it a try this weekend, thanks! |
I've not been able to find any reliable Lua parsers for YAML, and I certainly don't want to write one myself, hence the
|
hm... maybe should try https://github.com/exosite/lua-yaml, it seems to be just 1 lua file, could just copy it over. Edit: if comment support is a problem, there is a PR adding support |
I just tested the branch, and opened a PR in my dotfiles repo: perrin4869/dotfiles#2415 The CI is failing because it cannot fetch the branch, not sure why, but it works for me locally when I checkout the Edit: ok, I got the CI to pass, feel free to check how this works in action :) |
Whenever I try to use it I get the following:
I hard-coded values for |
Hm, that's probably happening because the registry gets initialized outside of the main loop (should not happen as a result of anything mason.nvim does). Does #1471 ( |
fwiw, I only saw the error appear when I ran |
I've searched open issues for similar requests
Is your feature request related to a problem? Please describe.
I would like to track the registry repository as a git submodule in my dotfiles repo manually. This would give me the option to manage updates more precisely and generally having more control over the setup.
Describe the solution you'd like
I'd like to be able to set the registries to be something like
In this case, obviously
MasonUpdate
etc would be meaninglessDescribe potential alternatives you've considered
No response
Additional context
I'm using a
Makefile
for some years now to manage and update my dotfiles dependencies/nvim plugins, etc. One of the cool things about this approach is that you can automate and curate updates usingdependabot
andgithub actions
, etc. The goal is to add a submodule pointing to themason-registry
, setup mason to pick up packages from there, and only perform updates/installs to packages if the registry has changed (i.e.,mtime
has changed)The text was updated successfully, but these errors were encountered: