Features
* New shim version meta-data allows shims to not depend on a particular plugin
nor on its relative executable path (#431)
Upgrading requires shim re-generation and should happen automatically
by `asdf-exec`:
`rm -rf ~/.asdf/shims/` followed by `asdf reshim`
* Added lots of tests for shim execution.
We now make sure that shim execution obeys plugins hooks like
`list-bin-paths` and `exec-path`.
* Shim exec is now performed by a new `bin/private/asdf-tool-exec` that might
be faster for most common use case: (versions on local .tool-versions file)
but fallbacks to slower `get_preset_version_for` which takes legacy formats
into account.
* Shim exec recommends which plugins or versions to set when command is
not found.
Fixed Bugs
* Allow many plugins to provide shims with same executable name (#431)
Previously, if we ran a command like `asdf install` and we encountered a
plugin that didn't exist, asdf produces an error saying "No such
plugin". Without knowing which plugin it could be referring too, we'd
have to manually go through each plugin in `.tool-versions` to find the
culprit.
With this commit, we'll now also include the plugin name as part of the
messaging for easier debugging.
cwd can potentially be a symlink, which breaks asdf logic.
The following command will fail to resolve the path correctly:
env - PWD=/proc/self/cwd PATH=$HOME/.asdf/shims:/bin ruby --version
This first resolves the real path of cwd before continuing to search
for a .tool-versions file
Instead of just looking in $HOME/.tool-versions, allow the default
tool-versions file location to be specified through the variable
$ASDF_TOOL_VERSIONS.
Noticed we had some duplicated logic for finding the
plugins installation path. This caused the bug described
by #213 where the installation command and the find_executable_path
were using different paths.
Fixes#213