Skip to content

Commit d4585bb

Browse files
committed
Add model_core.CreatedObject[TMetadata]
It happens pretty often that we need to pass a recently created object along, together with the metadata provided to ReferenceMessagePatcher. Let's turn it into a common type. A hunch I have is that we might be able to get rid of CapturedObject, simply redeclaring it recursively as: type CapturedObject model_core.CreatedObject[CapturedObject]
1 parent 2c9167b commit d4585bb

24 files changed

+182
-144
lines changed

pkg/bazelclient/commands/build/do_build.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ func DoBuild(args *arguments.BuildCommand, workspacePath path.Parser) {
331331
if l := createdRootDirectory.MaximumSymlinkEscapementLevels; l == nil || l.Value != 0 {
332332
logger.Fatalf("Module %#v contains one or more symbolic links that potentially escape the module's root directory", moduleName.String())
333333
}
334-
contents, children, err := model_core.MarshalAndEncodePatchedMessage(
334+
createdObject, err := model_core.MarshalAndEncodePatchedMessage(
335335
createdModuleRootDirectories[i].Message,
336336
referenceFormat,
337337
directoryParameters.GetEncoder(),
@@ -346,14 +346,14 @@ func DoBuild(args *arguments.BuildCommand, workspacePath path.Parser) {
346346
Name: moduleName.String(),
347347
RootDirectoryReference: createdRootDirectory.ToDirectoryReference(
348348
buildSpecificationPatcher.AddReference(
349-
contents.GetReference(),
349+
createdObject.Contents.GetReference(),
350350
model_filesystem.NewCapturedDirectoryWalker(
351351
directoryParameters.DirectoryAccessParameters,
352352
fileParameters,
353353
moduleRootDirectories[i],
354354
&model_filesystem.CapturedObject{
355-
Contents: contents,
356-
Children: children,
355+
Contents: createdObject.Contents,
356+
Children: createdObject.Metadata,
357357
},
358358
),
359359
),
@@ -370,7 +370,7 @@ func DoBuild(args *arguments.BuildCommand, workspacePath path.Parser) {
370370
logger.Fatal("Failed to create build specification encoder: ", err)
371371
}
372372

373-
buildSpecificationObject, buildSpecificationWalkers, err := model_core.MarshalAndEncodePatchedMessage(
373+
createdBuildSpecification, err := model_core.MarshalAndEncodePatchedMessage(
374374
model_core.NewPatchedMessage(&buildSpecification, buildSpecificationPatcher),
375375
referenceFormat,
376376
buildSpecificationEncoder,
@@ -381,7 +381,7 @@ func DoBuild(args *arguments.BuildCommand, workspacePath path.Parser) {
381381

382382
logger.Info("Uploading module sources")
383383
instanceName := object.NewInstanceName(args.CommonFlags.RemoteInstanceName)
384-
buildSpecificationReference := buildSpecificationObject.GetReference()
384+
buildSpecificationReference := createdBuildSpecification.Contents.GetReference()
385385
if err := dag.UploadDAG(
386386
context.Background(),
387387
dag_pb.NewUploaderClient(remoteCacheClient),
@@ -390,8 +390,8 @@ func DoBuild(args *arguments.BuildCommand, workspacePath path.Parser) {
390390
LocalReference: buildSpecificationReference,
391391
},
392392
dag.NewSimpleObjectContentsWalker(
393-
buildSpecificationObject,
394-
buildSpecificationWalkers,
393+
createdBuildSpecification.Contents,
394+
createdBuildSpecification.Metadata,
395395
),
396396
semaphore.NewWeighted(10),
397397
object.NewLimit(&object_pb.Limit{

pkg/model/analysis/action_result.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,15 @@ func (c *baseComputer) convertDictToEnvironmentVariableList(environment map[stri
109109
btree.NewObjectCreatingNodeMerger(
110110
commandEncoder,
111111
c.buildSpecificationReference.GetReferenceFormat(),
112-
/* parentNodeComputer = */ func(contents *object.Contents, childNodes []*model_command_pb.EnvironmentVariableList_Element, outgoingReferences object.OutgoingReferences, metadata []dag.ObjectContentsWalker) (model_core.PatchedMessage[*model_command_pb.EnvironmentVariableList_Element, dag.ObjectContentsWalker], error) {
112+
/* parentNodeComputer = */ func(createdObject model_core.CreatedObject[dag.ObjectContentsWalker], childNodes []*model_command_pb.EnvironmentVariableList_Element) (model_core.PatchedMessage[*model_command_pb.EnvironmentVariableList_Element, dag.ObjectContentsWalker], error) {
113113
patcher := model_core.NewReferenceMessagePatcher[dag.ObjectContentsWalker]()
114114
return model_core.NewPatchedMessage(
115115
&model_command_pb.EnvironmentVariableList_Element{
116116
Level: &model_command_pb.EnvironmentVariableList_Element_Parent{
117-
Parent: patcher.AddReference(contents.GetReference(), dag.NewSimpleObjectContentsWalker(contents, metadata)),
117+
Parent: patcher.AddReference(
118+
createdObject.Contents.GetReference(),
119+
dag.NewSimpleObjectContentsWalker(createdObject.Contents, createdObject.Metadata),
120+
),
118121
},
119122
},
120123
patcher,

pkg/model/analysis/http_archive_contents.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -406,15 +406,15 @@ func (c *baseComputer) ComputeHttpArchiveContentsValue(ctx context.Context, key
406406
if l := createdRootDirectory.MaximumSymlinkEscapementLevels; l == nil || l.Value != 0 {
407407
return PatchedHttpArchiveContentsValue{}, errors.New("archive contains one or more symbolic links that potentially escape the archive's root directory")
408408
}
409-
contents, children, err := model_core.MarshalAndEncodePatchedMessage(
409+
createdRootDirectoryObject, err := model_core.MarshalAndEncodePatchedMessage(
410410
createdRootDirectory.Message,
411411
referenceFormat,
412412
directoryCreationParameters.GetEncoder(),
413413
)
414414
if err != nil {
415415
return PatchedHttpArchiveContentsValue{}, err
416416
}
417-
capturedRootDirectory := fileWritingMerkleTreeCapturer.CaptureObject(contents, children)
417+
capturedRootDirectory := fileWritingMerkleTreeCapturer.CaptureObject(createdRootDirectoryObject)
418418

419419
// Finalize writing of Merkle tree nodes to disk, and provide
420420
// read access to the nodes, so that they can be uploaded.
@@ -426,7 +426,7 @@ func (c *baseComputer) ComputeHttpArchiveContentsValue(ctx context.Context, key
426426
merkleTreeNodes = nil
427427

428428
patcher := model_core.NewReferenceMessagePatcher[dag.ObjectContentsWalker]()
429-
rootReference := contents.GetReference()
429+
rootReference := createdRootDirectoryObject.Contents.GetReference()
430430
return PatchedHttpArchiveContentsValue{
431431
Message: &model_analysis_pb.HttpArchiveContents_Value{
432432
Exists: createdRootDirectory.ToDirectoryReference(

pkg/model/analysis/module_extension_repos.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ func (c *baseComputer) ComputeModuleExtensionReposValue(ctx context.Context, key
341341
btree.NewObjectCreatingNodeMerger(
342342
model_encoding.NewChainedBinaryEncoder(nil),
343343
c.buildSpecificationReference.GetReferenceFormat(),
344-
/* parentNodeComputer = */ func(contents *object.Contents, childNodes []*model_analysis_pb.ModuleExtensionRepos_Value_Repo, outgoingReferences object.OutgoingReferences, metadata []dag.ObjectContentsWalker) (model_core.PatchedMessage[*model_analysis_pb.ModuleExtensionRepos_Value_Repo, dag.ObjectContentsWalker], error) {
344+
/* parentNodeComputer = */ func(createdObject model_core.CreatedObject[dag.ObjectContentsWalker], childNodes []*model_analysis_pb.ModuleExtensionRepos_Value_Repo) (model_core.PatchedMessage[*model_analysis_pb.ModuleExtensionRepos_Value_Repo, dag.ObjectContentsWalker], error) {
345345
var firstName string
346346
switch firstElement := childNodes[0].Level.(type) {
347347
case *model_analysis_pb.ModuleExtensionRepos_Value_Repo_Leaf:
@@ -354,7 +354,10 @@ func (c *baseComputer) ComputeModuleExtensionReposValue(ctx context.Context, key
354354
&model_analysis_pb.ModuleExtensionRepos_Value_Repo{
355355
Level: &model_analysis_pb.ModuleExtensionRepos_Value_Repo_Parent_{
356356
Parent: &model_analysis_pb.ModuleExtensionRepos_Value_Repo_Parent{
357-
Reference: patcher.AddReference(contents.GetReference(), dag.NewSimpleObjectContentsWalker(contents, metadata)),
357+
Reference: patcher.AddReference(
358+
createdObject.Contents.GetReference(),
359+
dag.NewSimpleObjectContentsWalker(createdObject.Contents, createdObject.Metadata),
360+
),
358361
FirstName: firstName,
359362
},
360363
},

pkg/model/analysis/package.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (c *baseComputer) ComputePackageValue(ctx context.Context, key *model_analy
144144
btree.NewObjectCreatingNodeMerger(
145145
model_encoding.NewChainedBinaryEncoder(nil),
146146
c.buildSpecificationReference.GetReferenceFormat(),
147-
/* parentNodeComputer = */ func(contents *object.Contents, childNodes []*model_analysis_pb.Package_Value_Target, outgoingReferences object.OutgoingReferences, metadata []dag.ObjectContentsWalker) (model_core.PatchedMessage[*model_analysis_pb.Package_Value_Target, dag.ObjectContentsWalker], error) {
147+
/* parentNodeComputer = */ func(createdObject model_core.CreatedObject[dag.ObjectContentsWalker], childNodes []*model_analysis_pb.Package_Value_Target) (model_core.PatchedMessage[*model_analysis_pb.Package_Value_Target, dag.ObjectContentsWalker], error) {
148148
var firstName string
149149
switch firstElement := childNodes[0].Level.(type) {
150150
case *model_analysis_pb.Package_Value_Target_Leaf:
@@ -157,7 +157,10 @@ func (c *baseComputer) ComputePackageValue(ctx context.Context, key *model_analy
157157
&model_analysis_pb.Package_Value_Target{
158158
Level: &model_analysis_pb.Package_Value_Target_Parent_{
159159
Parent: &model_analysis_pb.Package_Value_Target_Parent{
160-
Reference: patcher.AddReference(contents.GetReference(), dag.NewSimpleObjectContentsWalker(contents, metadata)),
160+
Reference: patcher.AddReference(
161+
createdObject.Contents.GetReference(),
162+
dag.NewSimpleObjectContentsWalker(createdObject.Contents, createdObject.Metadata),
163+
),
161164
FirstName: firstName,
162165
},
163166
},

pkg/model/analysis/repo.go

+23-20
Original file line numberDiff line numberDiff line change
@@ -1475,12 +1475,15 @@ func (mrc *moduleOrRepositoryContext) doExecute(thread *starlark.Thread, b *star
14751475
btree.NewObjectCreatingNodeMerger(
14761476
mrc.commandEncoder,
14771477
referenceFormat,
1478-
/* parentNodeComputer = */ func(contents *object.Contents, childNodes []*model_command_pb.ArgumentList_Element, outgoingReferences object.OutgoingReferences, metadata []dag.ObjectContentsWalker) (model_core.PatchedMessage[*model_command_pb.ArgumentList_Element, dag.ObjectContentsWalker], error) {
1478+
/* parentNodeComputer = */ func(createdObject model_core.CreatedObject[dag.ObjectContentsWalker], childNodes []*model_command_pb.ArgumentList_Element) (model_core.PatchedMessage[*model_command_pb.ArgumentList_Element, dag.ObjectContentsWalker], error) {
14791479
patcher := model_core.NewReferenceMessagePatcher[dag.ObjectContentsWalker]()
14801480
return model_core.NewPatchedMessage(
14811481
&model_command_pb.ArgumentList_Element{
14821482
Level: &model_command_pb.ArgumentList_Element_Parent{
1483-
Parent: patcher.AddReference(contents.GetReference(), dag.NewSimpleObjectContentsWalker(contents, metadata)),
1483+
Parent: patcher.AddReference(
1484+
createdObject.Contents.GetReference(),
1485+
dag.NewSimpleObjectContentsWalker(createdObject.Contents, createdObject.Metadata),
1486+
),
14841487
},
14851488
},
14861489
patcher,
@@ -1555,7 +1558,7 @@ func (mrc *moduleOrRepositoryContext) doExecute(thread *starlark.Thread, b *star
15551558

15561559
commandPatcher := argumentList.Patcher
15571560
commandPatcher.Merge(environmentVariableList.Patcher)
1558-
commandContents, commandMetadata, err := model_core.MarshalAndEncodePatchedMessage(
1561+
createdCommand, err := model_core.MarshalAndEncodePatchedMessage(
15591562
model_core.NewPatchedMessage(
15601563
&model_command_pb.Command{
15611564
Arguments: argumentList.Message,
@@ -1586,8 +1589,8 @@ func (mrc *moduleOrRepositoryContext) doExecute(thread *starlark.Thread, b *star
15861589
Message: &model_analysis_pb.ActionResult_Key{
15871590
PlatformPkixPublicKey: mrc.repoPlatform.Message.ExecPkixPublicKey,
15881591
CommandReference: keyPatcher.AddReference(
1589-
commandContents.GetReference(),
1590-
dag.NewSimpleObjectContentsWalker(commandContents, commandMetadata),
1592+
createdCommand.Contents.GetReference(),
1593+
dag.NewSimpleObjectContentsWalker(createdCommand.Contents, createdCommand.Metadata),
15911594
),
15921595
InputRootReference: inputRootReference.Message.Reference,
15931596
ExecutionTimeout: &durationpb.Duration{Seconds: timeout},
@@ -1852,7 +1855,7 @@ func (mrc *moduleOrRepositoryContext) doRead(thread *starlark.Thread, b *starlar
18521855
return nil, err
18531856
}
18541857

1855-
commandContents, commandMetadata, err := model_core.MarshalAndEncodePatchedMessage(
1858+
createdCommand, err := model_core.MarshalAndEncodePatchedMessage(
18561859
model_core.NewPatchedMessage(
18571860
&model_command_pb.Command{
18581861
Arguments: []*model_command_pb.ArgumentList_Element{
@@ -1893,8 +1896,8 @@ func (mrc *moduleOrRepositoryContext) doRead(thread *starlark.Thread, b *starlar
18931896
Message: &model_analysis_pb.ActionResult_Key{
18941897
PlatformPkixPublicKey: mrc.repoPlatform.Message.ExecPkixPublicKey,
18951898
CommandReference: keyPatcher.AddReference(
1896-
commandContents.GetReference(),
1897-
dag.NewSimpleObjectContentsWalker(commandContents, commandMetadata),
1899+
createdCommand.Contents.GetReference(),
1900+
dag.NewSimpleObjectContentsWalker(createdCommand.Contents, createdCommand.Metadata),
18981901
),
18991902
InputRootReference: inputRootReference.Message.Reference,
19001903
ExecutionTimeout: &durationpb.Duration{Seconds: 300},
@@ -1986,7 +1989,7 @@ func (mrc *moduleOrRepositoryContext) doWhich(thread *starlark.Thread, b *starla
19861989
}
19871990

19881991
referenceFormat := mrc.computer.buildSpecificationReference.GetReferenceFormat()
1989-
commandContents, commandMetadata, err := model_core.MarshalAndEncodePatchedMessage(
1992+
createdCommand, err := model_core.MarshalAndEncodePatchedMessage(
19901993
model_core.NewPatchedMessage(
19911994
&model_command_pb.Command{
19921995
Arguments: []*model_command_pb.ArgumentList_Element{
@@ -2020,7 +2023,7 @@ func (mrc *moduleOrRepositoryContext) doWhich(thread *starlark.Thread, b *starla
20202023
return nil, fmt.Errorf("failed to create command: %w", err)
20212024
}
20222025

2023-
inputRootContents, inputRootMetadata, err := model_core.MarshalAndEncodePatchedMessage(
2026+
createdInputRoot, err := model_core.MarshalAndEncodePatchedMessage(
20242027
model_core.NewSimplePatchedMessage[dag.ObjectContentsWalker](
20252028
&model_filesystem_pb.Directory{
20262029
Leaves: &model_filesystem_pb.Directory_LeavesInline{
@@ -2041,12 +2044,12 @@ func (mrc *moduleOrRepositoryContext) doWhich(thread *starlark.Thread, b *starla
20412044
Message: &model_analysis_pb.ActionResult_Key{
20422045
PlatformPkixPublicKey: mrc.repoPlatform.Message.ExecPkixPublicKey,
20432046
CommandReference: keyPatcher.AddReference(
2044-
commandContents.GetReference(),
2045-
dag.NewSimpleObjectContentsWalker(commandContents, commandMetadata),
2047+
createdCommand.Contents.GetReference(),
2048+
dag.NewSimpleObjectContentsWalker(createdCommand.Contents, createdCommand.Metadata),
20462049
),
20472050
InputRootReference: keyPatcher.AddReference(
2048-
inputRootContents.GetReference(),
2049-
dag.NewSimpleObjectContentsWalker(inputRootContents, inputRootMetadata),
2051+
createdInputRoot.Contents.GetReference(),
2052+
dag.NewSimpleObjectContentsWalker(createdInputRoot.Contents, createdInputRoot.Metadata),
20502053
),
20512054
ExecutionTimeout: &durationpb.Duration{Seconds: 60},
20522055
},
@@ -2161,7 +2164,7 @@ func (mrc *moduleOrRepositoryContext) Exists(p *model_starlark.BarePath) (bool,
21612164
return false, err
21622165
}
21632166

2164-
commandContents, commandMetadata, err := model_core.MarshalAndEncodePatchedMessage(
2167+
createdCommand, err := model_core.MarshalAndEncodePatchedMessage(
21652168
model_core.NewPatchedMessage(
21662169
&model_command_pb.Command{
21672170
Arguments: []*model_command_pb.ArgumentList_Element{
@@ -2207,8 +2210,8 @@ func (mrc *moduleOrRepositoryContext) Exists(p *model_starlark.BarePath) (bool,
22072210
Message: &model_analysis_pb.ActionResult_Key{
22082211
PlatformPkixPublicKey: mrc.repoPlatform.Message.ExecPkixPublicKey,
22092212
CommandReference: keyPatcher.AddReference(
2210-
commandContents.GetReference(),
2211-
dag.NewSimpleObjectContentsWalker(commandContents, commandMetadata),
2213+
createdCommand.Contents.GetReference(),
2214+
dag.NewSimpleObjectContentsWalker(createdCommand.Contents, createdCommand.Metadata),
22122215
),
22132216
InputRootReference: inputRootReference.Message.Reference,
22142217
ExecutionTimeout: &durationpb.Duration{Seconds: 300},
@@ -2972,15 +2975,15 @@ func (c *baseComputer) createMerkleTreeFromChangeTrackingDirectory(ctx context.C
29722975

29732976
// Store the root directory itself. We don't embed it into the
29742977
// response, as that prevents it from being accessed separately.
2975-
contents, children, err := model_core.MarshalAndEncodePatchedMessage(
2978+
createdRootDirectoryObject, err := model_core.MarshalAndEncodePatchedMessage(
29762979
createdRootDirectory.Message,
29772980
c.buildSpecificationReference.GetReferenceFormat(),
29782981
directoryCreationParameters.GetEncoder(),
29792982
)
29802983
if err != nil {
29812984
return model_core.PatchedMessage[*model_filesystem_pb.DirectoryReference, dag.ObjectContentsWalker]{}, err
29822985
}
2983-
capturedRootDirectory := fileWritingMerkleTreeCapturer.CaptureObject(contents, children)
2986+
capturedRootDirectory := fileWritingMerkleTreeCapturer.CaptureObject(createdRootDirectoryObject)
29842987

29852988
// Finalize writing of Merkle tree nodes to disk, and provide
29862989
// read access to the nodes, so that they can be uploaded.
@@ -2992,7 +2995,7 @@ func (c *baseComputer) createMerkleTreeFromChangeTrackingDirectory(ctx context.C
29922995
merkleTreeNodes = nil
29932996

29942997
patcher := model_core.NewReferenceMessagePatcher[dag.ObjectContentsWalker]()
2995-
rootReference := contents.GetReference()
2998+
rootReference := createdRootDirectoryObject.Contents.GetReference()
29962999
return model_core.NewPatchedMessage(
29973000
createdRootDirectory.ToDirectoryReference(
29983001
patcher.AddReference(

pkg/model/analysis/stable_input_root_path.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (c *baseComputer) ComputeStableInputRootPathValue(ctx context.Context, key
4141
}
4242

4343
referenceFormat := c.buildSpecificationReference.GetReferenceFormat()
44-
commandContents, commandMetadata, err := model_core.MarshalAndEncodePatchedMessage(
44+
createdCommand, err := model_core.MarshalAndEncodePatchedMessage(
4545
model_core.NewPatchedMessage(
4646
&model_command_pb.Command{
4747
Arguments: []*model_command_pb.ArgumentList_Element{{
@@ -64,7 +64,7 @@ func (c *baseComputer) ComputeStableInputRootPathValue(ctx context.Context, key
6464
return PatchedStableInputRootPathValue{}, fmt.Errorf("failed to create command: %w", err)
6565
}
6666

67-
inputRootContents, inputRootMetadata, err := model_core.MarshalAndEncodePatchedMessage(
67+
createdInputRoot, err := model_core.MarshalAndEncodePatchedMessage(
6868
model_core.NewSimplePatchedMessage[dag.ObjectContentsWalker](
6969
&model_filesystem_pb.Directory{
7070
Leaves: &model_filesystem_pb.Directory_LeavesInline{
@@ -85,12 +85,12 @@ func (c *baseComputer) ComputeStableInputRootPathValue(ctx context.Context, key
8585
Message: &model_analysis_pb.ActionResult_Key{
8686
PlatformPkixPublicKey: repoPlatform.Message.ExecPkixPublicKey,
8787
CommandReference: keyPatcher.AddReference(
88-
commandContents.GetReference(),
89-
dag.NewSimpleObjectContentsWalker(commandContents, commandMetadata),
88+
createdCommand.Contents.GetReference(),
89+
dag.NewSimpleObjectContentsWalker(createdCommand.Contents, createdCommand.Metadata),
9090
),
9191
InputRootReference: keyPatcher.AddReference(
92-
inputRootContents.GetReference(),
93-
dag.NewSimpleObjectContentsWalker(inputRootContents, inputRootMetadata),
92+
createdInputRoot.Contents.GetReference(),
93+
dag.NewSimpleObjectContentsWalker(createdInputRoot.Contents, createdInputRoot.Metadata),
9494
),
9595
ExecutionTimeout: &durationpb.Duration{Seconds: 60},
9696
ExitCodeMustBeZero: true,

pkg/model/analysis/target_pattern_expansion.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,15 @@ func (c *baseComputer) ComputeTargetPatternExpansionValue(ctx context.Context, k
8989
btree.NewObjectCreatingNodeMerger(
9090
model_encoding.NewChainedBinaryEncoder(nil),
9191
c.buildSpecificationReference.GetReferenceFormat(),
92-
/* parentNodeComputer = */ func(contents *object.Contents, childNodes []*model_analysis_pb.TargetPatternExpansion_Value_TargetLabel, outgoingReferences object.OutgoingReferences, metadata []dag.ObjectContentsWalker) (model_core.PatchedMessage[*model_analysis_pb.TargetPatternExpansion_Value_TargetLabel, dag.ObjectContentsWalker], error) {
92+
/* parentNodeComputer = */ func(createdObject model_core.CreatedObject[dag.ObjectContentsWalker], childNodes []*model_analysis_pb.TargetPatternExpansion_Value_TargetLabel) (model_core.PatchedMessage[*model_analysis_pb.TargetPatternExpansion_Value_TargetLabel, dag.ObjectContentsWalker], error) {
9393
patcher := model_core.NewReferenceMessagePatcher[dag.ObjectContentsWalker]()
9494
return model_core.NewPatchedMessage(
9595
&model_analysis_pb.TargetPatternExpansion_Value_TargetLabel{
9696
Level: &model_analysis_pb.TargetPatternExpansion_Value_TargetLabel_Parent_{
9797
Parent: &model_analysis_pb.TargetPatternExpansion_Value_TargetLabel_Parent{
98-
Reference: patcher.AddReference(contents.GetReference(), dag.NewSimpleObjectContentsWalker(contents, metadata)),
98+
Reference: patcher.AddReference(
99+
createdObject.Contents.GetReference(),
100+
dag.NewSimpleObjectContentsWalker(createdObject.Contents, createdObject.Metadata)),
99101
},
100102
},
101103
},

0 commit comments

Comments
 (0)