{"record":{"id":"5f88a391d615354c","repo":"jdx/mise","slug":"null-values-cannot-be-represented-in-mise-lock","errorCode":null,"errorMessage":"null values cannot be represented in mise.lock","messagePattern":"null values cannot be represented in mise\\.lock","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lockfile.rs","lineNumber":197,"sourceCode":"        }\n        Value::String(value) => toml::Value::String(value),\n        Value::Sequence(values) => toml::Value::Array(\n            values\n                .into_iter()\n                .map(yaml_to_toml)\n                .collect::<Result<_>>()?,\n        ),\n        Value::Mapping(values) => {\n            let mut table = toml::Table::new();\n            for (key, value) in values {\n                let Value::String(key) = key else {\n                    bail!(\"aube lockfile mapping keys must be strings\")\n                };\n                table.insert(key, yaml_to_toml(value)?);\n            }\n            toml::Value::Table(table)\n        }\n        Value::Null => bail!(\"null values cannot be represented in mise.lock\"),\n        Value::Tagged(value) => yaml_to_toml(value.value)?,\n    })\n}\n\nfn toml_to_yaml(value: toml::Value) -> serde_yaml::Value {\n    use serde_yaml::{Mapping, Number, Value};\n    match value {\n        toml::Value::String(value) => Value::String(value),\n        toml::Value::Integer(value) => Value::Number(Number::from(value)),\n        toml::Value::Float(value) => Value::Number(Number::from(value)),\n        toml::Value::Boolean(value) => Value::Bool(value),\n        toml::Value::Datetime(value) => Value::String(value.to_string()),\n        toml::Value::Array(values) => {\n            Value::Sequence(values.into_iter().map(toml_to_yaml).collect())\n        }\n        toml::Value::Table(values) => {\n            let mut mapping = Mapping::new();\n            for (key, value) in values {","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/lockfile.rs#L179-L215","documentation":"yaml_to_toml, used when converting an aube (npm) lockfile from YAML to mise.lock TOML, hit a YAML null value. TOML has no null, so the value cannot be represented in mise.lock and conversion aborts; the upstream lockfile's null entry is the input at fault.","triggerScenarios":"mise.lock aube YAML has an explicit `null`/`~` or an empty key value (`key:` with nothing) somewhere in the graph.","commonSituations":"Hand-edited lockfile leaving a key with no value; a generator emitting YAML nulls; merge conflict resolution leaving placeholders.","solutions":["Replace the null with a concrete string/number value","Remove the key entirely if the value is meaningless","Restore mise.lock from git","Delete and regenerate the lockfile"],"exampleFix":"# before\nchecksum: null\n# after\nchecksum: \"sha256:abc123...\"","handlingStrategy":"validation","validationCode":"yq -e '[.. | tag == \"!!null\"] | length == 0' mise.lock >/dev/null || git checkout -- mise.lock","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Give every lockfile key a concrete value or remove the key","Never leave empty values (`key:`) when editing YAML/TOML by hand","Regenerate the lockfile after conflict resolution"],"tags":["lockfile","yaml","toml","null"],"backgroundTag":"schema-validation-failed","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}