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

Support asdf plugins through a proto WASM plugin #539

Closed
milesj opened this issue Jul 8, 2024 · 9 comments · May be fixed by #540
Closed

Support asdf plugins through a proto WASM plugin #539

milesj opened this issue Jul 8, 2024 · 9 comments · May be fixed by #540
Assignees

Comments

@milesj
Copy link
Contributor

milesj commented Jul 8, 2024

There has been multiple requests now to support (piggy-back) off of asdf, since it has a ton of plugins and support for many tools. Unfortunately, building this into proto core simply isn't feasible without rewriting it from scratch, and at that point, it's really not worth it. The other issue is that asdf is Unix only, so that means no Windows support.

However! I had a thought the other day, why not support every asdf plugin through a single proto WASM plugin, similar to how our TOML plugins work (they are WASM under the hood). For example, say you wanted to use the scala asdf plugin, it may look something like the following in proto:

# .prototools
scala = "latest"

[plugins]
scala = "https://path/to/asdf/plugin.wasm"

Easy right? But what if the proto identifier doesn't match up with the asdf plugin name? Well, just override it with configuration. For example, using the nodejs asdf plugin.

# .prototools
node = "latest"

[plugins]
node = "https://path/to/asdf/plugin.wasm"

[tools.node]
asdf-plugin = "nodejs"

We can also take this further by supporting the git repository directly.

# .prototools
[tools.node]
asdf-repository = "https://github.com/asdf-vm/asdf-nodejs.git"

Caveats

With all this being said, I have no idea if this will actually work, or if the asdf plugin APIs will match up to the proto plugin APIs. It's definitely something that needs to be prototyped to ensure it's feasible.

Requirements

Implementation

How this is implemented may require a lot of discussion, which can be had on Discord.

With that said, we can outline a few things:

@milesj
Copy link
Contributor Author

milesj commented Jul 8, 2024

/bounty $500

@milesj
Copy link
Contributor Author

milesj commented Jul 8, 2024

If this turns out to not be feasible, I'll send over a tip for the work done so far.

@scshiv29-dev
Copy link

scshiv29-dev commented Jul 8, 2024

/attempt #539

Algora profile Completed bounties Tech Active attempts Options
@scshiv29-dev 2 bounties from 2 projects
Java, Python,
TypeScript & more
Cancel attempt

@varshith257
Copy link
Contributor

varshith257 commented Jul 9, 2024

I am into it @milesj

/attempt #539

Algora profile Completed bounties Tech Active attempts Options
@varshith257    3 moonrepo bounties
+ 1 bounty from 1 project
TypeScript, Go
Cancel attempt

@abhishek818
Copy link

@milesj can others give it a try?? Asking since it's assigned.

@varshith257
Copy link
Contributor

varshith257 commented Jul 9, 2024

@abhishek818 Maybe you can give an attempt after my attempt is done. I will let you know

@milesj
Copy link
Contributor Author

milesj commented Jul 9, 2024

Go for it

Copy link

algora-pbc bot commented Jul 9, 2024

💡 @varshith257 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

@milesj
Copy link
Contributor Author

milesj commented Aug 18, 2024

Moving this to https://github.com/moonrepo/tools

@milesj milesj closed this as completed Aug 18, 2024
@algora-pbc algora-pbc bot removed the 💎 Bounty label Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants