MCPcopy Index your code
hub / github.com/dagger/dagger / pendingLegacyModule

Function pendingLegacyModule

engine/server/session_workspaces.go:399–426  ·  view source on GitHub ↗
(
	ws *workspace.Workspace,
	resolveLocalRef func(ws *workspace.Workspace, relPath string) string,
	name, source, pin string,
	entrypoint bool,
	configDefaults map[string]any,
	argCustomizations []*modules.ModuleConfigArgument,
)

Source from the content-addressed store, hash-verified

397}
398
399func pendingLegacyModule(
400 ws *workspace.Workspace,
401 resolveLocalRef func(ws *workspace.Workspace, relPath string) string,
402 name, source, pin string,
403 entrypoint bool,
404 configDefaults map[string]any,
405 argCustomizations []*modules.ModuleConfigArgument,
406) pendingModule {
407 kind := core.FastModuleSourceKindCheck(source, pin)
408 ref := source
409 if kind == core.ModuleSourceKindLocal {
410 ref = resolveLocalRef(ws, source)
411 }
412
413 mod := pendingModule{
414 Ref: ref,
415 RefPin: pin,
416 Name: name,
417 Entrypoint: entrypoint,
418 LegacyDefaultPath: true,
419 ConfigDefaults: configDefaults,
420 ArgCustomizations: argCustomizations,
421 }
422 if kind == core.ModuleSourceKindLocal {
423 mod.RefPin = ""
424 }
425 return mod
426}
427
428func legacyCallerModuleDir(isLocal bool, moduleDir string) string {
429 if !isLocal || moduleDir == "" {

Callers 2

TestPendingLegacyModuleFunction · 0.85

Calls 1

Tested by 1

TestPendingLegacyModuleFunction · 0.68