-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: move ExEx book examples #11616
docs: move ExEx book examples #11616
Conversation
Ok(()) | ||
} | ||
|
||
// ANCHOR: snippet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this? and in other places too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to show only the relevant sections of the files at the book references, and allow the reader to expand the complete file only if they want to. Another way to do this is to use line numbers of the snippets instead of using these // ANCHOR: snippet
comments, but then we'd have to change the line numbers if the examples are changed. Or I could just show the complete files at all references. Which one do you prefer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, i see! that's great, I think these anchors are fine
@@ -0,0 +1,4 @@ | |||
fn main() -> Result<(), Box<dyn std::error::Error>> { | |||
tonic_build::compile_protos("proto/exex.proto")?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for this to work in the CI, we also need to install protoc
. I think it's not a big deal as it's quite lightweight, wdyt @mattsse ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactoring the job and adding protoc in #11618
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this need to run on ci?
yeah I guess if we want to do have well maintained bindings then we're kinda forced to do this. sounds reasonable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nits, LGTM otherwise
…cekaya/reth into move-exex-book-examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thanks!
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Closes #11581
Code examples in ExEx book chapters
Remote
andTracking State
are moved to Rust files. There are small fixes for the examples that weren't working, and a new filebuild.rs
to make the proto file in theRemote
example compile. Otherwise, the example wasn't working as explained here.