tokio-rs / prost

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

build: Doc tests fail with `Timestamp` and compiling well known types #621

Closed LucioFranco closed 2 years ago

LucioFranco commented 2 years ago

Related issue https://github.com/hyperium/tonic/issues/967

LucioFranco commented 2 years ago

Reproduction https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=5bae9f522bcb6941ccb356289dfeb33f

LucioFranco commented 2 years ago

Smaller reproduction https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c3b61be63d8b9c075a8c122a07fc0dc1

LucioFranco commented 2 years ago

Actually turns out its a valid code block and I didn't know that markdown supported that syntax. So we will need to find a way to update the code.

LucioFranco commented 2 years ago

Looks like prost already supports this via https://docs.rs/prost-build/latest/prost_build/struct.Config.html#method.disable_comments.

In the future, we may want to consider providing well_known_types that can work around the codeblock issue.

LucioFranco commented 2 years ago

633 fixes this