{"record":{"id":"68b9a6d10ee3e355","repo":"dagger/dagger","slug":"legacy-customization-object-typedef-id-w","errorCode":null,"errorMessage":"legacy customization object typedef id: %w","messagePattern":"legacy customization object typedef id: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/module.go","lineNumber":762,"sourceCode":"\t\t}\n\t\tif constructor {\n\t\t\tif err := dag.Select(ctx, updatedObjectTypeDef, &updatedObjectTypeDef, dagql.Selector{\n\t\t\t\tField: \"__withConstructor\",\n\t\t\t\tArgs:  []dagql.NamedInput{{Name: \"function\", Value: fnID}},\n\t\t\t}); err != nil {\n\t\t\t\treturn fmt.Errorf(\"legacy customization constructor %v: %w\", cust.Function, err)\n\t\t\t}\n\t\t} else {\n\t\t\tif err := dag.Select(ctx, updatedObjectTypeDef, &updatedObjectTypeDef, dagql.Selector{\n\t\t\t\tField: \"__withFunction\",\n\t\t\t\tArgs:  []dagql.NamedInput{{Name: \"function\", Value: fnID}},\n\t\t\t}); err != nil {\n\t\t\t\treturn fmt.Errorf(\"legacy customization function %v: %w\", cust.Function, err)\n\t\t\t}\n\t\t}\n\t\tobjectTypeDefID, err := ResultIDInput(updatedObjectTypeDef)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"legacy customization object typedef id: %w\", err)\n\t\t}\n\t\tfor i, existing := range mod.ObjectDefs {\n\t\t\tif sameAttachedResult(existing, objDef) {\n\t\t\t\tif err := dag.Select(ctx, existing, &mod.ObjectDefs[i], dagql.Selector{\n\t\t\t\t\tField: \"__withObjectTypeDef\",\n\t\t\t\t\tArgs:  []dagql.NamedInput{{Name: \"objectTypeDef\", Value: objectTypeDefID}},\n\t\t\t\t}); err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"legacy customization object typedef: %w\", err)\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc legacyArgDefaultValue(typeDef *TypeDef, value string) (JSON, bool) {\n\tif value == \"\" {","sourceCodeStart":744,"sourceCodeEnd":780,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/module.go#L744-L780","documentation":"Thrown when ResultIDInput fails to serialize the customized object TypeDef into an ID after applying a legacy customization. It indicates the updated TypeDef could not be converted to its ID representation.","triggerScenarios":"After successfully applying __withConstructor or __withFunction, ResultIDInput(updatedObjectTypeDef) errors because the resulting TypeDef result cannot be encoded into a valid TypeDef ID.","commonSituations":"A customization produced a malformed or incomplete TypeDef (e.g. from a legacy constructor whose output shape is no longer valid); serialization bugs when TypeDef contains unsupported types.","solutions":["Check what the legacy customization mutates on the object TypeDef and ensure the resulting TypeDef is well-formed (valid field types, resolvable functions).","Regenerate module codegen so the legacy customization produces a current, encodable TypeDef.","Upgrade the Dagger CLI/engine; older TypeDef shapes may fail ID encoding in newer engines.","Capture the wrapped error and report if it appears to be an engine serialization bug."],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":"null","typeGuard":"null","tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"legacy customization object typedef id\") {\n\t// log full error chain; this is an engine-level serialization issue\n\treturn fmt.Errorf(\"module customization failed: %w\", err)\n}","preventionTips":["Keep generated code current with the engine version","Report persistent occurrences as engine bugs with the full wrapped chain"],"tags":["dagger","typedef","serialization","id-encoding"],"backgroundTag":"typedef-id-encoding-failed","analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}