Latest In

News

ASDF Erlang - Managing Global And Local Plugins

ASDF Erlang is a plugin for the ASDF version manager that allows users to easily manage and install different versions of the Erlang programming language on their systems. It is an open-source project that is actively maintained by a community of developers.

Kelvin Farr
Jun 03, 202324634 Shares473730 Views
ASDF stands for "Another System Definition Facility" and it is a version manager for programming languages, libraries, and other software tools. It allows users to easily switch between different versions of a software package on their system without having to manually download and configure each version.
ASDF Erlangis a plugin for the ASDF version manager that allows users to easily manage and install different versions of the Erlang programming language on their systems. It is an open-source project that is actively maintained by a community of developers.

Why Use ASDF Erlang?

Erlang is a popular programming language that is widely used for building distributed systems and high-performance applications. However, managing multiple versions of Erlang on a single system can be a challenging task.
This is where ASDF Erlang comes in. It provides a simple and effective way to manage multiple versions of Erlang on a single system, without having to worry about version conflicts or dependencies.

Features Of ASDF Erlang

Some of the key features of ASDF Erlang include:
  • Simple installation- ASDF Erlang can be easily installed using the ASDF plugin system. Once installed, it can be used to manage multiple versions of Erlang on a single system.
  • Version management- ASDF Erlang allows users to easily switch between different versions of Erlang on their system. This is useful for testing and development purposes, where different versions of Erlang may be required for different projects.
  • Dependency management- ASDF Erlang automatically manages the dependencies of different Erlang versions, ensuring that all required libraries and packages are installed and up-to-date.
  • Compatibility - ASDF Erlang is compatible with a wide range of operating systems and environments, making it a versatile tool for developers.

Installing ASDF Erlang

To install ASDF Erlang, you first need to have ASDF installed on your system. If you don't have ASDF installed, you can follow the installation instructions on the ASDF website. Once you have ASDF installed, you can install the ASDF Erlang plugin by running the following command:
  • asdf plugin-add erlang https://github.com/asdf-vm/asdf-erlang.git
This will download and install the ASDF Erlang plugin on your system.
ASDF Erlang Github Post
ASDF Erlang Github Post

Using ASDF Erlang

Once ASDF Erlang is installed, you can use it to manage and install different versions of Erlang on your system. To install a specific version of Erlang, you can use the following command:
  • asdf install erlang <version>
For example, to install Erlang 24.0, you would run the following command:
  • asdf install erlang 24.0
Once the installation is complete, you can set the installed version of Erlang as the default version for your system by running the following command:
  • asdf global erlang <version>
For example, to set Erlang 24.0 as the default version for your system, you would run the following command:
  • asdf global erlang 24.0
You can also switch between different versions of Erlang on your system using the following command:
  • asdf local erlang <version>
This will switch the local version of Erlang for the current directory to the specified version.

Managing Dependencies With ASDF Erlang

ASDF Erlang automatically manages the dependencies of different Erlang versions. When you install a new version of Erlang using ASDF, it will automatically install all required libraries and packages for that version. This ensures that all dependencies are up-to-date and compatible with the installed version of Erlang.
You can also list the dependencies for a specific version of Erlang using the following command:
  • asdf list-all erlang <version>
This will list all the dependencies required for the specified version of Erlang.

ASDF Erlang Configuration

ASDF Erlang provides several configuration options that can be used to customize its behavior. These options can be set using the ASDF configuration file, which is located at ~/.asdfrc.
Some of the common configuration options for ASDF Erlang include:
  • erlang_build_options- This option allows you to specify additional build options when installing a new version of Erlang. For example, you can use this option to enable or disable specific features of Erlang.
  • erlang_configure_options- This option allows you to specify additional configuration options when installing a new version of Erlang. For example, you can use this option to specify the location of additional libraries or packages required by Erlang.
  • erlang_plugin_git_url - This option allows you to specify a custom Git URL for the ASDF Erlang plugin. This can be useful if you want to use a fork of the ASDF Erlang plugin or a different version of the plugin.

