@@ -230,17 +230,17 @@ func ModuleDirectModuleDeps(module Module) ([]ModuleDep, error) {
230
230
type module struct {
231
231
ModuleReadBucket
232
232
233
- ctx context.Context
234
- getBucket func () (storage.ReadBucket , error )
235
- bucketID string
236
- description string
237
- moduleFullName bufparse.FullName
238
- commitID uuid.UUID
239
- isTarget bool
240
- isLocal bool
241
- getV1BufYAMLObjectData func () (ObjectData , error )
242
- getV1BufLockObjectData func () (ObjectData , error )
243
- getDeclaredDepModuleKeysB5 func () ([]ModuleKey , error )
233
+ ctx context.Context
234
+ getBucket func () (storage.ReadBucket , error )
235
+ bucketID string
236
+ description string
237
+ moduleFullName bufparse.FullName
238
+ commitID uuid.UUID
239
+ isTarget bool
240
+ isLocal bool
241
+ getV1BufYAMLObjectData func () (ObjectData , error )
242
+ getV1BufLockObjectData func () (ObjectData , error )
243
+ getDepModuleKeysB5 func () ([]ModuleKey , error )
244
244
245
245
moduleSet ModuleSet
246
246
@@ -261,7 +261,7 @@ func newModule(
261
261
isLocal bool ,
262
262
getV1BufYAMLObjectData func () (ObjectData , error ),
263
263
getV1BufLockObjectData func () (ObjectData , error ),
264
- getDeclaredDepModuleKeysB5 func () ([]ModuleKey , error ),
264
+ getDepModuleKeysB5 func () ([]ModuleKey , error ),
265
265
targetPaths []string ,
266
266
targetExcludePaths []string ,
267
267
protoFileTargetPath string ,
@@ -304,17 +304,17 @@ func newModule(
304
304
}
305
305
306
306
module := & module {
307
- ctx : ctx ,
308
- getBucket : syncOnceValuesGetBucketWithStorageMatcherApplied ,
309
- bucketID : bucketID ,
310
- description : description ,
311
- moduleFullName : moduleFullName ,
312
- commitID : commitID ,
313
- isTarget : isTarget ,
314
- isLocal : isLocal ,
315
- getV1BufYAMLObjectData : sync .OnceValues (getV1BufYAMLObjectData ),
316
- getV1BufLockObjectData : sync .OnceValues (getV1BufLockObjectData ),
317
- getDeclaredDepModuleKeysB5 : sync .OnceValues (getDeclaredDepModuleKeysB5 ),
307
+ ctx : ctx ,
308
+ getBucket : syncOnceValuesGetBucketWithStorageMatcherApplied ,
309
+ bucketID : bucketID ,
310
+ description : description ,
311
+ moduleFullName : moduleFullName ,
312
+ commitID : commitID ,
313
+ isTarget : isTarget ,
314
+ isLocal : isLocal ,
315
+ getV1BufYAMLObjectData : sync .OnceValues (getV1BufYAMLObjectData ),
316
+ getV1BufLockObjectData : sync .OnceValues (getV1BufLockObjectData ),
317
+ getDepModuleKeysB5 : sync .OnceValues (getDepModuleKeysB5 ),
318
318
}
319
319
moduleReadBucket , err := newModuleReadBucketForModule (
320
320
ctx ,
@@ -398,17 +398,17 @@ func (m *module) ModuleSet() ModuleSet {
398
398
func (m * module ) withIsTarget (isTarget bool ) (Module , error ) {
399
399
// We don't just call newModule directly as we don't want to double sync.OnceValues stuff.
400
400
newModule := & module {
401
- ctx : m .ctx ,
402
- getBucket : m .getBucket ,
403
- bucketID : m .bucketID ,
404
- description : m .description ,
405
- moduleFullName : m .moduleFullName ,
406
- commitID : m .commitID ,
407
- isTarget : isTarget ,
408
- isLocal : m .isLocal ,
409
- getV1BufYAMLObjectData : m .getV1BufYAMLObjectData ,
410
- getV1BufLockObjectData : m .getV1BufLockObjectData ,
411
- getDeclaredDepModuleKeysB5 : m . getDeclaredDepModuleKeysB5 ,
401
+ ctx : m .ctx ,
402
+ getBucket : m .getBucket ,
403
+ bucketID : m .bucketID ,
404
+ description : m .description ,
405
+ moduleFullName : m .moduleFullName ,
406
+ commitID : m .commitID ,
407
+ isTarget : isTarget ,
408
+ isLocal : m .isLocal ,
409
+ getV1BufYAMLObjectData : m .getV1BufYAMLObjectData ,
410
+ getV1BufLockObjectData : m .getV1BufLockObjectData ,
411
+ getDepModuleKeysB5 : m . getDepModuleKeysB5 ,
412
412
}
413
413
moduleReadBucket , ok := m .ModuleReadBucket .(* moduleReadBucket )
414
414
if ! ok {
@@ -452,26 +452,26 @@ func newGetDigestFuncForModuleAndDigestType(module *module, digestType DigestTyp
452
452
}
453
453
return getB4Digest (module .ctx , bucket , v1BufYAMLObjectData , v1BufLockObjectData )
454
454
case DigestTypeB5 :
455
- // B5 digests are calculated from the Module's content and its declared dependencies.
455
+ // B5 digests are calculated from the Module's content and its dependencies.
456
456
//
457
- // Declared dependencies are all direct and transitive dependencies of the Module.
458
- // For local Modules, the declared dependencies are resolved to the current ModuleSet.
459
- // For remote Modules, the declared dependencies are the ModuleKeys of
457
+ // Dependencies are all direct and transitive dependencies of the Module.
458
+ // For local Modules, the dependencies are resolved to the current ModuleSet.
459
+ // For remote Modules, the dependencies are the ModuleKeys of
460
460
// the direct and transitive dependencies of the Module at the specific commit.
461
461
//
462
- // This is effectively the same. The local Modules have a declared dependency at the current commit,
463
- // and the remote Modules have a declared dependency at a specific commit. Pushing up a local Module
462
+ // This is effectively the same. The local Modules have a dependency at the current commit,
463
+ // and the remote Modules have a dependency at a specific commit. Pushing up a local Module
464
464
// as a remote Module will result in the same Digest.
465
465
//
466
- // See the comment on getDeclaredDepModuleKeysB5 for more information.
466
+ // See the comment on getDepModuleKeysB5 for more information.
467
467
if ! module .isLocal {
468
- declaredDepModuleKeys , err := module .getDeclaredDepModuleKeysB5 ()
468
+ depModuleKeys , err := module .getDepModuleKeysB5 ()
469
469
if err != nil {
470
470
return nil , err
471
471
}
472
- return getB5DigestForBucketAndDepModuleKeys (module .ctx , bucket , declaredDepModuleKeys )
472
+ return getB5DigestForBucketAndDepModuleKeys (module .ctx , bucket , depModuleKeys )
473
473
}
474
- // ModuleDeps returns the declared dependent Modules resolved for the target Module in the ModuleSet.
474
+ // ModuleDeps returns the dependent Modules resolved for the target Module in the ModuleSet.
475
475
// A local Module will recursively resolve the Digest of other dependent local Modules.
476
476
// This is done by calling Module.Digest(DigestTypeB5) on each ModuleDep.
477
477
moduleDeps , err := module .ModuleDeps ()
0 commit comments