{"record":{"id":"c18f966bb7f5d7d7","repo":"windmill-labs/windmill","slug":"nesting-is-not-supported","errorCode":null,"errorMessage":"Nesting is not supported","messagePattern":"Nesting is not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/parsers/windmill-parser-nu/src/lib.rs","lineNumber":240,"sourceCode":"                .skip(i + 1)\n                .map_while(|el| {\n                    let el = el.trim();\n\n                    if closed {\n                        None\n                    } else {\n                        if el.chars().last() == Some(close) {\n                            closed = true;\n                        }\n                        *skip += 1;\n                        Some(el)\n                    }\n                })\n                .collect::<Vec<&str>>()\n                .join(\",\");\n\n            if remainder.contains(&['{', '[']) {\n                bail!(\"Nesting is not supported\")\n            }\n\n            Ok((c_2 + remainder)\n                // Remove trailing comma if there is any\n                .replace(&format!(\",{close}\"), &close.to_string()))\n        }\n        // It is list\n        if c.contains(\"[\") {\n            if c.chars().last() != Some(']') {\n                c = parse_object_literal(('[', ']'), c.clone(), ctx, i, skip)?;\n            }\n        }\n        // It is record\n        if c.contains(\"{\") {\n            if c.chars().last() != Some('}') {\n                c = parse_object_literal(('{', '}'), c.clone(), ctx, i, skip)?;\n            }\n        }","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/parsers/windmill-parser-nu/src/lib.rs#L222-L258","documentation":"The Nu parser (windmill-parser-nu) converts Nu object-literal arguments into JSON so the script can receive typed inputs. When parsing the remainder of an object literal it encounters '{' or '[', meaning the argument contains a nested object or array, which this simplified parser cannot handle. It aborts with 'Nesting is not supported' rather than silently producing malformed JSON.","triggerScenarios":"Calling `parse_object_literal` (via `parse_default`) on a Nu script whose default/signature argument contains a nested object or array literal, e.g. `{ a: { b: 1 } }` or `{ a: [1, 2] }`.","commonSituations":"Authors writing Nu scripts with rich default values like nested configs or lists of objects in the parameter signature; the parser only supports flat object literals.","solutions":["Flatten the object literal: keep only scalar values at the top level (strings, numbers, bools)","Move complex/nested defaults into the script body itself and keep the signature default simple","Use a JSON string default and parse it inside the Nu script","Switch the parameter to a different language or use Windmill's Python/TypeScript signature support for nested defaults"],"exampleFix":"// before (Nu signature)\nlet x = { a: { b: 1 } }\n// after\nlet x = { a_b: 1 }  # or: let x = '{\"a\": {\"b\": 1}}' | from json","handlingStrategy":"validation","validationCode":"// before passing a Nu object literal default:\nlet flat = (value | to json) # or inspect the literal\nif ($value | to json | str contains '{' or ($value | to json | str contains '[')) {\n  error make { msg: \"nested values not supported in Nu signature defaults\" }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep Nu signature defaults to flat scalar-only object literals","Put complex defaults in the script body, not the signature","Test script signature parsing locally before deploying"],"tags":["nu","parser","script-signatures"],"backgroundTag":"unsupported-nested-syntax","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"}