{"record":{"id":"b78c9921ce05a57a","repo":"dagger/dagger","slug":"attach-enum-typedef-source-map-w","errorCode":null,"errorMessage":"attach enum typedef source map: %w","messagePattern":"attach enum typedef source map: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/typedef.go","lineNumber":2056,"sourceCode":"\treturn decodePersistedEnumTypeDef(ctx, dag, &persisted)\n}\n\n//nolint:dupl // symmetric with InterfaceTypeDef.AttachDependencyResults; each typedef kind walks its own fields\nfunc (enum *EnumTypeDef) AttachDependencyResults(\n\tctx context.Context,\n\t_ dagql.AnyResult,\n\tattach func(dagql.AnyResult) (dagql.AnyResult, error),\n) ([]dagql.AnyResult, error) {\n\tif enum == nil {\n\t\treturn nil, nil\n\t}\n\n\towned := make([]dagql.AnyResult, 0, 1+len(enum.Members))\n\n\tif enum.SourceMap.Valid && enum.SourceMap.Value.Self() != nil {\n\t\tattached, err := attach(enum.SourceMap.Value)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"attach enum typedef source map: %w\", err)\n\t\t}\n\t\ttyped, ok := attached.(dagql.ObjectResult[*SourceMap])\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"attach enum typedef source map: unexpected result %T\", attached)\n\t\t}\n\t\tenum.SourceMap = dagql.NonNull(typed)\n\t\towned = append(owned, typed)\n\t}\n\tfor i, member := range enum.Members {\n\t\tif member.Self() == nil {\n\t\t\tcontinue\n\t\t}\n\t\tattached, err := attach(member)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"attach enum typedef member %d: %w\", i, err)\n\t\t}\n\t\ttyped, ok := attached.(dagql.ObjectResult[*EnumMemberTypeDef])\n\t\tif !ok {","sourceCodeStart":2038,"sourceCodeEnd":2074,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/typedef.go#L2038-L2074","documentation":"EnumTypeDef.AttachDependencyResults got an error back from the attach callback while re-attaching the enum's SourceMap result. The wrap points at dagql dependency hydration failing for the source-map object, not at the enum itself.","triggerScenarios":"The enum typedef carries a valid SourceMap whose underlying object cannot be attached to the dagql server (e.g. its dependencies are not resolvable during attach).","commonSituations":"Engine-side attach pipeline failure while loading a module whose enum carries source-map metadata; missing dependency results for the SourceMap object.","solutions":["Inspect the wrapped inner error for the root cause","Re-sync/rebuild the module so source maps are regenerated","Clear engine cache and retry the module load","Update dagger CLI/SDK to matching versions"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if enum.SourceMap.Valid && enum.SourceMap.Value.Self() != nil {\n    // only then attach\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"attach enum typedef source map\") {\n    // inspect wrapped cause; retry after re-syncing module / clearing cache\n}","preventionTips":["Keep source-map metadata regenerated via dagger develop","Match engine/SDK versions","Clear cache on attach errors"],"tags":["dagger","dagql","source-map","persistence"],"backgroundTag":"dependency-attach-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"}