Skip to content
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

Feature request: Custom locators #433

Open
Phault opened this issue Mar 10, 2024 · 4 comments
Open

Feature request: Custom locators #433

Phault opened this issue Mar 10, 2024 · 4 comments

Comments

@Phault
Copy link
Contributor

Phault commented Mar 10, 2024

Basically I'd like to be able to run:

proto plugin add git-locator "github:cool-guy/git-locator-plugin"

# `git` locator is now usable:
proto plugin add my-plugin "git:example.com/cool-guy/my-plugin.git"

# maybe even allow multiple locators from the same locator plugin:
# proto plugin add my-plugin3 "git+https:example.com/cool-guy/my-plugin.git"
# proto plugin add my-plugin2 "git+ssh:[email protected]:cool-guy/my-plugin.git"

proto pin my-plugin@latest --resolve

Which would update the .prototools like so:

my-plugin = "1.0.0"

[plugins]
git-locator = "github:cool-guy/git-locator-plugin"
my-plugin = "git:example.com/cool-guy/my-plugin.git"

This will of course complicate the installation process a little, as it would first have to install the locators, before it can handle the usages of them. Essentially I think it should install all plugins using locators it recognises in a loop, until it has installed everything possible. If there's still unknown locators in use, then complain to the user.

There's also the issue of what if two plugins provide locators with the same name? First entry in list wins? I'm not sure.

Aside from providing locators like the git locator in #431, which should probably be bundled anyway, this would also make it possible to create a registry plugin which could resolve from something similar to https://github.com/asdf-vm/asdf-plugins.

Alternatively locators could be separate from plugins, perhaps even called providers or registries, seeing as they're quite a bit different from the regular plugins.

@milesj
Copy link
Contributor

milesj commented Mar 10, 2024

I don't think this will ever happen, as we would lose all type safety on the rust side. The PluginLocator type (https://docs.rs/warpgate/0.11.6/warpgate/enum.PluginLocator.html) is used heavily throughout the codebase, including moon's, and I would rather not lose that.

@Phault
Copy link
Contributor Author

Phault commented Mar 10, 2024

Ah, that's a shame but understandable.

Is there any official plans for registry support down the line?

@milesj
Copy link
Contributor

milesj commented Mar 10, 2024

I've been looking into piggy-backing off of other registries, but nothing has stood out so far. I'd rather not have to build a custom registry.

It's a shame wapm.io disappeared.

@W1M0R
Copy link

W1M0R commented Jul 15, 2024

It looks like wapm.io now redirects to wasmer.io: https://wasmer.io/

Would it make sense to have a wasmer plugin for pixi that would allow installation from the wasmer registry? Either way, that is probably a conversation left for another GitHub issue.

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

No branches or pull requests

3 participants