016cef914b
This PR adds a program which uses the JSON output from #24884 to generate a webpage with descriptions of each diagnostic error. The page is constructed by hand, with calls to `rustdoc`'s markdown renderers where needed. I opted to generate HTML directly as I think it's more flexible than generating a markdown file and feeding it into the `rustdoc` executable. I envision adding the ability to filter errors by their properties (description, no description, used, unused), which is infeasible using the whole-file markdown approach due to the need to wrap each error in a `<div>` (markdown inside tags isn't rendered). Architecturally, I wasn't sure how to add this generator to the distribution. For the moment I've settled on a separate Rust program in `src/etc/` that gets compiled and run by a custom makefile rule. This approach doesn't seem too hackish, but I'm unsure if my usage of makefile variables is correct, particularly the call to `rustc` (and the `LD_LIBRARY_PATH` weirdness). Other options I considered were: * Integrate the error-index generator into `rustdoc` so that it gets invoked via a flag and can be built as part of `rustdoc`. * Add the error-index-generator as a "tool" to the `TOOLS` array, and make use of the facilities for building tools. The main reason I didn't do this was because it seemed like I'd need to add lots of stuff. I'm happy to investigate this further if it's the preferred method. |
||
---|---|---|
.. | ||
compiler-rt@58ab642c30 | ||
compiletest | ||
doc | ||
driver | ||
error-index-generator | ||
etc | ||
grammar | ||
jemalloc@e24a1a025a | ||
liballoc | ||
libarena | ||
libbacktrace | ||
libcollections | ||
libcollectionstest | ||
libcore | ||
libcoretest | ||
libflate | ||
libfmt_macros | ||
libgetopts | ||
libgraphviz | ||
liblibc | ||
liblog | ||
librand | ||
librbml | ||
librustc | ||
librustc_back | ||
librustc_bitflags | ||
librustc_borrowck | ||
librustc_data_structures | ||
librustc_driver | ||
librustc_lint | ||
librustc_llvm | ||
librustc_privacy | ||
librustc_resolve | ||
librustc_trans | ||
librustc_typeck | ||
librustc_unicode | ||
librustdoc | ||
libserialize | ||
libstd | ||
libsyntax | ||
libterm | ||
libtest | ||
llvm@bff6907697 | ||
rt | ||
rust-installer@e54d4823d2 | ||
rustbook | ||
rustllvm | ||
test | ||
snapshots.txt |