Lots of files changed when execute api/gen.sh

Hello, I just executed โ€œ./gen.shโ€ in the api path of lora-app-server project. But I found that a lot of files changed.

I thought if the *.proto files were not changed, the generated files would be the same.
Anything wrong? Thank you! :sweat_smile:

If you donโ€™t change the .proto files, there is no reason to call ./gen.sh or make api. The number of changes are due to the proto-gen-go utility.

In fact, I want to change one of the .proto files. I just did an experiment first without changing any file.

Maybe my proto-gen-go & protoc-gen-grpc-gateway & protoc-gen-swagger utilities version are not consistent with yours? But which versions are you using?

Hi @brocaar and @ax003d, I made some changes inside the proto definitions and now as I recompiled the files, lot of files did in fact change. Can you please tell me about the proto-gen-go & protoc-gen-grpc-gateway & protoc-gen-swagger utilities current version?

These versions are frozen in the go.mod and go.lock files :slight_smile:

Hi! how do you implement these files? because when we run make dev-requirements, I guess it searches for the recent versions and not the ones given in go.mod file.

This should work out-of-the box when you are using the Docker based development environment :slight_smile:

1 Like

But what about people like us, who are using non-docker environment ? Can you please tell us how to implement these files?

What the Docker environment does is create an environment that is exactly the same as used for building the releases. Same compiler version, same environment variables, etcโ€ฆ

When not using Docker, all these parameters can be different. The only advice I can give you is look at what the Dockerfile-devel sets up and try to replicate this on your own environment :slight_smile:

1 Like