{"record":{"id":"82927fc4b0684cd8","repo":"windmill-labs/windmill","slug":"typed-records-are-not-supported-use-ident-recor","errorCode":null,"errorMessage":"typed records are not supported, use `ident: record`","messagePattern":"typed records are not supported, use `ident: record`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/parsers/windmill-parser-nu/src/lib.rs","lineNumber":183,"sourceCode":"            \"number\" => Typ::Float,\n            \"record\" => Typ::Object(ObjectType::new(None, Some(vec![]))),\n            \"table\" => Typ::List(Box::new(Typ::Object(ObjectType::new(None, Some(vec![]))))),\n            \"nothing\" => Typ::Unknown,\n            // TODO: needs additional work on literal parsing\n            // \"binary\" => Typ::Bytes,\n            \"datetime\" => Typ::Datetime,\n            \"any\" => Typ::Unknown,\n            \"bool\" => Typ::Bool,\n            // Lists\n            \"list\" | \"list<any>\" | \"list<nothing>\" => Typ::List(Box::new(Typ::Unknown)),\n            \"list<number>\" => Typ::List(Box::new(Typ::Float)),\n            \"list<bool>\" => Typ::List(Box::new(Typ::Bool)),\n            \"list<string>\" => Typ::List(Box::new(Typ::Str(None))),\n            // list<float/int> is not supported\n            // Records and Tables\n            // TODO: Support in V1?\n            s if s.contains(\"record<\") => {\n                bail!(\"typed records are not supported, use `ident: record`\")\n            }\n            s if s.contains(\"table<\") => {\n                bail!(\"typed tables are not supported, use `ident: table`\")\n            }\n            s => bail!(\"{s} is not supported\"),\n        };\n        Ok(typ)\n    }\n    fn parse_default(\n        content: &str,\n        ctx: &[&str],\n        i: usize,\n        skip: &mut usize,\n    ) -> anyhow::Result<Value> {\n        let mut c = content.replace(\"=\", \"\").trim().to_owned();\n\n        fn parse_object_literal(\n            (open, close): (char, char),","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/parsers/windmill-parser-nu/src/lib.rs#L165-L201","documentation":"Nushell allows typed records like `record<name: string>` as parameter types. Windmill's parser supports the bare `record` type only (mapped to an open object); any type string containing `record<` is rejected with guidance to use the untyped form. The structured inner schema cannot be represented in Windmill's ObjectType here.","triggerScenarios":"Declaring `def main [cfg: record<name: string, retries: int>]` — any parameter type containing `record<` — when the signature is parsed.","commonSituations":"Modern Nushell scripts using typed record annotations for IDE/validation benefits being deployed to Windmill; upgrading Nushell and adopting typed records in existing scripts.","solutions":["Change the type to plain `record` and validate fields inside the script body.","Use `any` and parse/validate the incoming JSON object manually in the script.","Model the structured data as a Windmill resource or a JSON object input via a `dict`-like convention if the platform offers it.","Keep the typed record for local use but strip the type parameters in the deployed `def main` signature."],"exampleFix":"// before\ndef main [user: record<name: string, age: int>]\n// after\ndef main [user: record] {\n  let name = $user.name? | default \"\"\n}","handlingStrategy":"validation","validationCode":"function validateNoTypedRecords(code) {\n  const m = code.match(/def\\s+main\\s*\\[([^\\]]*)\\]/);\n  if (m && /record</.test(m[1])) return 'typed records (record<...>) are not supported; use bare `record` and validate fields in the body';\n  return null;\n}","typeGuard":null,"tryCatchPattern":"try {\n  const sig = parseNuSignature(source);\n} catch (e) {\n  if (String(e).includes('typed records are not supported')) {\n    throw new Error('Change the annotation to `record` and validate inner fields inside the script');\n  }\n  throw e;\n}","preventionTips":["Use bare `record` (or `any`) for object parameters in entrypoints","Do field validation in the script body with `| default` / explicit checks","Keep typed records for internal helpers, never for def main params"],"tags":["nushell","parser","records","unsupported-type"],"backgroundTag":"unsupported-type-signature","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}