From 2a06616ed4192018e7bd5b0b34ecdb526324fc47 Mon Sep 17 00:00:00 2001 From: John Chadwick Date: Tue, 13 Feb 2024 15:12:06 -0500 Subject: [PATCH 1/3] Fix some documentation issues --- private/bufpkg/bufmodule/commit_key.go | 2 +- private/bufpkg/bufmodule/module_data.go | 6 ++---- private/bufpkg/bufmodule/module_key.go | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/private/bufpkg/bufmodule/commit_key.go b/private/bufpkg/bufmodule/commit_key.go index d367fe9edf..a78de089f2 100644 --- a/private/bufpkg/bufmodule/commit_key.go +++ b/private/bufpkg/bufmodule/commit_key.go @@ -42,7 +42,7 @@ type CommitKey interface { // DigestType returns the DigestType of the Commit. // // Note this is *not* a bufcas.Digest - this is a Digest. bufcas.Digests are a lower-level - // type that just deal in terms of files and content. A Moduleigest is a specific algorithm + // type that just deal in terms of files and content. A ModuleDigest is a specific algorithm // applied to a set of files and dependencies. DigestType() DigestType diff --git a/private/bufpkg/bufmodule/module_data.go b/private/bufpkg/bufmodule/module_data.go index fcd9f9c80c..e11b685264 100644 --- a/private/bufpkg/bufmodule/module_data.go +++ b/private/bufpkg/bufmodule/module_data.go @@ -46,15 +46,13 @@ type ModuleData interface { // BufYAMLObjectData gets the v1beta1 or v1 buf.yaml ObjectData. // - // This is always present, even if the Module was created from a v2 buf.yaml file. The BSR will - // synthesize a value. + // This is only set if the Module was created from a v1 or v1beta1 buf.yaml file. // // This is used for digest calcuations. It is not used otherwise. V1Beta1OrV1BufYAMLObjectData() (ObjectData, error) // BufYAMLObjectData gets the v1beta1 or v1 buf.lock ObjectData. // - // This is always present, even if the Module was created from a v2 buf.yaml file. The BSR will - // synthesize a value. + // This is only set if the Module was created from a v1 or v1beta1 buf.lock file. // // This is used for digest calcuations. It is not used otherwise. V1Beta1OrV1BufLockObjectData() (ObjectData, error) diff --git a/private/bufpkg/bufmodule/module_key.go b/private/bufpkg/bufmodule/module_key.go index af2ec62dcd..8faa024b8b 100644 --- a/private/bufpkg/bufmodule/module_key.go +++ b/private/bufpkg/bufmodule/module_key.go @@ -47,7 +47,7 @@ type ModuleKey interface { // Digest returns the Module digest. // // Note this is *not* a bufcas.Digest - this is a Digest. bufcas.Digests are a lower-level - // type that just deal in terms of files and content. A Moduleigest is a specific algorithm + // type that just deal in terms of files and content. A ModuleDigest is a specific algorithm // applied to a set of files and dependencies. Digest() (Digest, error) From 202dec8a600e92c9c2bda07f758917059a76b809 Mon Sep 17 00:00:00 2001 From: John Chadwick Date: Wed, 14 Feb 2024 15:49:43 -0500 Subject: [PATCH 2/3] I was wrong, undo. Fix calcuations -> calculations, too --- private/bufpkg/bufmodule/module_data.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/private/bufpkg/bufmodule/module_data.go b/private/bufpkg/bufmodule/module_data.go index e11b685264..db0502329f 100644 --- a/private/bufpkg/bufmodule/module_data.go +++ b/private/bufpkg/bufmodule/module_data.go @@ -46,15 +46,17 @@ type ModuleData interface { // BufYAMLObjectData gets the v1beta1 or v1 buf.yaml ObjectData. // - // This is only set if the Module was created from a v1 or v1beta1 buf.yaml file. + // This is always present, even if the Module was created from a v2 buf.yaml file. The BSR will + // synthesize a value. // - // This is used for digest calcuations. It is not used otherwise. + // This is used for digest calculations. It is not used otherwise. V1Beta1OrV1BufYAMLObjectData() (ObjectData, error) // BufYAMLObjectData gets the v1beta1 or v1 buf.lock ObjectData. // - // This is only set if the Module was created from a v1 or v1beta1 buf.lock file. + // This is always present, even if the Module was created from a v2 buf.yaml file. The BSR will + // synthesize a value. // - // This is used for digest calcuations. It is not used otherwise. + // This is used for digest calculations. It is not used otherwise. V1Beta1OrV1BufLockObjectData() (ObjectData, error) isModuleData() From 0bbecfd3401e8d988f2a8c62b452441f837b10bc Mon Sep 17 00:00:00 2001 From: John Chadwick Date: Wed, 14 Feb 2024 19:12:32 -0500 Subject: [PATCH 3/3] Hopefully correct comment fixes --- private/bufpkg/bufmodule/module_data.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/private/bufpkg/bufmodule/module_data.go b/private/bufpkg/bufmodule/module_data.go index db0502329f..e96fb4a38e 100644 --- a/private/bufpkg/bufmodule/module_data.go +++ b/private/bufpkg/bufmodule/module_data.go @@ -44,17 +44,17 @@ type ModuleData interface { // DeclaredDepModuleKeys returns the declared dependencies for this specific Module. DeclaredDepModuleKeys() ([]ModuleKey, error) - // BufYAMLObjectData gets the v1beta1 or v1 buf.yaml ObjectData. + // V1Beta1OrV1BufYAMLObjectData gets the v1beta1 or v1 buf.yaml ObjectData. // // This is always present, even if the Module was created from a v2 buf.yaml file. The BSR will // synthesize a value. // // This is used for digest calculations. It is not used otherwise. V1Beta1OrV1BufYAMLObjectData() (ObjectData, error) - // BufYAMLObjectData gets the v1beta1 or v1 buf.lock ObjectData. + // V1Beta1OrV1BufLockObjectData gets the v1beta1 or v1 buf.lock ObjectData. // - // This is always present, even if the Module was created from a v2 buf.yaml file. The BSR will - // synthesize a value. + // This is present even if the Module was created with a v2 buf.lock file. The BSR will + // synthesize a value. It may not be present if the module did not contain a buf.lock file. // // This is used for digest calculations. It is not used otherwise. V1Beta1OrV1BufLockObjectData() (ObjectData, error)