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

Cargo doc broken on nightly-2017-09-11 #44487

Closed
Lakier15 opened this issue Sep 11, 2017 · 5 comments
Closed

Cargo doc broken on nightly-2017-09-11 #44487

Lakier15 opened this issue Sep 11, 2017 · 5 comments
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Milestone

Comments

@Lakier15
Copy link

Cargo doc runs on nightly-2017-09-11 without displaying any errors or warnings, yet, it doesn't produce any outputs.

I am on nightly-unknown-linux-gnu on Linux Mint.

alexgasbarroni@alexgasbarroni-Mint ~/git/sc3_firmware $ uname -a
Linux alexgasbarroni-Mint 4.8.0-54-generic #57~16.04.1-Ubuntu SMP Wed May 24 16:22:28 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I tried with different nightly toolchains to see if it was a problem of my code, or if it was a problem of the toolchain.

  • [OK] nightly-2017-09-08-x86_64-unknown-linux-gnu
  • [OK] nightly-2017-09-09-x86_64-unknown-linux-gnu
  • [OK] nightly-2017-09-10-x86_64-unknown-linux-gnu
  • [Broken] nightly-2017-09-11-x86_64-unknown-linux-gnu

I also tried on different machines and the result is the same.

I tried:

cargo doc
cargo doc --open
cargo doc --verbose

but I cannot find any pointer to the problem.

Example output when running cargo doc --open

alexgasbarroni@alexgasbarroni-Mint ~/git/sc3_firmware $ cargo doc --open
 Documenting freerustos v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/freerustos)
 Documenting tools v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/tools)
 Documenting unicode-xid v0.0.4
 Documenting odds v0.2.25
 Documenting nodrop-union v0.1.9
 Documenting serde v1.0.11
 Documenting numtoa v0.0.7
 Documenting encode_unicode v0.3.1
 Documenting quote v0.3.15
 Documenting synom v0.11.3
 Documenting nodrop v0.1.9
 Documenting ssmarshal v1.0.0
 Documenting syn v0.11.11
 Documenting arrayvec v0.4.0
 Documenting serde_derive_internals v0.15.1
 Documenting serde_derive v1.0.11
 Documenting common v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/common)
 Documenting peripheral_layer v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/peripheral_layer)
 Documenting pal v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/pal)
 Documenting pubsub v0.1.1 (file:///home/alexgasbarroni/git/sc3_firmware/src/pubsub)
 Documenting rc_inputs v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/rc_inputs)
 Documenting fusion v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/fusion)
 Documenting mixer v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/mixer)
 Documenting imu_stream v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/imu_stream)
 Documenting magnetic_declination v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/magnetic_declination)
 Documenting device_layer v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/device_layer)
 Documenting controllers v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/controllers)
 Documenting actuators v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/actuators)
 Documenting sensor_manager v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/sensor_manager)
 Documenting pbit v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/pbit)
 Documenting magnetometer v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/magnetometer)
 Documenting accelerometer v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/accelerometer)
 Documenting gyroscope v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/gyroscope)
 Documenting console v0.1.0 (file:///home/alexgasbarroni/git/sc3_firmware/src/console)
 Documenting sc3_firmware v0.0.0 (file:///home/alexgasbarroni/git/sc3_firmware)
    Finished dev [unoptimized + debuginfo] target(s) in 0.14 secs

The browser window doesn't open, the target/doc folder is empty and the usual xdg-open command is missing.

Does anybody else have the same problem?

@alexcrichton alexcrichton added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Sep 11, 2017
@alexcrichton
Copy link
Member

Looks like this is because rustdoc as distributed is an empty file... investigating

@alexcrichton
Copy link
Member

Likely caused by #44260

alexcrichton added a commit to alexcrichton/rust that referenced this issue Sep 11, 2017
Apparently `File::create` was called when there was an existing hard link or the
like, causing an existing file to get accidentally truncated!

Closes rust-lang#44487
bors added a commit that referenced this issue Sep 11, 2017
rustbuild: Fix a distribution bug with rustdoc

Apparently `File::create` was called when there was an existing hard link or the
like, causing an existing file to get accidentally truncated!

Closes #44487
@retep998
Copy link
Member

On Appveyor I was getting a much more frustrating error:

   Doc-tests winapi
error: An unknown error occurred
To learn more, run the command again with --verbose.

Upon updating to the latest nightly locally I got a more helpful error:

   Doc-tests winapi
error: command failed: 'rustdoc.exe'
info: caused by: %1 is not a valid Win32 application. (os error 193)

And as it turns out, rustdoc.exe is empty here as well:

@KodrAus
Copy link
Contributor

KodrAus commented Sep 12, 2017

Oh that's why my builds were failing attempting to commit an empty folder full of 'docs'...

@Lakier15
Copy link
Author

Thank you guys! That fixed it :)

@alexcrichton alexcrichton added this to the 1.22 milestone Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
Development

No branches or pull requests

4 participants