diff --git a/go/coordinator/Makefile b/go/coordinator/Makefile index ca22ea70eaa..8fb52e4bb74 100644 --- a/go/coordinator/Makefile +++ b/go/coordinator/Makefile @@ -14,43 +14,3 @@ clean: docker: docker build -t chroma-coordinator:latest . - -docker_multi_arch: - docker buildx build --platform linux/x86_64,linux/arm64 -t oxia:latest . - -.PHONY: proto -proto: - cd proto && \ - protoc \ - --go_out=. \ - --go_opt paths=source_relative \ - --plugin protoc-gen-go="${GOPATH}/bin/protoc-gen-go" \ - --go-grpc_out=. \ - --go-grpc_opt paths=source_relative \ - --plugin protoc-gen-go-grpc="${GOPATH}/bin/protoc-gen-go-grpc" \ - --go-vtproto_out=. \ - --go-vtproto_opt paths=source_relative \ - --plugin protoc-gen-go-vtproto="${GOPATH}/bin/protoc-gen-go-vtproto" \ - --go-vtproto_opt=features=marshal+unmarshal+size+pool+equal+clone \ - *.proto - -proto_clean: - rm -f */*.pb.go - -proto_format: - #brew install clang-format - clang-format -i --style=Google proto/*.proto - -proto_lint: - #go install github.com/yoheimuta/protolint/cmd/protoc-gen-protolint - protoc --proto_path ./proto \ - --protolint_out . \ - --protolint_opt config_dir_path=. \ - --protolint_opt proto_root=./proto \ - proto/*.proto - -proto_doc: - #go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc - protoc --doc_out=docs/proto --doc_opt=markdown,proto.md proto/*.proto - -proto_quality: proto_format proto_lint diff --git a/idl/makefile b/idl/makefile index 00a2f7d64a6..18cbc1977ba 100644 --- a/idl/makefile +++ b/idl/makefile @@ -1,8 +1,22 @@ .PHONY: proto -proto: - @echo "Generating gRPC code..." +proto_python: + @echo "Generating gRPC code for python..." @python -m grpc_tools.protoc -I ./ --python_out=. --pyi_out=. --grpc_python_out=. ./chromadb/proto/*.proto @mv chromadb/proto/*.py ../chromadb/proto/ @mv chromadb/proto/*.pyi ../chromadb/proto/ @echo "Done" + +proto_go: + @echo "Generating gRPC code for golang..." + @protoc \ + --go_out=../go/coordinator/internal/proto/coordinatorpb \ + --go_opt paths=source_relative \ + --plugin protoc-gen-go="${GOPATH}/bin/protoc-gen-go" \ + --go-grpc_out=../go/coordinator/internal/proto/coordinatorpb \ + --go-grpc_opt paths=source_relative \ + --plugin protoc-gen-go-grpc="${GOPATH}/bin/protoc-gen-go-grpc" \ + chromadb/proto/*.proto + @mv ../go/coordinator/internal/proto/coordinatorpb/chromadb/proto/*.go ../go/coordinator/internal/proto/coordinatorpb/ + @rm -rf ../go/coordinator/internal/proto/coordinatorpb/chromadb + @echo "Done"