jdx/mise · error
unexpected compose config hash row: {line}
Error message
unexpected compose config hash row: {line} What it means
When parsing `compose config --format json`-style hash output rows, the library expects exactly two whitespace-separated fields: service and hash. A row with extra fields indicates an unexpected output format from the engine, so parsing bails with the offending line.
Source
Thrown at src/system/compose.rs:1033
.filter(|line| !line.trim().is_empty())
.map(|line| Ok(serde_json::from_str(line)?))
.collect()
}
fn parse_config_hashes(output: &str) -> Result<HashMap<String, String>> {
output
.lines()
.filter(|line| !line.trim().is_empty())
.map(|line| {
let mut fields = line.split_whitespace();
let service = fields
.next()
.ok_or_else(|| eyre!("compose config hash row is missing a service"))?;
let hash = fields.next().ok_or_else(|| {
eyre!("compose config hash row for '{service}' is missing a hash")
})?;
if fields.next().is_some() {
bail!("unexpected compose config hash row: {line}");
}
Ok((service.to_string(), hash.to_string()))
})
.collect()
}
fn container_is_ready(container: &ComposeContainer) -> bool {
container.state == "running" && matches!(container.health.as_str(), "" | "healthy")
}
fn container_is_active(container: &ComposeContainer) -> bool {
matches!(
container.state.as_str(),
"running" | "restarting" | "paused"
)
}
fn describe_current(target_services: &IndexSet<String>, containers: &[ComposeContainer]) -> String {View on GitHub (pinned to afd2eddd3a)
Solutions
- Upgrade to Docker Compose v2 whose output format matches the expected 'service hash' two-field layout
- Check the raw output of the hash command manually for interleaved warnings
- Set the compose `command` explicitly to a known v2 frontend instead of auto-detection
Defensive patterns
Strategy: try-catch
Try / catch
match parse_hash_row(line) {
Err(e) if e.to_string().contains("unexpected compose config hash row") => {
eprintln!("skipping malformed hash output line: {line}");
}
other => other?,
} Prevention
- Pin Docker Compose v2 for stable hash output format
- Redirect engine warnings away from captured stdout
- Verify hash output shape (`service hash`) when upgrading engines
When it happens
Trigger: Parsing compose config hash output where a line splits into more than two fields — e.g. engine emitting service name plus hash plus extra columns, or unexpected log lines interleaved in the output.
Common situations: Non-v2 or unusual compose frontends with different output formats; warnings or log lines captured together with hash output; locale/quote variations in engine output.
Related errors
- services not found in compose config: {}
- container inspection returned an unexpected number of rows
- compose command failed with {status}
- legacy 'docker-compose' v1 is unsupported; install Docker Co
- container engine command 'docker' was not found; set engine_
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/449deca4d19b34a1.
Report an issue: GitHub.