Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

full module path for api #3079

Merged
merged 1 commit into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -798,16 +798,14 @@ cache-export-docker-load: $(LINUXKIT)
## will skip image if not found in cache
cache-export-docker-load-all: $(LINUXKIT) $(addsuffix -cache-export-docker-load,$(PKGS_DOCKER_LOAD))

proto-vendor:
@$(DOCKER_GO) "cd pkg/pillar ; go mod vendor" $(CURDIR) proto

proto-diagram: $(GOBUILDER)
@$(DOCKER_GO) "/usr/local/bin/protodot -inc /usr/include -src ./api/proto/config/devconfig.proto -output devconfig && cp ~/protodot/generated/devconfig.* ./api/images && dot ./api/images/devconfig.dot -Tpng -o ./api/images/devconfig.png && echo generated ./api/images/devconfig.*" $(CURDIR) api

.PHONY: proto-api-%

proto: $(GOBUILDER) api/go api/python proto-diagram
@echo Done building protobuf, you may want to vendor it into pillar by running proto-vendor
@echo Done building protobuf, you may want to vendor it into your packages, e.g. `pkg/pillar`.
@echo See ./api/go/README.md for more information.

api/go: PROTOC_OUT_OPTS=paths=source_relative:
api/go: proto-api-go
Expand Down
17 changes: 15 additions & 2 deletions api/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,21 @@ To build, go to the root directory of this repository and:
make proto
```

To vendor the result into pillar (or any other go pacakge), go to the root directory of this repository and:
To vendor the result into a downstream dependency, e.g. pillar, do the following:

1. Commit the changes to this directory.
1. Open a Pull Request and merge it in.
1. Go to the root directory of the downstream dependency and:
```bash
make proto-vendor
go get -u github.com/lf-edge/eve/api/go@master
go mod vendor
```

For temporary testing _only_ you can reference the local copy of the generated code by adding the following
to the end of your `go.mod`:

```go
replace github.com/lf-edge/eve/api/go => ../../api/go
```

Do **not** commit the `replace` line to your changes, as they will **not** be accepted into a PR.
5 changes: 2 additions & 3 deletions libs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@ require (
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.13.0 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/lf-edge/eve/api/go v0.0.0-20230306060116-9673fb35833f // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
go.opencensus.io v0.23.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6 // indirect
google.golang.org/grpc v1.40.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)

replace github.com/lf-edge/eve/api/go => ../../api/go
3 changes: 3 additions & 0 deletions libs/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lf-edge/eve/api/go v0.0.0-20230306060116-9673fb35833f h1:gblYitx0UY6LPCghQeAQS2mZ3DsbLCuXZJA4vz1edyE=
github.com/lf-edge/eve/api/go v0.0.0-20230306060116-9673fb35833f/go.mod h1:pNFho84HAA/Vlb1DpLFlatJgQBJ43wH28elAs7wXdtA=
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lithammer/shortuuid/v4 v4.0.0 h1:QRbbVkfgNippHOS8PXDkti4NaWeyYfcBTHtw7k08o4c=
github.com/lithammer/shortuuid/v4 v4.0.0/go.mod h1:Zs8puNcrvf2rV9rTH51ZLLcj7ZXqQI3lv67aw4KiB1Y=
Expand Down Expand Up @@ -1302,6 +1304,7 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
6 changes: 2 additions & 4 deletions pkg/newlog/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ require (
github.com/euank/go-kmsg-parser v2.0.0+incompatible
github.com/golang/protobuf v1.5.2
github.com/google/go-cmp v0.5.9
github.com/lf-edge/eve/api/go v0.0.0-20220616105859-8b9463e1561b
github.com/lf-edge/eve/pkg/pillar v0.0.0-20230303013136-e890ce9ee8a3
github.com/lf-edge/eve/api/go v0.0.0-20230306060116-9673fb35833f
github.com/lf-edge/eve/pkg/pillar v0.0.0-20230306060627-c6953d139f5f
github.com/sirupsen/logrus v1.9.0
)

Expand All @@ -24,5 +24,3 @@ require (
golang.org/x/sys v0.5.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)

replace github.com/lf-edge/eve/api/go => ../../api/go
6 changes: 4 additions & 2 deletions pkg/newlog/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,10 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lf-edge/eve/pkg/pillar v0.0.0-20230303013136-e890ce9ee8a3 h1:TVj2CFA8klkoh9PYpzGt3Yb2qBwEeq0yDKcS7Ncv0ZI=
github.com/lf-edge/eve/pkg/pillar v0.0.0-20230303013136-e890ce9ee8a3/go.mod h1:oaH4ffmAZlTHt28B7p8wAUuFbU2lty1Wv1H0WF9merk=
github.com/lf-edge/eve/api/go v0.0.0-20230306060116-9673fb35833f h1:gblYitx0UY6LPCghQeAQS2mZ3DsbLCuXZJA4vz1edyE=
github.com/lf-edge/eve/api/go v0.0.0-20230306060116-9673fb35833f/go.mod h1:pNFho84HAA/Vlb1DpLFlatJgQBJ43wH28elAs7wXdtA=
github.com/lf-edge/eve/pkg/pillar v0.0.0-20230306060627-c6953d139f5f h1:8msQTcvgfOBXFWMaMxtWqrZyTOGglgQN/lV5XvI0WWs=
github.com/lf-edge/eve/pkg/pillar v0.0.0-20230306060627-c6953d139f5f/go.mod h1:Ku+PPlHhnlLth4Dt56n9qUQiEv9A1xromlwGfkNnxso=
github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
Expand Down
207 changes: 207 additions & 0 deletions pkg/newlog/vendor/github.com/lf-edge/eve/api/go/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions pkg/newlog/vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ github.com/google/go-cmp/cmp/internal/value
# github.com/google/go-containerregistry v0.8.0
## explicit; go 1.14
github.com/google/go-containerregistry/pkg/v1/types
# github.com/lf-edge/eve/api/go v0.0.0-20220616105859-8b9463e1561b => ../../api/go
# github.com/lf-edge/eve/api/go v0.0.0-20230306060116-9673fb35833f
## explicit; go 1.20
github.com/lf-edge/eve/api/go/auth
github.com/lf-edge/eve/api/go/certs
github.com/lf-edge/eve/api/go/config
github.com/lf-edge/eve/api/go/evecommon
github.com/lf-edge/eve/api/go/info
github.com/lf-edge/eve/api/go/logs
# github.com/lf-edge/eve/pkg/pillar v0.0.0-20230303013136-e890ce9ee8a3
# github.com/lf-edge/eve/pkg/pillar v0.0.0-20230306060627-c6953d139f5f
## explicit; go 1.20
github.com/lf-edge/eve/pkg/pillar/agentlog
github.com/lf-edge/eve/pkg/pillar/base
Expand Down Expand Up @@ -99,4 +99,3 @@ google.golang.org/protobuf/reflect/protoregistry
google.golang.org/protobuf/runtime/protoiface
google.golang.org/protobuf/runtime/protoimpl
google.golang.org/protobuf/types/known/timestamppb
# github.com/lf-edge/eve/api/go => ../../api/go
4 changes: 1 addition & 3 deletions pkg/pillar/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/jackwakefield/gopac v1.0.2
github.com/jaypipes/ghw v0.8.0
github.com/lf-edge/edge-containers v0.0.0-20221025050409-93c34bebadd2
github.com/lf-edge/eve/api/go v0.0.0-00010101000000-000000000000
github.com/lf-edge/eve/api/go v0.0.0-20230306060116-9673fb35833f
github.com/lf-edge/eve/libs v0.0.0-20230524115335-5c6c795151b7
github.com/linuxkit/linuxkit/src/cmd/linuxkit v0.0.0-20220913135124-e532e7310810
github.com/miekg/dns v1.1.41
Expand Down Expand Up @@ -142,5 +142,3 @@ require (
howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect
oras.land/oras-go v1.2.0 // indirect
)

replace github.com/lf-edge/eve/api/go => ../../api/go
Loading