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
Is there a way to be able to deserialize ALL previous formats in the same executable that uses rustdoc-types?
Because I intend to distribute my executable / use the compiled executable on different machines, but if it invokes the rustdoc executable that's installed for the user, it might use a different FORMAT_VERSION.
And every workspace might be pinned to a different Rust nightly, so currently it requires source code modification every time I want to accommodate a different nightly in the workspace that I want to run it on :/
Even better:
Is there a way to invoke not the rustdoc executable but link to the crate so that the versions always match? 🙂
The text was updated successfully, but these errors were encountered:
Is there a way to be able to deserialize ALL previous formats in the same executable that uses rustdoc-types?
If you depend on every single version of rustdoc-types! (although we somehow don't have releases corresponding to some extremely old format versions (3, 4, 7), and I don't think this is worth fixing). You'll then need to write code such that it can handle multiple different types. This is do-able, but is a lot of investment.
Is there a way to invoke not the rustdoc executable but link to the crate so that the versions always match? 🙂
No, the only real interface into rustdoc is via the CLI. You could in theory link into librustdoc via #![feature(rustc_private)], but that's extreamly painful (as the API isn't set up at all for external use). It also doesn't solve your problems:
You now need to build with the same version from rustc/rustdoc you linked, so the problem of unsupported nightly versions is still there for you.
rustdoc dynamically links to librustc_driver and libLLVM, so the user still needs to have that version installed.
I was using the latest version of this crate to generate JSON rustdoc output, but there was a version mismatch with the format that
rustdoc
executable generated:https://docs.rs/rustdoc-types/0.29.1/rustdoc_types/struct.Header.html
vs https://docs.rs/rustdoc-types/0.30.0/rustdoc_types/struct.FunctionHeader.html
because the workspace that I wanted to document was using an older nightly.
Is there a way to be able to deserialize ALL previous formats in the same executable that uses
rustdoc-types
?Because I intend to distribute my executable / use the compiled executable on different machines, but if it invokes the rustdoc executable that's installed for the user, it might use a different
FORMAT_VERSION
.And every workspace might be pinned to a different Rust nightly, so currently it requires source code modification every time I want to accommodate a different nightly in the workspace that I want to run it on :/
Even better:
Is there a way to invoke not the rustdoc executable but link to the crate so that the versions always match? 🙂
The text was updated successfully, but these errors were encountered: