jdx/mise · error

erlang does not yet support refs

Error message

erlang does not yet support refs

What it means

The Erlang core plugin cannot install from a git ref: its install path downloads a tagged OTP release tarball (via kerl), and there is no mechanism to map an arbitrary ref/branch/commit to a buildable source archive, so it refuses during install_via_kerl.

Solutions

  1. Pin erlang to a released OTP version, e.g. `mise use erlang:27.1`
  2. List available versions with `mise ls-remote erlang`
  3. For a custom build, compile OTP manually and point mise at it via a path install (`erlang:path:...`)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/plugins/core/erlang.rs:577 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/6f24b80f8bc6628e. Report an issue: GitHub.

Appendix: source

Thrown at src/plugins/core/erlang.rs:577

            .unwrap_or("Erlang/OTP source");
        ctx.pr.set_message(format!("Downloading {display_name}"));
        if !source_path.exists() {
            HTTP.download_file(source_url, &source_path, Some(ctx.pr.as_ref()))
                .await?;
        }
        self.verify_checksum(ctx, &mut tv, &source_path)?;

        let kerl_base_dir = self.kerl_base_dir();
        let kerl_source_path = kerl_base_dir
            .join("archives")
            .join(format!("{}.tar.gz", Self::release_tag(&tv.version)));
        file::create_dir_all(kerl_source_path.parent().unwrap())?;
        file::copy(&source_path, &kerl_source_path)?;

        file::remove_all(tv.install_path())?;
        match &tv.request {
            ToolRequest::Ref { .. } => {
                unimplemented!("erlang does not yet support refs");
            }
            _ => {
                let mut cmd = cmd!(
                    self.kerl_path(),
                    "build-install",
                    &tv.version,
                    &tv.version,
                    tv.install_path()
                )
                .env("MAKEFLAGS", format!("-j{}", num_cpus::get()));
                for (key, value) in source_build_kerl_env(tv.install_env(), &kerl_base_dir) {
                    cmd = match value {
                        Some(value) => cmd.env(key, value),
                        None => cmd.env_remove(key),
                    };
                }
                cmd.run()?;
            }

View on GitHub (pinned to 533346cc37)