Open Bingo20 opened 1 month ago
$ ls aaa-namespace.yml docker-compose.yml labelTask_client_test.go servicecontrol.yaml annotations.proto Dockerfile labelTask.go service.go any.proto Dockerfile_build labelTask.proto servicemanagement_gapic.legacy.yaml api.proto Dockerfile_test labelTask_rpc.go servicemanagement_gapic.yaml auditTask_client_test.go documentation.proto labelTask_test.go servicemanagement_grpc_service_config.json auditTask.go duration.proto launch_stage.proto servicemanagement_v1.yaml auditTask.proto empty.proto location.go servicemanager.proto auditTask_rpc.go endpoint.proto log_entry.proto service.proto auditTask_test.go eval.proto logging.proto service_test.go auth.proto explain.proto log.proto source_context.proto backend.proto expr.proto main.go source_info.proto billing.proto field_behavior.proto Makefile source.proto binary-package.sh field_mask.proto metric.proto sponge1_cc.go BUILD.bazel gen.info metric_value.proto sponge1_cc.yml cel.yaml gogo.proto monitored_resource.proto sponge1-configmap.yml checked.proto go.mod monitoring.proto sponge1-deployment.yml check_error.proto go.sum openapiv2.proto sponge1.go client.proto grpc.go operation.proto sponge1-svc.yml close.go grpc_option.go patch-mono.sh sponge1_test.go config_change.proto grpc_test.go patch.sh sponge1.yml conformance_service.proto httpbody.proto plugin.proto struct.proto consumer.proto http.proto protoc.sh syntax.proto context.proto http_request.proto proto-doc.sh systemCode_rpc.go control.proto image-build2.sh quota_controller.proto system_parameter.proto createService.go image-build-local.sh quota.proto tagger.proto decl.proto image-build.sh README.md timestamp.proto deploy-binary.sh image-push.sh resource.proto type.proto deploy-docker.sh image-rpc-test.sh resources.proto types.proto deploy-k8s.sh initApp.go run-nohup.sh usage.proto deploy.sh init.go run.sh validate.proto descriptor.proto Jenkinsfile serviceconfig.yaml value.proto distribution.proto label.proto service_controller.proto wrappers.proto
常在centos环境使用命令或在页面生成代码都正常,ubuntu环境应该也是一样,检查一下安装sponge是否正确,或者更新 sponge upgrade
之后再试试生成代码。
升级后页面生成的结构还是不行,用命令行生成的结构正确。但是命令行有另外的bug: --db-dsn里面包含特殊字符比如"!"会报错:bash: !QAZ@: event not found
如果使用 zsh shell解析器执行sponge命令,参数--db-dsn值需要加双引号,示例:--db-dsn="root:123456@(127.0.0.1:3306)/school"
。
就是加了双引号也不行。但是可以workaround:先随便写一个,生成之后改
我的环境是ubuntu20.04, 用页面构建的grpc项目,结构是平铺的,跟说明的不一样,这也导致了无法继续make proto,报错 github.com/zhufuyi/sponge@v1.10.1: missing go.sum entry for go.mod file; to add it: go mod download github.com/zhufuyi/sponge bash: scripts/protoc.sh: 没有那个文件或目录 make: *** [Makefile:43:proto] 错误 127 ![Uploading 2024-10-17_17-02.png…]()