-
Notifications
You must be signed in to change notification settings - Fork 789
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
feat: pass --add to asdf install to add plugins in .tool-versions #313
Conversation
Thanks for the PR and very sorry for the huge delay. |
No worries! I've rebased this against master. |
@danhper I believe the main reasons for not adding this so far was because there may be multiple plugins used for the same lang/framework/tool. For instance https://github.com/Banno/asdf-hashicorp |
@trs Thanks a lot! @jthegedus I am not entirely sure I get it. If the plugin does not exist, this would just be equivalent to running
which will use the plugin registered in our asdf-plugins repo with this name. |
I like the idea of this feature. If the user want to check the the repos for security, he should do it anyway. With out this feature all earlier mentioned security problems are at the same place- it just help to reduce the annoying installation process. Asdf tool does not contain any tool, which have 2 official repo, so it does not looks like a problem. This branch is outdated, if you want, I can rebase it and add missing docs. |
`asdf install --add` will also add any plugins from `.tool-versions` before installing
@trs Thanks for rebasing! |
My only opinion is that I am keen to see this land! Will certainly help me onboard new users at work. |
Ok, great! Feature-wise I think it's good but we do need some tests. |
It's been over a year now, is there any progress on this feature. It would make a huge difference to be able to confidently know that when joining an existing project that uses asdf that you could install all its tools with two or less commands instead of manually running |
@aliuk2012 Sorry this has lagged, we've been making our way through some of the open PRs and trying to finish off our I think the only remaining questions around this are:
I think the biggest concern I have with this solution is the dependency on the As another thought, implementing a solution to #240 would enable a simpler solve to all the issues here and in #210 / #651 potentially without adding more flags or adding security warnings because the users have already opted-in to each particular plugin URL 🤔 |
Further thoughts on this feature request
I was too hasty in my previous comment to commit this to the next major release as there's increasingly more scenarios where this feature introduces more problems for the user than solves. The issues it solves are actually required setup of the tool. There's certainly room to move and improve, but I don't think this is necessarily the right solution (happy to be convinced otherwise). So in a complete 180 I'm going to remove the milestone tag until this becomes more clear. |
I agree with @jthegedus on this. This pull request solves the easy part of the problem - running I suggest we close this PR. I understand things like this would make developer easier for many folks, but I don't think this is the right approach. I think asdf should provide small, focused, stable API so that other developers can build their own tooling around asdf for things such as environment setup. I'm happy to provide input if @trs or other developers want to build additional tooling around asdf's current API. |
I concur with @Stratus3D summary. I think our effort would be better spent improving our API and documenting reciepes to perform these extra little tasks, as they aren't core and solve auxilliary problems not covered by the asdf tools design. |
I wish this could be revisited. I feel like the step of adding plugins is entirely superfluous: I understand the security implications of automatically running code, but I think strategies for dealing with this were properly addressed in #276 in terms of making this behavior opt-out via I really love |
@codyrobbins I've got a simple tool for this. I ran into the same problem myself. https://github.com/ngyewch/asdf-helper |
I ended up switching everything to aqua which fit the bill, and has some additional steps to harden security. Binary installs, pinning versions, very easy to contribute new tools, checksum verification, cross-platform, global vs project installs. It doesn't handle runtimes, like Python, so asdf is better for that, but since I work with Go, it ended up taking care of every tool I need. If you are in a different ecosystem with runtime tooling dependencies for specific versions of python, ruby, etc, then asdf is probably a better fit for those. For all other binary based tools, highly recommend checking out aqua. |
Summary
asdf install --add
will add any plugins from.tool-versions
before installing them (if they are in the repo), saving time and effort when adding plugins listed there.Fixes: #276
Let me know if more needs to be done to satisfies security concerns or anything.