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

Installation script #2019

Open
microbecode opened this issue Mar 14, 2025 · 5 comments
Open

Installation script #2019

microbecode opened this issue Mar 14, 2025 · 5 comments

Comments

@microbecode
Copy link

Is your feature request related to a problem? Please describe

Our project relies on asdf to install some tooling. So, in our docs, we have to instruct users to install asdf. Unfortunately, there is no platform-agnostic, easy way to install asdf and users have to somehow figure out what to install and how.

Describe the proposed solution

Write a script that detects the used platform and installs asdf accordingly. For example, to install Rust, one just needs to run curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh and the installation script takes care of the rest.

Describe similar asdf features and why they are not sufficient

Using existing asdf installation functionality users have to be quite tech-savvy. Most of our users just want to run a simple command to get things working and we don't want to require them to know a lot about this kind of things.

Describe other workarounds you've considered

This is already implemented, at least somewhat, in some other tooling that requires asdf. Here's an example: https://github.com/software-mansion/starkup/blob/3bf84fda390bbcfe6c85b4ab88d58f463ce71f93/starkup.sh#L356

We considered maintaining a similar script by ourselves, but if would be much nicer if there was an official script we could use.

@jthegedus
Copy link
Contributor

Thanks for the suggestion. This was actually raised a few years ago. Here is the discussion for context

I don't think we should adopt this pattern. I know it's popular but it has some risks and I don't think we should push our users in this direction.
See:

source - #739 (comment)

Although the fundamental issue is still present, we do now have binaries for most platforms, which may make this more amenable to the team, so I will leave this open to discussion.

@Stratus3D
Copy link
Member

Stratus3D commented Mar 17, 2025

I guess my issue with this now is that we've got 4 available install methods. Some users won't want to use an install script due to security risk, so we'll need to keep all the existing install methods. This would introduce a 5th option. Hence why I've rejected things like #1858.

Homebrew and AUR are really nice, I've switched to them myself and I'd recommend them to everyone. Of course manual configuration is still required so that's a downside to using a package manager. Because everyone's shell setup varies install scripts can grow to be very sophisticated. I personally don't have the bandwidth to handle maintaining an install script, so unless an existing maintainer wants to volunteer to own the install script I don't think it's something we'll be adding.

@Stratus3D
Copy link
Member

Another recent goal of mine is to minimize the amount of Bash code I have to maintain. An install script would need to be a shell script.

@ylishev
Copy link

ylishev commented Apr 3, 2025

I have the same issue, as the most version managers that I personally currently use and want to replace are installed like:

curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer | bash

and

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$(NVM_VERSION)/install.sh | bash

That works fine for:

  • local development
  • build in Docker (with Alpine)
  • build in CI

Tools like curl or wget and bash are available widely (including Alpine) and are easier to install.

Right now, if I have to adopt asdf then I have write my own version of such install script, as I guess everyone that needs this.

In order for the different pipelines to work fast I prefer installation from binary, instead installing if from source.

Especially, in my case where I actually want to use asdf for Go (and Node), but you get the chicken-egg problem with Go.

Otherwise understandable not to want to deal with sh/bash.

@ylishev
Copy link

ylishev commented Apr 7, 2025

Actually, we don't really need heavy bash/sh based installation script. Most of the work can be done with Go and bash/sh side to be pretty much downloading the "Go" binary for the platform (OS/ARCH) and Go to take care of installation details. So, no heavy bash/sh scripting and not dependency of Golang compiler.

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

No branches or pull requests

4 participants