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 #9

Open
milesj opened this issue Aug 18, 2024 · 8 comments · May be fixed by #31
Open

Support asdf plugins through a proto WASM plugin #9

milesj opened this issue Aug 18, 2024 · 8 comments · May be fixed by #31

Comments

@milesj
Copy link
Contributor

milesj commented Aug 18, 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 Aug 18, 2024

/bounty $500

@varshith257
Copy link

varshith257 commented Aug 19, 2024

@milesj Instead you have transferred the issue. Almost done except installation changes. I am presuming my work of last done and push changeS
s. With that

/attempt #9

Algora profile Completed bounties Tech Active attempts Options
@varshith257    3 moonrepo bounties
+ 5 bounties from 3 projects
TypeScript, Go
Cancel attempt

@milesj
Copy link
Contributor Author

milesj commented Jan 18, 2025

/bounty $500

Copy link

algora-pbc bot commented Jan 18, 2025

💎 $500 bounty • moonrepo (YC W23)

Steps to solve:

  1. Start working: Comment /attempt #9 with your implementation plan
  2. Submit work: Create a pull request including /claim #9 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to moonrepo/plugins!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @LorenzoBloedow Jan 18, 2025, 10:33:15 PM #30
🟢 @onyedikachi-david Jan 21, 2025, 7:48:40 PM #31

@LorenzoBloedow
Copy link

LorenzoBloedow commented Jan 18, 2025

Will fetch the scripts directly from asdf plugin repos, execute the scripts using the appropriate env variables from asdf. Will do everything inside the appropriate proto plugin functions.

/attempt #9

Algora profile Completed bounties Tech Active attempts Options
@LorenzoBloedow 1 bounty from 1 project
TypeScript, JavaScript,
CSS & more
Cancel attempt

Copy link

algora-pbc bot commented Jan 21, 2025

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

@onyedikachi-david
Copy link

onyedikachi-david commented Jan 21, 2025

/attempt #9

Algora profile Completed bounties Tech Active attempts Options
@onyedikachi-david 14 bounties from 7 projects
TypeScript, Python,
JavaScript & more
Cancel attempt

@onyedikachi-david onyedikachi-david linked a pull request Jan 21, 2025 that will close this issue
Copy link

algora-pbc bot commented Jan 21, 2025

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

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

Successfully merging a pull request may close this issue.

4 participants