Reinstall default packages on demand
- Dominant language
- Go
- Stars
- 25.6k
- Forks
- 941
- Avg merge
- 9h 24m
- Merged PRs (30d)
- 3
Description
### Is your feature request related to a problem? Please describe
I have my exports set like this:
```
export ASDF_CRATE_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/cargo-packages"
export ASDF_GEM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/gem-packages"
export ASDF_GOLANG_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/golang-packages"
export ASDF_NPM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/npm-packages"
export ASDF_PYTHON_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/python-packages"
```
But after modifying those files, there doesn't seem to be a way to rerun the default package installation task.
### Describe the proposed solution
As well behaving plugins should, the format of the default packages is defined as `ASDF_[plugin name]_DEFAULT_PACKAGES_FILE`, but with caveats.
For example `rust` plugin has named their env as `ASDF_CRATE_DEFAULT_PACKAGES_FILE`, `ruby` has chosen `ASDF_GEM_DEFAULT_PACKAGES_FILE`, etc. so using plugin name and piping the file to the correct installer can't be done.
In an ideal solution the plugin template would have a script `install-default-packages`, like it has for `install`, `list-all`, etc. that would handle the job of running install for the default packages.
### Describe similar `asdf` features and why they are not sufficient
The installation of default plugins is already there, it's just not possible to re-trigger it.
### Describe other workarounds you've considered
Only way we can at the moment trigger the installation is to remove the version and reinstall.
Contributor guide
Research direction
Start by inspecting the existing plugin template scripts, especially install and list-all, and trace how default package installation is currently triggered during version installation. Done means a supported command or plugin script can rerun installation from the configured default-package files without removing and reinstalling the version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, node.js, python, ruby, rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100