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 91898 914
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
byu
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project. My initial shotgu...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
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
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
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
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews