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
Maybe cargo should not append the -o argument if the extra opts supplied by the user includes -o? or maybe cargo doc should have an option to generate JSON documentation?
➜ /tmp cargo new foo
➜ /tmp cd foo
➜ foo git:(master) ✗ cargo rustdoc --verbose -- -w json
Documenting foo v0.1.0 (file:///private/tmp/foo)
Running `rustdoc src/lib.rs --crate-name foo -o /private/tmp/foo/target/doc -w json -L dependency=/private/tmp/foo/target/debug -L dependency=/private/tmp/foo/target/debug/deps`
thread '<unnamed>' panicked at 'failed to write json: Is a directory (os error 21)', ../src/librustdoc/lib.rs:298
Could not document `foo`.
Caused by:
Process didn't exit successfully: `rustdoc src/lib.rs --crate-name foo -o /private/tmp/foo/target/doc -w json -L dependency=/private/tmp/foo/target/debug -L dependency=/private/tmp/foo/target/debug/deps` (exit code: 101)
➜ foo git:(master) ✗ cargo rustdoc --verbose -- -w json -o doc.json
Documenting foo v0.1.0 (file:///private/tmp/foo)
Running `rustdoc src/lib.rs --crate-name foo -o /private/tmp/foo/target/doc -w json -o doc.json -L dependency=/private/tmp/foo/target/debug -L dependency=/private/tmp/foo/target/debug/deps`
Option 'output' given more than once.
Could not document `foo`.
Caused by:
Process didn't exit successfully: `rustdoc src/lib.rs --crate-name foo -o /private/tmp/foo/target/doc -w json -o doc.json -L dependency=/private/tmp/foo/target/debug -L dependency=/private/tmp/foo/target/debug/deps` (exit code: 1)
The text was updated successfully, but these errors were encountered:
It seems like
cargo
unconditionally creates a directory and adds a-o
argument making it impossible to generate JSON documentation of a crate.Maybe cargo should not append the
-o
argument if the extra opts supplied by the user includes-o
? or maybecargo doc
should have an option to generate JSON documentation?The text was updated successfully, but these errors were encountered: