{"record":{"id":"36545f8a186f59aa","repo":"dagger/dagger","slug":"namespace-interface-source-map-w","errorCode":null,"errorMessage":"namespace interface source map: %w","messagePattern":"namespace interface source map: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/module.go","lineNumber":1796,"sourceCode":"\t\t\t\t\tArgs:  []dagql.NamedInput{{Name: \"sourceModuleName\", Value: OptSourceModuleName(mod.Name())}},\n\t\t\t\t}); err != nil {\n\t\t\t\t\treturn typeDef, fmt.Errorf(\"namespace interface source module name: %w\", err)\n\t\t\t\t}\n\t\t\t}\n\t\t\tsourceMap, err := mod.namespaceSourceMap(ctx, modPath, iface.Self().SourceMap)\n\t\t\tif err != nil {\n\t\t\t\treturn typeDef, err\n\t\t\t}\n\t\t\tif sourceMap.Valid && (!iface.Self().SourceMap.Valid || !sameAttachedResult(sourceMap.Value, iface.Self().SourceMap.Value)) {\n\t\t\t\tsourceMapID, err := OptionalResultIDInput(sourceMap.Value)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn typeDef, fmt.Errorf(\"namespace interface source map 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: \"__withSourceMap\",\n\t\t\t\t\tArgs:  []dagql.NamedInput{{Name: \"sourceMap\", Value: sourceMapID}},\n\t\t\t\t}); err != nil {\n\t\t\t\t\treturn typeDef, fmt.Errorf(\"namespace interface source map: %w\", err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor _, fn := range iface.Self().Functions {\n\t\t\tupdatedFn, err := namespaceFunction(fn)\n\t\t\tif err != nil {\n\t\t\t\treturn typeDef, err\n\t\t\t}\n\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)","sourceCodeStart":1778,"sourceCodeEnd":1814,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/module.go#L1778-L1814","documentation":"Wraps a failure while attaching the namespaced SourceMap to the interface via the `__withSourceMap` dagql field (core/module.go). The SourceMap ID was built successfully but the dagql Select applying it failed. The wrapped cause identifies the server-side failure.","triggerScenarios":"After OptionalResultIDInput succeeded, dag.Select(ctx, updatedIface, ..., Field:\"__withSourceMap\") returned an error during module interface namespacing.","commonSituations":"Schema version skew between CLI and engine (field missing/renamed); transient engine errors; stale interface objects in cache.","solutions":["Read the wrapped error for the dagql/schema-level cause","Restart the Dagger engine and retry to clear transient state","Align CLI and engine versions (field may have changed between releases)","Clear cache if stale interface objects persist"],"exampleFix":"// before\n// schema skew: old CLI against new engine\ndagger functions\n// after\nbrew upgrade dagger && dagger functions","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := dag.Select(ctx, iface, &iface, sel); err != nil { return fmt.Errorf(\"attach namespaced source map failed: %w\", err); } // then restart engine and retry","preventionTips":["Align CLI/engine versions before running module commands","Restart the engine on transient schema errors","Keep caches clean after upgrades"],"tags":["dagger","dagql","source-map","schema"],"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"}