jdx/mise · error

workspace project ID {value:?} must include a provider names

Error message

workspace project ID {value:?} must include a provider namespace

What it means

Workspace ProjectId values are namespaced as `provider:local_id` (e.g. `npm:@scope/pkg` or `cargo:my-crate`). FromStr requires a `:` separator; a value without one cannot be split into provider and local parts, so parsing bails. This enforces that every project ID carries its ecosystem provider namespace.

Source

Thrown at src/task/workspace.rs:57

    /// Returns the serialized project ID.
    pub(crate) fn as_str(&self) -> &str {
        &self.0
    }
}

impl Display for ProjectId {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        Display::fmt(&self.0, f)
    }
}

impl FromStr for ProjectId {
    type Err = eyre::Report;

    fn from_str(value: &str) -> Result<Self> {
        let Some((provider, local_id)) = value.split_once(':') else {
            bail!("workspace project ID {value:?} must include a provider namespace");
        };
        Self::new(provider, local_id)
    }
}

fn validate_id_part(kind: &str, value: &str) -> Result<()> {
    if value.is_empty() {
        bail!("workspace {kind} ID cannot be empty");
    }
    if value.trim() != value || value.chars().any(char::is_control) {
        bail!(
            "workspace {kind} ID {value:?} contains surrounding whitespace or control characters"
        );
    }
    if kind == "provider" && value.contains(':') {
        bail!("workspace provider ID {value:?} cannot contain ':'");
    }
    Ok(())

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Add the provider namespace prefix: `provider:local-id` (e.g. `npm:mypkg`, `cargo:mypkg`)
  2. Check the provider names supported by the workspace integration you use
  3. Fix the upstream generator/serializer that omitted the namespace

Example fix

// before
projects = ["webapp"]
// after
projects = ["npm:webapp"]
Defensive patterns

Strategy: validation

Validate before calling

// js: validate project ID carries a provider namespace
const isValidProjectId = (id) => /^[^:\s]+:[^:\s]+$/.test(id);
if (!isValidProjectId('webapp')) throw new Error('use npm:webapp style provider:local-id');

Prevention

When it happens

Trigger: Parsing a project ID string via ProjectId::from_str (or config/spec input that flows into it) where the string has no `:`, e.g. "myproject" instead of "npm:myproject".

Common situations: Hand-writing workspace project IDs in mise.toml without the provider prefix; tooling that emits bare package names; older configs written before namespaced IDs were required.

Understand the failure class

Background: "invalid id" errors: invalid identifier format — why libraries reject IDs before lookup, and how to fix them — this error's family across 37 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/5d13f07b8fde6018. Report an issue: GitHub.