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

Method setModuleConfig

sdk/java/runtime/main.go:389–414  ·  view source on GitHub ↗
(ctx context.Context, modSource *dagger.ModuleSource)

Source from the content-addressed store, hash-verified

387}
388
389func (m *JavaSdk) setModuleConfig(ctx context.Context, modSource *dagger.ModuleSource) error {
390 modName, err := modSource.ModuleName(ctx)
391 if err != nil {
392 return err
393 }
394 subPath, err := modSource.SourceSubpath(ctx)
395 if err != nil {
396 return err
397 }
398 var dirPath string
399 if kind, err := modSource.Kind(ctx); err != nil {
400 return err
401 } else if kind == dagger.ModuleSourceKindLocal {
402 dirPath, err = modSource.LocalContextDirectoryPath(ctx)
403 if err != nil {
404 return err
405 }
406 }
407 m.moduleConfig = moduleConfig{
408 name: modName,
409 subPath: subPath,
410 dirPath: dirPath,
411 }
412
413 return nil
414}
415
416func (m *JavaSdk) getDaggerVersionForModule(ctx context.Context, introspectionJSON *dagger.File) (string, error) {
417 content, err := introspectionJSON.Contents(ctx)

Callers 2

CodegenMethod · 0.95
ModuleRuntimeMethod · 0.95

Calls 4

ModuleNameMethod · 0.65
SourceSubpathMethod · 0.45
KindMethod · 0.45

Tested by

no test coverage detected