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

Method moduleSourceWithEngineVersion

core/schema/modulesource.go:1462–1482  ·  view source on GitHub ↗
(
	ctx context.Context,
	src *core.ModuleSource,
	args struct {
		Version string
	},
)

Source from the content-addressed store, hash-verified

1460}
1461
1462func (s *moduleSourceSchema) moduleSourceWithEngineVersion(
1463 ctx context.Context,
1464 src *core.ModuleSource,
1465 args struct {
1466 Version string
1467 },
1468) (*core.ModuleSource, error) {
1469 src = src.Clone()
1470
1471 engineVersion := args.Version
1472 switch engineVersion {
1473 case "":
1474 engineVersion = engine.MinimumModuleVersion
1475 case modules.EngineVersionLatest:
1476 engineVersion = engine.Version
1477 }
1478 engineVersion = engine.NormalizeVersion(engineVersion)
1479 src.EngineVersion = engineVersion
1480
1481 return src, nil
1482}
1483
1484func (s *moduleSourceSchema) moduleSourceLocalContextDirectoryPath(
1485 ctx context.Context,

Callers

nothing calls this directly

Calls 2

NormalizeVersionFunction · 0.92
CloneMethod · 0.65

Tested by

no test coverage detected