Updating ASDF Erlang To The Latest Version

Updating ASDF Erlang to the latest version is a simple process that can be done with a single command. To update ASDF Erlang, open a terminal window and type the following command:
  • asdf plugin update erlang
This command will check for updates to the ASDF Erlang plugin and install the latest version if one is available.

Installing Erlang 25.1.2 and Elixir 1.14.2 using asdf

Switching Between Different Versions Of Erlang With ASDF

ASDF Erlang allows you to easily switch between different versions of Erlang on your system. To switch to a different version of Erlang, you can use the following command:
  • asdf global erlang <version>
This command will set the global version of Erlang to the specified version. You can also set the local version of Erlang for a specific project by running the same command inside the project directory.

Working With Multiple Plugins In ASDF Erlang

ASDF Erlang supports multiple plugins, which can be used to install and manage different versions of Erlang. To install a new plugin, you can use the following command:
  • asdf plugin add <name> <git-url>
This command will add a new plugin to ASDF Erlang. Once the plugin is installed, you can use it to manage different versions of Erlang.

Managing Global And Local Plugins With ASDF Erlang

ASDF Erlang allows you to manage plugins both globally and locally. Global plugins are plugins that are installed system-wide and can be used by all users on the system. Local plugins are plugins that are installed only for a specific project and are not available to other projects.
To manage global plugins, you can use the following command:
  • asdf plugin list-all
This command will display a list of all available plugins that can be installed globally. To install a global plugin, you can use the following command:
  • asdf plugin add <name>
To manage local plugins, you can use the following command:
  • asdf local <version>
This command will set the local version of Erlang to the specified version. You can also set the global version of Erlang for your system using the command:
  • asdf global <version>

Integrating ASDF Erlang With Other Development Tools

ASDF Erlang can be easily integrated with other development tools to provide a seamless development experience. For example, you can use ASDF Erlang with the popular text editor Visual Studio Code by installing the Erlang extension.
To install the extension, open Visual Studio Code and go to the extensions tab. Search for "Erlang" and install the "Erlang" extension that is published by "Anders Lindgren". Once the extension is installed, you can use it to easily manage different versions of Erlang in your projects.
Similarly, ASDF Erlang can also be integrated with other development tools such as Eclipse, Emacs, and Sublime Text using plugins and extensions specific to each tool. Integrating ASDF Erlang with your preferred development tools can significantly improve your productivity and simplify your development workflow.

Uninstalling ASDF Erlang From Your System

To uninstall ASDF Erlang from your system, you can use the following command:
  • asdf plugin remove erlang
This command will remove the ASDF Erlang plugin from your system. If you have multiple plugins installed, you will need to run this command for each plugin that you want to remove.
After removing the plugin, you can delete the ASDF Erlang configuration file located at ~/.asdfrc if you no longer need it.

People Also Ask

How Can I Check Which Version Of Erlang Is Currently Installed On My System?

You can check the currently installed version of Erlang using the erl -version command.

Does ASDF Erlang Require Root Access To Install?

No, ASDF Erlang can be installed and used without requiring root access.

How Can I Remove A Specific Version Of Erlang That Was Installed With ASDF Erlang?

You can use the asdf uninstall erlang <version> command to remove a specific version of Erlang.

Can I Use ASDF Erlang With Other Version Managers, Such As Kerl Or Kiex?

Yes, you can use ASDF Erlang alongside other version managers.

How Do I Contribute To The ASDF Erlang Open Source Project?

You can contribute to the ASDF Erlang project by submitting pull requests on GitHub.

Conclusion

ASDF Erlang is a powerful tool for managing different versions of Erlang on a single system. With its simple installation process, version management capabilities, and dependency management features, ASDF Erlang makes it easy for developers to switch between different versions of Erlang for testing and development purposes.
We have explored the features and benefits of ASDF Erlang, how to install it, and how to use it effectively. By following the steps outlined in this article, you can easily manage multiple versions of Erlang on your system and ensure that your development environment is always up-to-date and compatible with the latest version of Erlang.
Jump to
Latest Articles
Popular Articles