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

Method getDaggerVersionForModule

sdk/java/runtime/main.go:416–430  ·  view source on GitHub ↗
(ctx context.Context, introspectionJSON *dagger.File)

Source from the content-addressed store, hash-verified

414}
415
416func (m *JavaSdk) getDaggerVersionForModule(ctx context.Context, introspectionJSON *dagger.File) (string, error) {
417 content, err := introspectionJSON.Contents(ctx)
418 if err != nil {
419 return "", err
420 }
421 var introspectJSON IntrospectJSON
422 if err = json.Unmarshal([]byte(content), &introspectJSON); err != nil {
423 return "", err
424 }
425 return fmt.Sprintf(
426 "%s-%s-module",
427 strings.TrimPrefix(introspectJSON.SchemaVersion, "v"),
428 m.moduleConfig.name,
429 ), nil
430}
431
432type IntrospectJSON struct {
433 SchemaVersion string `json:"__schemaVersion"`

Callers 2

codegenBaseMethod · 0.95
buildJavaDependenciesMethod · 0.95

Calls 2

UnmarshalMethod · 0.65
ContentsMethod · 0.45

Tested by

no test coverage detected