tokio-rs / prost

PROST! a Protocol Buffers implementation for the Rust Language
Apache License 2.0
3.69k stars 481 forks source link

build: Use git submodule to download protobuf sources #1014

Closed caspermeijn closed 3 months ago

caspermeijn commented 4 months ago

Instead of downloading a tarball, use a submodule to get the protobuf sources. Newer versions of protobuf require recursive submodules for its dependencies

In preparation of updating the protobuf version used for conformance tests.

LucioFranco commented 3 months ago

@caspermeijn does this mean that when cloning the project you must pass the recursive flag to git? Or else tests will not pass with regards to the conformance test suite?

caspermeijn commented 3 months ago

@caspermeijn does this mean that when cloning the project you must pass the recursive flag to git? Or else tests will not pass with regards to the conformance test suite?

That is right. The submodule needs to be checked out. If not, the build will fail and suggest running git submodule update --init --recursive to fix the situation.

LucioFranco commented 3 months ago

So essentially because protobuf has submodules now the tarball doesn't work and thus we must also follow suit?

caspermeijn commented 3 months ago

So essentially because protobuf has submodules now the tarball doesn't work and thus we must also follow suit?

Yes, that is how I understand the situation.

Alternatively, we could require all of protobuf build dependencies to be present, then the tarball works great. But I would rather not maintain those install instructions.

Or we require the build conformance tests to be installed somehow, but that degrades the current developer experience.