jdx/mise · error
invalid compose dependency '{value}': supported kinds are pa
Error message
invalid compose dependency '{value}': supported kinds are package, file, directory, service, user, and group What it means
parse_dependency accepts only the kinds package, file, directory, service, user, and group after the colon. If the kind prefix is unrecognized, or the name after the colon is empty, this error is thrown.
Source
Thrown at src/system/compose.rs:1143
{
bail!(
"invalid compose project_name '{name}': use lowercase letters, digits, dashes, and underscores"
);
}
Ok(())
}
fn parse_dependency(value: &str) -> Result<ResourceId> {
let Some((kind, name)) = value.split_once(':') else {
bail!("invalid compose dependency '{value}': expected '<kind>:<name>'");
};
if name.is_empty()
|| !matches!(
kind,
"package" | "file" | "directory" | "service" | "user" | "group"
)
{
bail!(
"invalid compose dependency '{value}': supported kinds are package, file, directory, service, user, and group"
);
}
Ok(ResourceId::new(kind, name))
}
fn validate_values(kind: &str, values: &[String]) -> Result<()> {
if let Some(value) = values
.iter()
.find(|value| value.is_empty() || value.starts_with('-') || value.contains('\0'))
{
bail!("invalid compose {kind} value '{value}'");
}
Ok(())
}
fn validate_command(kind: &str, command: &[String]) -> Result<()> {
if commandView on GitHub (pinned to afd2eddd3a)
Solutions
- Replace the kind with one of: package, file, directory, service, user, group
- Provide a non-empty name after the colon
- Check mise docs for the supported compose dependency kinds
Example fix
// before value = "container:api" // after value = "service:api"
Defensive patterns
Strategy: validation
Validate before calling
const KINDS: [&str; 6] = ["package","file","directory","service","user","group"];
fn valid_dependency(v: &str) -> bool {
match v.split_once(':') { Some((k, n)) => !n.is_empty() && KINDS.contains(&k), None => false }
} Prevention
- Keep a snippet of valid kinds handy when editing config
- Never leave an empty name after the colon
- Map docker-compose concepts to the closest supported mise kind
When it happens
Trigger: A dependency like 'container:api', 'volume:data', 'service:', or any unsupported prefix is passed to compose dependency parsing; also a bare trailing colon with empty name.
Common situations: Users guess kind names from Docker Compose terms (container, volume, network) that mise does not support; truncation leaves a trailing colon.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- invalid compose project_name '{name}': use lowercase letters
- invalid compose dependency '{value}': expected '<kind>:<name
- invalid compose {kind} value '{value}'
- compose {kind} cannot contain empty values or NUL bytes
- "{path_raw}".{id}: unknown line position '{other}' (expected
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/ed741844bd9d45e7.
Report an issue: GitHub.