Skip to content

Erlang/OTP vfox plugin. Use the vfox to manage multiple Erlang/OTP versions in Linux/Darwin MacOS, also Windows!!!

License

Notifications You must be signed in to change notification settings

version-fox/vfox-erlang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

E2E tests on Linux E2E tests on Darwin MacOS E2E tests on Windows

vfox-erlang plugin

Erlang/OTP vfox plugin. Use the vfox to manage multiple Erlang/OTP versions in Linux/Darwin MacOS/Windows. all platform~

Usage

# install plugin
vfox add --source https://github.com/version-fox/vfox-erlang/archive/refs/heads/main.zip erlang

# install an available version
vfox search erlang
# or specific version 
vfox install erlang@25.3.2.10

Before install Erlang/OTP in Linux/Darwin MacOS

vfox-erlang plugin would install Erlang/OTP through the Erlang/OTP source code compilation. So you must have the utilities mentioned in the document -> Building and Installing Erlang/OTP.

Here are examples of installing on Ubuntu 20.04 and MacOS 13.

install in Linux (Ubuntu 20.04)

# install utilities
sudo apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk

You can reference the E2E test in Ubuntu 20.04: .github/workflows/e2e_test_linux.yaml

install in Darwin (MacOS 12)

# install utilities
brew install autoconf libxslt fop wxwidgets openssl

You can reference the E2E test in MacOS 12: .github/workflows/e2e_test_darwin.yaml

Note

By default, vfox-erlang plugin will Build EEP-48 documentation chunks for get doc in REPL (eg: h(list).) and lsp docs hint.

erl get docs

You cal also use the OTP_CONFIGURE_ARGS environment variable to control install behavior. reference this documentation https://github.com/erlang/otp/blob/master/HOWTO/INSTALL.md#configuring-1 for more configuration. eg:

# example
export OTP_CONFIGURE_ARGS="--enable-jit --enable-kernel-poll"
vfox install erlang@25.3.2.10

Building Erlang/OTP on a relatively fast computer takes approximately 5 minutes. To speed it up, you can utilize parallel make with the -j<num_jobs> option. for example:

export MAKEFLAGS=-j8
vfox install erlang@25.3.2.10

install Erlang/OTP in Windows platform

In windows, the vfox-erlang plugin downloads the Erlang/OTP version of the exe installer from the Erlang/OTP releases and executes it for you.

This is an installation example in PowerShell:

vfox install erlang@25.3.2.12
vfox use erlang@25.3.2.12
Invoke-Expression "$(vfox activate pwsh)"
# Test the installation results
& erl.exe -eval 'erlang:display({otp_release, erlang:system_info(otp_release)}), halt().' -noshell

You can reference the E2E test in in windows-2022: .github/workflows/e2e_test_windows.yaml