jdx/mise · error
unknown idiomatic file field: {key}
Error message
unknown idiomatic file field: {key} What it means
When a registry tool's idiomatic-file configuration is given as a TOML table, mise only accepts a fixed set of keys: path, version_regex, version_json_path, version_expr, and related known fields. Any other key in that table is rejected with this error naming the offending key. This strictness catches typos that would otherwise silently disable idiomatic version detection.
Source
Thrown at src/registry.rs:499
.map(parse_registry_idiomatic_file)
.collect()
})
.transpose()
.map(Option::unwrap_or_default)
}
fn parse_registry_idiomatic_file(value: &toml::Value) -> Result<RegistryIdiomaticFile> {
match value {
toml::Value::String(path) => Ok(RegistryIdiomaticFile {
path: leak_string(path.clone()),
version_regex: None,
version_json_path: None,
version_expr: None,
deprecated: None,
}),
toml::Value::Table(table) => {
for key in table.keys() {
ensure!(
matches!(
key.as_str(),
"path"
| "version_regex"
| "version_json_path"
| "version_expr"
| "deprecated"
),
"unknown idiomatic file field: {key}"
);
}
let string = |key: &str| -> Result<Option<&'static str>> {
table
.get(key)
.map(|value| {
value
.as_str()
.map(|value| leak_string(value.to_string()))View on GitHub (pinned to afd2eddd3a)
Solutions
- Replace the unknown key with the correct supported field name (check the registry schema: path, version_regex, version_json_path, version_expr, deprecated).
- Common fixes: `regex` -> `version_regex`, `file`/`file_path` -> `path`, `json_path` -> `version_json_path`, `expr` -> `version_expr`.
- Validate the tool TOML against the schema before submitting; remove fields the current mise version does not support.
Example fix
// before [[tools.node.idiomatic_files]] file = ".nvmrc" regex = "v(\d+\.\d+\.\d+)" // after [[tools.node.idiomatic_files]] path = ".nvmrc" version_regex = "v(\d+\.\d+\.\d+)"
Defensive patterns
Strategy: validation
Validate before calling
// allow-list idiomatic-file keys before parsing
const ALLOWED: [&str; 5] = ["path", "version_regex", "version_json_path", "version_expr", "deprecated"];
for key in table.keys() {
assert!(ALLOWED.contains(&key.as_str()), "unknown idiomatic file field: {key}");
} Prevention
- Validate tool TOMLs against the registry schema in CI before merging.
- Stick to documented field names; do not invent keys in idiomatic_files tables.
- When copying config between tools, re-check each key against the schema for the target section.
When it happens
Trigger: parse_registry_idiomatic_file encountering a TOML table for idiomatic_files (per-tool version-from-file config) containing an unknown key such as `regex` (instead of `version_regex`) or `file` (instead of `path`).
Common situations: Registry contributors misspell a field name, invent a field not yet supported by the schema, or copy a key from a different config section (e.g. backend fields) into the idiomatic-file table.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- version_order must be "source" or "semver"
- backends must not be empty
- backend min_version requires version_order = "semver"
- failed to parse registry option {k} as a TOML value: {e}
- unrecognized install {s:?} in lockfile
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/4fee15eed66cc7a7.
Report an issue: GitHub.