You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this is due to this line referencing target/doc rather than out/doc.
If you disable removeReferencesToSrcFromDocs but leave copyDocsToSeperateOutput enabled, it fails in a similar way:
hello-world> [naersk] cargo_version (read): 1.55.0 (32da73ab1 2021-08-23)
hello-world> [naersk] cargo_message_format (set): json-diagnostic-rendered-ansi
hello-world> [naersk] cargo_release: --release
hello-world> [naersk] cargo_options:
hello-world> [naersk] cargo_build_options: $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format
hello-world> [naersk] cargo_test_options: $cargo_release -j "$NIX_BUILD_CORES"
hello-world> [naersk] RUST_TEST_THREADS: 16
hello-world> [naersk] cargo_bins_jq_filter: select(.reason == "compiler-artifact" and .executable != null and .profile.test == false)
hello-world> [naersk] cargo_build_output_json (created): /build/tmp.iqRXIyCEGe
hello-world> [naersk] crate_sources: /nix/store/xb4kq9f7wc66yzywh3cp4q6inlc5lfg8-crates-io
hello-world> [naersk] RUSTFLAGS:
hello-world> [naersk] CARGO_BUILD_RUSTFLAGS:
hello-world> [naersk] CARGO_BUILD_RUSTFLAGS (updated): --remap-path-prefix /nix/store/xb4kq9f7wc66yzywh3cp4q6inlc5lfg8-crates-io=/sources
hello-world> [naersk] pre-installing dep /nix/store/nafixzixdjjfgpdng78krkvl5xhiykgv-hello-world-deps-0.1.0
hello-world> building
hello-world> cargo build $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format
hello-world> Compiling hello-world v0.1.0 (/build/source)
hello-world> Finished release [optimized] target(s) in 0.16s
hello-world> running tests
hello-world> cargo test $cargo_release -j "$NIX_BUILD_CORES"
hello-world> Compiling hello-world v0.1.0 (/build/source)
hello-world> Finished release [optimized] target(s) in 0.16s
hello-world> Running unittests (out/release/deps/hello_world-b38ddf54d5e372c7)
hello-world> running 1 test
hello-world> test tests::test_hello ... ok
hello-world> test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
hello-world> docPhase
hello-world> cargo doc --offline $cargo_release -j "$NIX_BUILD_CORES"
hello-world> Documenting hello-world v0.1.0 (/build/source)
hello-world> Finished release [optimized] target(s) in 0.30s
hello-world> installing
hello-world> [naersk] Using file /build/tmp.iqRXIyCEGe to retrieve build (executable) products
hello-world> [naersk] found executable hello-world -> /nix/store/jigcsq0b2irpzsbyps9bixb76iq3zwyj-hello-world-0.1.0/bin/hello-world
hello-world> cp: cannot stat 'target/doc': No such file or directory
Again, I believe this is failing here due to referencing target/doc instead of out/doc.
The doDocFail doesn't set RUSTDOCFLAGS to -D warnings as I expected
This one is subjective but I don't think I've ever seen cargo doc fail outright except when -D warnings is set. A failOnWarnings flag which sets both RUSTFLAGS and RUSTDOCFLAGS to -D warnings would be great.
The docs don't appear to be copied to result/doc
Maybe I'm missing something but I figured that was what copyDocsToSeperateOutput implied.
The text was updated successfully, but these errors were encountered:
opeik
changed the title
Broken cargo doc optionremoveReferencesToSrcFromDocs and copyDocsToSeperateOutput are broken
Oct 13, 2021
Hi there,
I've been playing around with
naersk
and I have some feedback regarding thecargo doc
features.removeReferencesToSrcFromDocs
orcopyDocsToSeperateOutput
is trueI believe this is due to this line referencing
target/doc
rather thanout/doc
.If you disable
removeReferencesToSrcFromDocs
but leavecopyDocsToSeperateOutput
enabled, it fails in a similar way:Again, I believe this is failing here due to referencing
target/doc
instead ofout/doc
.doDocFail
doesn't setRUSTDOCFLAGS
to-D warnings
as I expectedThis one is subjective but I don't think I've ever seen
cargo doc
fail outright except when-D warnings
is set. AfailOnWarnings
flag which sets bothRUSTFLAGS
andRUSTDOCFLAGS
to-D warnings
would be great.result/doc
Maybe I'm missing something but I figured that was what
copyDocsToSeperateOutput
implied.The text was updated successfully, but these errors were encountered: