MCPcopy Create free account
hub / github.com/dagger/dagger / currentModuleDependencies

Method currentModuleDependencies

core/schema/module.go:2836–2855  ·  view source on GitHub ↗
(
	ctx context.Context,
	mod *core.CurrentModule,
	args struct{},
)

Source from the content-addressed store, hash-verified

2834}
2835
2836func (s *moduleSchema) currentModuleDependencies(
2837 ctx context.Context,
2838 mod *core.CurrentModule,
2839 args struct{},
2840) (dagql.Array[*core.Module], error) {
2841 depMods := make([]*core.Module, 0, len(mod.Module.Self().Deps.Mods()))
2842 for _, dep := range mod.Module.Self().Deps.Mods() {
2843 if depInst := dep.ModuleResult(); depInst.Self() != nil {
2844 depMods = append(depMods, depInst.Self())
2845 continue
2846 }
2847 switch dep.(type) {
2848 case *CoreMod:
2849 // skip
2850 default:
2851 return nil, fmt.Errorf("unexpected mod dependency type %T", dep)
2852 }
2853 }
2854 return depMods, nil
2855}
2856
2857func (s *moduleSchema) currentModuleSource(
2858 ctx context.Context,

Callers

nothing calls this directly

Calls 3

ModsMethod · 0.80
SelfMethod · 0.80
ModuleResultMethod · 0.65

Tested by

no test coverage detected