georust / geozero

Zero-Copy reading and writing of geospatial data.
Apache License 2.0
321 stars 30 forks source link

Compile proto file only when vector_tile.rs doesn't exist #170

Closed pka closed 10 months ago

pka commented 10 months ago

So protoc is not required when used as a dependency.

nyurik commented 10 months ago

this looks ok, but my only concern is that since the output of the generation is inside the src/ dir, it is not clear to anyone that in order to re-generate it one should delete the file. Moreover, I am worried that as proto-gen dependency gets updated, we may not realize that the file needs to be regenerated because in the future the generated output might be different... Perhaps at least add a comment next to the proto dependency in Cargo.toml to delete this file? In general, I am not a big fan of magical dependency skipping

nyurik commented 10 months ago

@pka you didn't reply to any of the above concerns - are they moot for some reason?

pka commented 10 months ago

Sorry for the silence!

Your concerns should be adressed in ca52c299862ecdcda7d334238390337da8a6f8f4

In the light of the serde precompiled macro drama I came to the conclusion, that build time change of a source file is to dangerous anyway, which made me confident that we should update vector_tile.rs manually only.