{"record":{"id":"63e1d8e82c7f9870","repo":"dagger/dagger","slug":"unexpected-mod-dependency-type-t","errorCode":null,"errorMessage":"unexpected mod dependency type %T","messagePattern":"unexpected mod dependency type %T","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/schema/module.go","lineNumber":2832,"sourceCode":"\t}\n}\n\nfunc (s *moduleSchema) moduleDependencies(\n\tctx context.Context,\n\tmod *core.Module,\n\targs struct{},\n) (dagql.Array[*core.Module], error) {\n\tdepMods := make([]*core.Module, 0, len(mod.Deps.Mods()))\n\tfor _, dep := range mod.Deps.Mods() {\n\t\tif depInst := dep.ModuleResult(); depInst.Self() != nil {\n\t\t\tdepMods = append(depMods, depInst.Self())\n\t\t\tcontinue\n\t\t}\n\t\tswitch dep.(type) {\n\t\tcase *CoreMod:\n\t\t\t// skip\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"unexpected mod dependency type %T\", dep)\n\t\t}\n\t}\n\treturn depMods, nil\n}\n\nfunc (s *moduleSchema) moduleWithDescription(ctx context.Context, mod *core.Module, args struct {\n\tDescription string\n}) (*core.Module, error) {\n\treturn mod.WithDescription(args.Description), nil\n}\n\nfunc (s *moduleSchema) moduleWithObject(ctx context.Context, mod *core.Module, args struct {\n\tObject core.TypeDefID\n}) (_ *core.Module, rerr error) {\n\tdag, err := core.CurrentDagqlServer(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get dag server: %w\", err)\n\t}","sourceCodeStart":2814,"sourceCodeEnd":2850,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/schema/module.go#L2814-L2850","documentation":"Type-switch default in moduleDependencies: a module dependency's concrete type is neither a loaded module (ModuleResult set) nor *CoreMod (which is skipped). An unknown Mod implementation leaked into the dependency list — the %T shows its Go type. Indicates a new Mod kind that this code path was not updated to handle.","triggerScenarios":"Thrown at core/schema/module.go:2832 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the reported Go type to identify the unexpected Mod implementation","Update moduleDependencies to handle (or explicitly skip) that Mod kind","Ensure module dependencies are loaded before listing them"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}