Fl4m3Ph03n1x

Fl4m3Ph03n1x

Background

I am trying to develop an elixir desktop app for windows. While installing a static version of Elixir can help me for a while, I often try new versions and I like to keep my projects up to date. So clearly I need several versions of Elixir as I have multiple projects.

Problem? I use Windows…

Research

Normally I would code in some Linux variant, install asdf and be happy with it.
However asdf does not have support for Windows. If it supports Windows then it is not documented in their official webpage.

To try an find an alternative I read a few posts about which Version Managers were the most popular within the community:

However, most of them offer solutions for Linux and MacOS only.

To be fair, there was a PR to add support to asdf for Windows, however I found no documentation online on how to make use of this to setup a windows machine:

For those of you wondering, I have installed Elixir in my machine via chocolatey:

Which is the closest thing to Linux I can get on a Windows system. If chocolatey had more versions of Elixir perhaps I could consider this an option, unfortunately they only offer one.

Questions

  • Does anyone know of a working version manager for Windows?
  • If not, how can I install asdf in Windows?

Showing Posts 1 to 10

crispinb

crispinb

You say you’re working on a Windows desktop app, so I guess that might be why you’re not using WSL.

If (and I realise this is really more than one biggish ‘if’ so may not be relevant) your main need for Windows Elixir/Erlang is a single desktop app project, you could stay on the latest stable versions on Windows, and use WSL (where you can install asdf) for everything else.

Fl4m3Ph03n1x

Fl4m3Ph03n1x OP

Using WSL is not an option here, as I need to compile and release everything for Windows. If Linux was an option, I would have used a VM. Unfortunately, it is not.

crispinb

crispinb

I did write a Scoop manifest for something of mine a long time ago. I don’t know much about it but remember that it was pretty straightforward json, and Scoop supported some common installers (at least msi & innosetup). Perhaps that could be an option for you if you’re lucky the erlang & elixir install packages are fairly standard. It’s a bit of a rabbit hole to have to go down, but might be worth considering if nothing better crops up.

webuhu

webuhu

Scoop custom elixir manifest:

{
    "homepage": "https://elixir-lang.org/",
    "version": "v1.12.0-rc.0",
    "depends": [
        "erlang",
        "vcredist2013"
    ],
    "url": "https://repo.hex.pm/builds/elixir/v1.12.0-rc.0-otp-23.zip",
    "hash": "3ed75a05fe5733b30e9cafa6f59b8591c43ff64eee12c8e5d27ddfb9e25bee73",
    "env_add_path": "bin",
    "checkver": {
        "github": "https://github.com/elixir-lang/elixir"
    },
    "autoupdate": {
        "url": "https://repo.hex.pm/builds/elixir/v$version-otp-24.zip"
    }
}

install & uninsall with Scoop is a charme.
But it doesn’t really help out of the box to use different Elixir vesions per project basis.

Teaking the scoop used shims which are added to path could probably be a fast way to change global used version. Same for Elixir & Erlang.

Fl4m3Ph03n1x

Fl4m3Ph03n1x OP

Having in mind scoop will not help with multiple version management, I’d say this is also not a tool that would solve my problem.

webuhu

webuhu

Scoop will not solve it out of the box.

But if you maintain a set of custom manifests with the desired versions
and if you tweak somehow which version will be abailable in path,
it could possibly be the thing that let you change the versions globally most quickly.

Fl4m3Ph03n1x

Fl4m3Ph03n1x OP

Correct me if I am wrong, but wouldn’t that be the equivalent of installing a different elixir version from scratch every time I have a project that needs a different one?

webuhu

webuhu

No. Not in my point of view.
You should be able to install multiple versions from custom scoop manifest files.
And then only, as example now, rename the desired version within the scoop shims folder.
Then in a new shell the desired version should be available,
as scoop added the shims folder to windows path.

But different approuches would probably work also.
Scoop does only symlink the latest installed versions to a current link folder.
So it does not uninstall old versions automatically, as its always only a linked potable installation.

dominicletz

dominicletz

Creator of Elixir Desktop

I’ve got half a dozen Erlang installations & builds that I switch between manually by setting the windows PATH variable. Not very convenient either. Let me know @Fl4m3Ph03n1x if you find a good windows tool.

crispinb

crispinb

Just in case anyone revisits this via a search.

Scoop does handle multiple versions quite nicely (see FAQ · ScoopInstaller/Scoop Wiki · GitHub). Whoever looks after the scoop elixir & erlang manifests is doing a great job of keeping it up to date.

The major limitation compared to asdf is that scoop doesn’t handle per-project version configuration, so you have to scoop reset [app]@[version] to switch the version globally.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 92995 915
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
GES233
I’m posting this in response to Jose’s recent tweet (Cr. link) : People are sleeping on Elixir for a coding harness: Hot-code swappi...
New
_mfierro
Hello, I wrote Stop My Hand, a Scattergories-like web application using Phoenix/LiveView as my learning project for Elixir (after readin...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
durvia
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes. We’re a small ...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews