Skip to content
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

Inconsistent doc output between normal build and --release flag #19290

Closed
icorderi opened this issue Nov 25, 2014 · 4 comments
Closed

Inconsistent doc output between normal build and --release flag #19290

icorderi opened this issue Nov 25, 2014 · 4 comments

Comments

@icorderi
Copy link
Contributor

This two produce different sets of documentation:

cargo clean
cargo build
cargo doc

and:

cargo clean
cargo build --release
cargo doc

Doing build --release produces the complete and expected documentation while simply doing build is missing several types and modules.

I'm not sure if this is expected behavior or a very peculiar bug.
This can be consistently reproduced on this project, at least by this commit.

Looking at the output at ./target/doc/kinetic/proto/command/index.html will show a different set of results.

@alexcrichton
Copy link
Member

Gan you give an example of the differences? I tried to reproduce this locally.

@icorderi
Copy link
Contributor Author

Yea sure, look at this complete doc. When compiling with cargo build (no --release) it wasn't showing:

  • mod log
  • struct GetLog
  • enum LogType

I tried it several times locally just to be sure. The doc built by Travis wasn't showing the correct thing either. I added the --release flag to .travis.yml and it updated it to the correct content.

Although I can't reproduce it with my current code anymore.
The only thing all those had in common was that I had just wrote the imports in mod.rs and there was no actual code using them.

@icorderi
Copy link
Contributor Author

Digging deeper into it...

/master history

commit - Getting Travis to call cargo build --release - 4 hours ago
commit - Added GetLog command and KineticError implements Error - 5 hours ago
commit - Fixed an issue with the latest protobuf - 21 hours ago

/gh-pages history

Travis build 35 pushed to gh-pages - 4 hours ago
Travis build 33 pushed to gh-pages - 5 hours ago
Travis build 34 pushed to gh-pages - 5 hours ago

Travis history

35 - Getting Travis to call cargo build --release - (3 min 15 sec) about 4 hours ago
34 - Added GetLog command and KineticError implements - (1 min 40 sec) about 5 hours ago
33 - Fixed an issue with the latest protobuf - (3 min 1 sec) about 5 hours ago

Commit 33 and 34 were pushed at the same time, Travis apparently runs once per commit not per push. Travis overwrote itself online. because commit 33 finished before commit 34.
As to why this also happened to me locally is still unknown.

TL;DR; it looks like it wasn't a rustdoc issue, I'm closing this up.

@alexcrichton
Copy link
Member

Oh wow, that is confusing! Thanks for investigating this @icorderi!

lnicola pushed a commit to lnicola/rust that referenced this issue Mar 10, 2025
Add warning and debug information when `cargo metadata` fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants