opentdf / platform

Persistent data centric security that extends owner control wherever data travels
BSD 3-Clause Clear License
19 stars 10 forks source link

readme.md should mention protoc-gen-doc install #157

Closed patmantru closed 7 months ago

patmantru commented 9 months ago
pmancuso@pmancuso opentdf-v2-poc % make pre-build
Checking for required tools...
protoc-gen-doc not found, please 'go install' it https://github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
make: *** [pre-build] Error 1
pmancuso@pmancuso opentdf-v2-poc % go install protoc-gen-doc
package protoc-gen-doc is not in std (/usr/local/Cellar/go/1.21.6/libexec/src/protoc-gen-doc)
pmancuso@pmancuso opentdf-v2-poc % 

Also that url returns a 404

jakedoublev commented 9 months ago

Hmm, it looks like the right command is probably go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc (which is succeeding for me). Docs

jakedoublev commented 9 months ago

I also ran into an issue where I needed to reexport my GOPATH (export PATH=$PATH:$(go env GOPATH)/bin) for it to be found in the lookup done by make pre-build.

patmantru commented 9 months ago

...sort of... It seems to succeed for me also (thanks!!) but doesn't resolve the command:


package protoc-gen-doc is not in std (/usr/local/Cellar/go/1.21.6/libexec/src/protoc-gen-doc)
pmancuso@pmancuso opentdf-v2-poc % go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
go: downloading github.com/pseudomuto/protoc-gen-doc v1.5.1
go: downloading github.com/pseudomuto/protokit v0.2.0
go: downloading github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007
go: downloading github.com/Masterminds/sprig v2.15.0+incompatible
go: downloading github.com/envoyproxy/protoc-gen-validate v1.0.4
go: downloading google.golang.org/protobuf v1.32.0
go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014
go: downloading google.golang.org/genproto v0.0.0-20240205150955-31a09d347014
go: downloading github.com/pseudomuto/protokit v0.2.1
go: downloading github.com/Masterminds/sprig v2.22.0+incompatible
go: downloading github.com/mwitkow/go-proto-validators v0.3.2
go: downloading github.com/aokoli/goutils v1.0.1
go: downloading github.com/huandu/xstrings v1.0.0
go: downloading github.com/Masterminds/semver v1.4.2
go: downloading github.com/imdario/mergo v1.0.0
go: downloading github.com/google/uuid v1.6.0
go: downloading golang.org/x/crypto v0.19.0
go: downloading github.com/huandu/xstrings v1.4.0
go: downloading github.com/Masterminds/semver v1.5.0
go: downloading github.com/aokoli/goutils v1.1.1
go: github.com/imdario/mergo@v1.0.0: parsing go.mod:
    module declares its path as: dario.cat/mergo
            but was required as: github.com/imdario/mergo
    restoring github.com/imdario/mergo@v0.3.16
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/mitchellh/copystructure v1.2.0
go: github.com/imdario/mergo@v1.0.0: parsing go.mod:
    module declares its path as: dario.cat/mergo
            but was required as: github.com/imdario/mergo
    restoring github.com/imdario/mergo@v0.3.16
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: github.com/imdario/mergo@v1.0.0: parsing go.mod:
    module declares its path as: dario.cat/mergo
            but was required as: github.com/imdario/mergo
    restoring github.com/imdario/mergo@v0.3.16
go: downloading golang.org/x/sys v0.17.0
go: downloading golang.org/x/net v0.20.0
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe
go: downloading google.golang.org/grpc v1.61.0
go: added github.com/Masterminds/goutils v1.1.1
go: added github.com/Masterminds/semver v1.5.0
go: added github.com/Masterminds/sprig v2.22.0+incompatible
go: added github.com/aokoli/goutils v1.1.1
go: upgraded github.com/envoyproxy/protoc-gen-validate v1.0.2 => v1.0.4
go: upgraded github.com/google/uuid v1.4.0 => v1.6.0
go: added github.com/huandu/xstrings v1.4.0
go: added github.com/mitchellh/copystructure v1.2.0
go: added github.com/mitchellh/reflectwalk v1.0.2
go: added github.com/mwitkow/go-proto-validators v0.3.2
go: added github.com/pseudomuto/protoc-gen-doc v1.5.1
go: added github.com/pseudomuto/protokit v0.2.1
go: upgraded golang.org/x/crypto v0.17.0 => v0.19.0
go: upgraded golang.org/x/net v0.19.0 => v0.20.0
go: upgraded golang.org/x/sys v0.15.0 => v0.17.0
go: upgraded google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 => v0.0.0-20240205150955-31a09d347014
go: upgraded google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 => v0.0.0-20240205150955-31a09d347014
go: upgraded google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f => v0.0.0-20240125205218-1f4bbc51befe
go: upgraded google.golang.org/grpc v1.60.1 => v1.61.0
go: upgraded google.golang.org/protobuf v1.31.0 => v1.32.0
pmancuso@pmancuso opentdf-v2-poc % make pre-build                                                   
Checking for required tools...
protoc-gen-doc not found, please 'go install' it https://github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
make: *** [pre-build] Error 1
pmancuso@pmancuso opentdf-v2-poc % export PATH=$PATH:$HOME/go/bin
pmancuso@pmancuso opentdf-v2-poc % make pre-build                
Checking for required tools...
protoc-gen-doc not found, please 'go install' it https://github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
make: *** [pre-build] Error 1
pmancuso@pmancuso opentdf-v2-poc %
patmantru commented 9 months ago

Yep...tried that

patmantru commented 9 months ago

the solution seems to be:

go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc

...leaving the https:\\ off the front of what the error message displays seems to be the key

jrschumacher commented 9 months ago

Partial fix added to the Makefile. I think its pretty clear our Readme needs ❤️ .

@patmantru could you update your ticket to capture need to improve the Readme and have this as one of the issues? Also if there are other subtasks you want to add that would be fantastic!