summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-13 04:14:51 -0600
committerJeff Carr <[email protected]>2025-01-13 04:14:51 -0600
commit208118ad5f78ce6e15da00753df491cfed771ce8 (patch)
tree964b810b68dcd9b9c3d449c6c766b20f69ac2718
parent4aa85a2f0f2e90e4df4cbf37857b800bb098c895 (diff)
do mutex entries cause Marshal() to fail?
-rw-r--r--gitTag.proto4
-rw-r--r--goDep.proto4
-rw-r--r--repo.new.go2
-rw-r--r--repo.proto8
4 files changed, 9 insertions, 9 deletions
diff --git a/gitTag.proto b/gitTag.proto
index c1683d8..378c02d 100644
--- a/gitTag.proto
+++ b/gitTag.proto
@@ -5,7 +5,7 @@ package gitpb;
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
-message GitTag { // `autogenpb:marshal`
+message GitTag { // `autogenpb:nomutex`
string refname = 1; // `autogenpb:unique` `autogenpb:sort` // tag name. treated as unique
google.protobuf.Timestamp creatordate = 2; // git creatordate
google.protobuf.Timestamp authordate = 3; // git author date
@@ -13,7 +13,7 @@ message GitTag { // `autogenpb:marshal`
string subject = 5; // git tag subject
}
-message GitTags { // `autogenpb:marshal` `autogenpb:mutex`
+message GitTags { // `autogenpb:marshal` `autogenpb:nomutex`
string uuid = 1; // `autogenpb:uuid`
string version = 2; // `autogenpb:version:v0.0.47`
repeated GitTag gitTags = 3;
diff --git a/goDep.proto b/goDep.proto
index 8fdab1b..72d32e7 100644
--- a/goDep.proto
+++ b/goDep.proto
@@ -8,7 +8,7 @@ import "google/protobuf/timestamp.proto"; // Import the well-known type for Time
// global settings for autogenpb `autogenpb:mutex`
-message GoDep { // `autogenpb:marshal`
+message GoDep { // `autogenpb:nomutex`
string hash = 1; // `autogenpb:unique` `autogenpb:sort` // md5sum/hash value from the go.sum file
google.protobuf.Timestamp ctime = 2; // get the go date from 'go list' ?
string version = 3; // v1.2.2
@@ -16,7 +16,7 @@ message GoDep { // `autogenpb:marshal`
string goVersion = 5; // version of golang the developer used to make this package version
}
-message GoDeps { // `autogenpb:marshal`
+message GoDeps { // `autogenpb:nomutex`
string uuid = 1; // `autogenpb:uuid:`
string version = 2; // `autogenpb:version`
repeated GoDep goDeps = 3; // `autogenpb:unique` `autogenpb:sort`
diff --git a/repo.new.go b/repo.new.go
index f229dcc..fa39dfa 100644
--- a/repo.new.go
+++ b/repo.new.go
@@ -49,7 +49,7 @@ func (all *Repos) NewGoRepo(fullpath string, gopath string) (*Repo, error) {
}
// enforces GoPath is unique
-func (all *Repos) AppendUniqueGoPath(newr *Repo) bool {
+func (all *Repos) AppendByGoPath(newr *Repo) bool {
all.Lock.RLock()
defer all.Lock.RUnlock()
diff --git a/repo.proto b/repo.proto
index e26ca52..b509877 100644
--- a/repo.proto
+++ b/repo.proto
@@ -11,7 +11,7 @@ import "google/protobuf/timestamp.proto"; // Import the well-known type for Time
// global settings for autogenpb `autogenpb:mutex`
-message Repo { // `autogenpb:marshal`
+message Repo { // `autogenpb:marshal` `autogenpb:nomutex`
string fullPath = 1; // `autogenpb:unique` `autogenpb:sort` // the actual path to the .git directory: '/home/devel/golang.org/x/tools'
string masterBranchName = 3; // git 'main' or 'master' branch name
string develBranchName = 4; // whatever the git 'devel' branch name is
@@ -36,14 +36,14 @@ message Repo { // `autogenpb:marshal`
string state = 23; // status or state. useful for building tooling
}
-message Repos { // `autogenpb:marshal` `autogenpb:sort` `autogenpb:mutex`
+message Repos { // `autogenpb:marshal` `autogenpb:sort`
string uuid = 1; // `autogenpb:uuid:8daaeba1-fb1f-4762-ae6e-95a55d352673`
string version = 2; // `autogenpb:version:2`
repeated Repo repos = 3; // `autogenpb:append` // generate AppendUnique() function for this
}
// should it be done this way?
-message GitTimes {
+message GitTimes { // `autogenpb:nomutex`
google.protobuf.Timestamp lastPull = 1; // last time a git pull was done
google.protobuf.Timestamp lastUpdate = 2; // when was ReloadGit() last done
google.protobuf.Timestamp lastDirty = 3; // last time CheckDirty() was run
@@ -56,7 +56,7 @@ message GitTimes {
}
// this is probably better. think about moving to this instead
-message GoInfo {
+message GoInfo { // `autogenpb:nomutex`
string goPath = 1; // the logical path as used by golang: 'go.wit.com/apps/helloworld'
string desc = 2; // what is this repo?
bool goLibrary = 3; // is this a golang library?