{"record":{"id":"1da40afa67a66071","repo":"dagger/dagger","slug":"namespace-interface-typedef-id-w","errorCode":null,"errorMessage":"namespace interface typedef id: %w","messagePattern":"namespace interface typedef id: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/module.go","lineNumber":1823,"sourceCode":"\t\t\tif !sameAttachedResult(updatedFn, fn) {\n\t\t\t\tfnID, err := ResultIDInput(updatedFn)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn typeDef, fmt.Errorf(\"namespace interface function id: %w\", err)\n\t\t\t\t}\n\t\t\t\tif err := dag.Select(ctx, updatedIface, &updatedIface, dagql.Selector{\n\t\t\t\t\tField: \"__withFunction\",\n\t\t\t\t\tArgs:  []dagql.NamedInput{{Name: \"function\", Value: fnID}},\n\t\t\t\t}); err != nil {\n\t\t\t\t\treturn typeDef, fmt.Errorf(\"namespace interface function: %w\", err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif sameAttachedResult(updatedIface, iface) {\n\t\t\treturn typeDef, nil\n\t\t}\n\t\tupdatedIfaceID, err := ResultIDInput(updatedIface)\n\t\tif err != nil {\n\t\t\treturn typeDef, fmt.Errorf(\"namespace interface typedef id: %w\", err)\n\t\t}\n\t\tupdated := typeDef\n\t\tif err := dag.Select(ctx, updated, &updated, dagql.Selector{\n\t\t\tField: \"__withInterfaceTypeDef\",\n\t\t\tArgs:  []dagql.NamedInput{{Name: \"interfaceTypeDef\", Value: updatedIfaceID}},\n\t\t}); err != nil {\n\t\t\treturn typeDef, fmt.Errorf(\"namespace interface typedef: %w\", err)\n\t\t}\n\t\treturn updated, nil\n\tcase TypeDefKindEnum:\n\t\tenum := typeDef.Self().AsEnum.Value\n\t\tupdatedEnum := enum\n\t\t_, ok, err := mod.Deps.ModTypeFor(ctx, typeDef.Self())\n\t\tif err != nil {\n\t\t\treturn typeDef, fmt.Errorf(\"namespace enum type lookup: %w\", err)\n\t\t}\n\t\tif ok {\n\t\t\treturn typeDef, nil","sourceCodeStart":1805,"sourceCodeEnd":1841,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/module.go#L1805-L1841","documentation":"Wraps a failure from ResultIDInput while encoding the fully namespaced interface into an ID, before substituting it into the TypeDef via `__withInterfaceTypeDef` (core/module.go). Encoding the updated InterfaceTypeDef result failed.","triggerScenarios":"After namespacing, updatedIface differs from iface (sameAttachedResult false) and ResultIDInput(updatedIface) errors.","commonSituations":"Malformed interface produced by codegen; corrupt cached results; engine version skew.","solutions":["Check the wrapped cause from ResultIDInput","Regenerate SDK code (`dagger develop`)","Restart engine / clear cache to drop corrupt results","Verify CLI and engine versions match"],"exampleFix":"// before\ndagger functions // fails on stale generated SDK\n// after\ndagger develop && dagger functions","handlingStrategy":"validation","validationCode":"if updatedIface.Self().Name == \"\" { return errors.New(\"namespaced interface has empty name\") }","typeGuard":"func encodableInterface(i *core.Interface) bool { return i != nil && i.Name != \"\" }","tryCatchPattern":"id, err := ResultIDInput(updatedIface); if err != nil { return fmt.Errorf(\"interface typedef encoding failed: %w\", err) }","preventionTips":["Regenerate module SDK after source changes","Keep identifiers valid and non-empty","Clear engine cache after failed codegen runs"],"tags":["dagger","dagql","typedef-id","codegen"],"backgroundTag":"dagql-select-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"}