torch2424 commented on issue #3193:
@tschneidereit Made the requested changes, this should be good to go! :big_smile: :tada:
tschneidereit commented on issue #3193:
Hmm, this is still failing, but now with a different issue, which I'm not sure how to resolve.
alexcrichton commented on issue #3193:
I'd probably just tag the code example as
ignore
if it's already built elsewhere since it's probably too much of a pain to get it working otherwise withmdbook --test
torch2424 commented on issue #3193:
@tschneidereit Just wanted to shoutout and say, thanks for the comments and fixes on them! :big_smile: And thanks for the suggestion @alexcrichton ! :pray:🏾 😄
I'll let @tschneidereit make the call if ignoring is the right thing to do, because I don't think I have enough context on the docs to agree or push back yet :joy:
torch2424 commented on issue #3193:
cc @alexcrichton @tschneidereit
I finally figured this out, and learned a lot about mdbook in the process :joy:
Essentially, Github actions was telling us that it couldn't find the
structopt
extern crate. Which means that we needed to include the library path to thestructopt
crate for the example .Once I got past that bug, then another popped up saying:
Test executable failed (exit code 1). stderr: error: The following required arguments were not provided: <filename> USAGE: rust_out <filename> For more information try --help
Which took me wayyyyy longer to figure out than I'd like to admit, that mdbook is really just using rustdoc in the background, and since I built a CLI app, it's trying to run my CLI app, but not providing it the CLI arguments, thus it panics. :upside_down: :joy:
So! I then figured out how to do rustdoc stuff, and looking through rustdoc attributes, I think
should_panic
is what we want. Because we want to make sure that the app compiles and runs, but it should panic due to the CLI argument error (Which is something we do want to make sure it checks) :big_smile:
torch2424 edited a comment on issue #3193:
cc @alexcrichton @tschneidereit
I finally figured this out, and learned a lot about mdbook in the process :joy:
Essentially, Github actions was telling us that it couldn't find the
structopt
extern crate. Which means that we needed to include the library path to thestructopt
crate for the example .Once I got past that bug, then another popped up saying:
Test executable failed (exit code 1). stderr: error: The following required arguments were not provided: <filename> USAGE: rust_out <filename> For more information try --help
Which took me wayyyyy longer to figure out than I'd like to admit, that mdbook is really just using rustdoc in the background, and since I built a CLI app, it's trying to run my CLI app, but not providing it the CLI arguments, thus it panics. :upside_down: :joy:
So! I then figured out how to do rustdoc stuff, and looking through rustdoc attributes, I think
should_panic
is what we want. Because we want to make sure that the app compiles and runs, but it should panic due to the CLI argument error (Which is something we do want to make sure it checks) :big_smile:This should now be good to go! :big_smile:
torch2424 edited a comment on issue #3193:
cc @alexcrichton @tschneidereit
I finally figured this out, and learned a lot about mdbook in the process :joy:
Essentially, Github actions was telling us that it couldn't find the
structopt
extern crate. Which means that we needed to include the library path to thestructopt
crate for the example .Once I got past that bug, then another popped up saying:
Test executable failed (exit code 1). stderr: error: The following required arguments were not provided: <filename> USAGE: rust_out <filename> For more information try --help
Which took me wayyyyy longer to figure out than I'd like to admit, that mdbook is really just using rustdoc in the background, and since I built a CLI app, it's trying to run my CLI app, but not providing it the CLI arguments, thus it panics. :upside_down: :joy:
So! I then figured out how to do rustdoc stuff, and looking through rustdoc attributes, I think
should_panic
is what we want. Because we want to make sure that the app compiles and runs, but it should panic due to the CLI argument error (Which is something we do want to make sure it checks) :big_smile:
This should now be good to go! :big_smile:
torch2424 commented on issue #3193:
@alexcrichton I made the requested changes! Nice catch about the workspaces. I haven't worked in a Rust project this large, with multiple sub packages in a workspace, so, I'm sure I made some small errors here and there haha! :big_smile:
Thanks for the insight! This should be good to go! :big_smile:
alexcrichton commented on issue #3193:
:+1:
Last updated: Nov 22 2024 at 16:03 UTC