anyway regardless you can fix the problem with doc...
# development
h
anyway regardless you can fix the problem with doctests with that bit of pseudo-markdown syntax, there's no reason to write docs that will fail doctests
💯 1
a
The docs are generated from comments in a
.proto
file
I believe we already do a little preprocessing of
.proto
files (or possibly the generated code), so feel free to edit
src/rust/engine/process_execution/bazel_protos/build.rs
to make the codegen happen better!
h
sure, I'll take a look at that
I only know about this becuase I literally ran into it myself recently, but there is a fix 🙂
a
Woo! Thanks! 😄 I would be very happy to have it fixed!
h
okay I dug into this for like half an hour, what's going on is that the markdown-style comments in
3rdparty/protobuf/googleapis/google/api/*.proto
have code in them, using the markdown four-spaces convention for code blocks
and this is getting put directly into rust comments
so I could change the comments in the .proto files to use the ```text syntax
but I don't know if that would break anything there
it looks like protoc_grpcio is the rust crate doing the protobuf conversion?
a
If we can leave the files checked in as-is, and dynamically do a rewrite into a temporary directory with the “fixed” files which we then use for codegen, that would be amazing
h
might be doable
looks like you did most of the lines of code in this file
btw what does "tower" mean here?
a
In build.rs? Yeah, sadly that’s mostly my baby
h
I see that a lot
I'm trying to figure out where hte paths to the protobuf files are specified
a
h
I see some of them as just raw strings in the file, but not all
a
In particular, they have a grpc library: https://github.com/tower-rs/tower-grpc
The proto files themselves have imports in them, which are all paths relative to a search root
So we list the entry-points as strings in the file, and then the proto compiler will read the files, and follow the imports; one of the arguments to the compiler is a list of search roots (or maybe we copy the files all to be descendants of one directory, pretty sure at times we’ve done both)
h
so, maybe one way to attack this is to walk the directory tree, copy every *proto file to an isomorphic directory tree in a temp directory, edit the files to have the right ```text syntax, then run the current code against that new path?
that does seem like kind of a lot of hacky effort to make this work though
a
Sounds plausible 🙂
But yeah, that’s why I haven’t gotten around to it, and have just been using
--tests
🙂
h
yeah this is a harder problem than it seemed at first 🙂
I think I'll hold off on this for now myself and work on things that will get me more familiar with the codebase as a whole for now
but i'll keep a pin on this
a
Sounds good!