zed-industries/zed · error

invalid ZED_APP_VERSION

Error message

invalid ZED_APP_VERSION

What it means

A panic in AppVersion::load when the ZED_APP_VERSION environment variable is set but does not parse as a semantic Version (bad format like 'x.y' or stray characters). The build-provided version string is invalid and startup aborts.

Source

Thrown at crates/release_channel/src/lib.rs:105

    }
}

struct GlobalAppVersion(Version);

impl Global for GlobalAppVersion {}

/// The version of Zed.
pub struct AppVersion;

impl AppVersion {
    /// Load the app version from env.
    pub fn load(
        pkg_version: &str,
        build_id: Option<&str>,
        commit_sha: Option<AppCommitSha>,
    ) -> Version {
        let mut version: Version = if let Ok(from_env) = env::var("ZED_APP_VERSION") {
            from_env.parse().expect("invalid ZED_APP_VERSION")
        } else {
            pkg_version.parse().expect("invalid version in Cargo.toml")
        };
        let mut pre = String::from(RELEASE_CHANNEL.dev_name());

        if let Some(build_id) = build_id {
            pre.push('.');
            pre.push_str(&build_id);
        }

        if let Some(sha) = commit_sha {
            pre.push('.');
            pre.push_str(&sha.0);
        }
        if let Ok(build) = semver::BuildMetadata::new(&pre) {
            version.build = build;
        }

View on GitHub (pinned to f4178619ac)

Solutions

  1. Set ZED_APP_VERSION to a valid semver string (e.g. 0.123.4)
  2. Unset ZED_APP_VERSION to fall back to the Cargo.toml pkg_version
  3. Fix the build script or packaging wrapper that exports the variable
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/release_channel/src/lib.rs:105 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/e4361191a9c88f50. Report an issue: GitHub.