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
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4663 61202 595
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
515 12931 101
New
wmnnd
Hey folks, I wanted to share with you a project I’ve been working on for a while: It’s an Open Source (AGPLv3) newsletter tool. Think Ma...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
sntran
In my third year of college, around 2010, I found Erlang. A few years later, I found Elixir. I liked the ideas at once: many small proces...
New
Ganna
Hi everyone, I have 8 years of production experience with Erlang/OTP and I’m just starting to get to know Elixir. What would you learn f...
New
gtcode
I’ve been tinkering with Lynx (by José) via hold_ledger. I used AI to write the code, a separate specification, the tests, and the Lean p...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews