Skip to content

Support for ASDF version 16 #858

@grossvogel

Description

@grossvogel

Version 16 of ASDF is a backwards-incompatible release and works quite differently: https://asdf-vm.com/guide/upgrading-to-v0-16.html

The main thing I ran into with Lexical is that ASDF no longer seems to ship with a bash activation script at ~/.asdf/asdf.sh, relied upon by Lexical here:

_try_activating_asdf() {
local asdf_dir="${ASDF_DIR:-"$HOME/.asdf"}"
local asdf_vm="$asdf_dir/asdf.sh"
if test -f "$asdf_vm"; then
echo >&2 "Found asdf. Activating..."
# shellcheck disable=SC1090
. "$asdf_vm"
return $?
else
return 1
fi
}

Instead, the instructions simply say to add ~/.asdf/shims to your path, and in my limited local testing an export statement in that _try_activating_asdf does seem at least superficially to fix the issue and allow Lexical to function.

Updated function definition
_try_activating_asdf() {
    local asdf_dir="${ASDF_DIR:-"$HOME/.asdf"}"
    local asdf_vm="$asdf_dir/shims/elixir"

    if test -f "$asdf_vm"; then
        echo >&2 "Found asdf. Activating..."
        # shellcheck disable=SC1090
        export PATH="$asdf_dir/shims:$PATH"
        return $?
    else
        return 1
    fi
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions