You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove rotten protoc-gen-doc
Upgrade tools version to correspond to those in general codebase.
Use new avid-tools
Add .gitattributes
Add dependabot.yml
Install protoc-gen-doc binary in ci workflow
Use new go get -tool command to set tools and remove tools.go
Use 'go install tool' to install all tools.
Move all helper go code into separate directory and copy over
when appropriate otherwise installing tools fails with unknown
import.
AB#10624
Signed-off-by: Paul Hewlett <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+40-31
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,48 @@
2
2
3
3
Common public api definitions for the DataTrails platform
4
4
5
-
## Finding and including proto files for depdendecnies
5
+
## Finding and including proto files for dependencies
6
6
7
-
tools/go.mod is the source of truth for all proto providing dependencies. That file alone specifies both the upstream version we are using *and* is used, via go install, to make the .proto files available locally
7
+
go.mod is the source of truth for all proto providing dependencies. That file alone specifies both the upstream version we are using *and* is used, via go get -tool, to make the .proto files available locally
8
8
9
-
This corresponds to the practice recommended by grpc-gateway and elsewhere
9
+
This corresponds to the practice recommended by grpc-gateway and elsewhere.
10
10
11
-
1.*** ALWAYS *** Use tools/go.mod to specify the dependency version.
12
-
2. Add the package to the `go install` command in the apis:preflight task
13
-
3. If necessary, add a var for the new path in any-api **and** then add a reference to that var in the PROTO_INC var.
11
+
1. Execute the `go get -tool` command to add the package to the go.mod file. This is a once-off command that simply
12
+
sets up go.mod to manages all tools.
13
+
2. If necessary, add a var for the new path in any-api **and** then add a reference to that var in the PROTO_INC var.
14
+
3. Executing 'go install tool' is then sufficient to install required tools and the only command required in workflows.
14
15
15
-
Following this practice removes the need for dual maintenance of dependency versions in the builder image. It also produces a build cycle that is significantly faster.
16
+
## Using the go tool commands
16
17
17
-
Cross repository builds in docker while using go.work to refer to locally modified sources don't work. And this setup is essential for an efficient workflow.
18
+
These commands are NOT executed as part of the dev workflow.
19
+
20
+
Add tools to the go.mod file:
21
+
22
+
```
23
+
go get -tool github.com/grpc-ecosystem/grpc-gateway/v2/[email protected]
24
+
go get -tool github.com/grpc-ecosystem/grpc-gateway/v2/[email protected]
0 commit comments