Rustdoc: JSON backend experimental impl, with new tests. by aDotInTheVoid · Pull...
source link: https://github.com/rust-lang/rust/pull/79539
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Member
jyn514 left a comment
I'm also sure how many of these we need to do before landing on nightly, as it would be nice to get this in tree, so it isn't effected by churn like #79125, #79041, #79061
Most of it can wait until later I think (although it should be done before stabilization). The things I'd consider blockers are:
- Fixing the test suite, which currently does nothing. This should be as simple as reverting a66a97a. I see you already did, thank you!
- Anything changing rustdoc's normal behavior, such as https://github.com/rust-lang/rust/pull/75114/files/a66a97ac588f26350cab886904ddbe70ce17d339#r519470764. It doesn't necessarily have to be reverted, but if not there should be an explanation for why it changed. I understand you're not the one who changed it and it makes things more difficult - maybe revert it, run the tests, and see what breaks?
- Stripped items should not be included by default: #75114 (comment). This is totally against the stability guarantees of rust - the behavior around
--document-private-items
is a little unclear and we can have that discussion before stabilization, but including private items by default seems very wrong to me.
Other than that, I think this has been in limbo long enough and should get merged ASAP.
cc @tmandry, all is not lost
src/test/rustdoc-json/compare.py
Outdated
if expected_type == str and actual.startswith(base_dir):
if actual.replace(base_dir + "/", "") != expected:
raise SubsetException(
"expected `{}`, got: `{}`".format(
expected, actual.replace(base_dir + "/", "")
Comment on lines
42 to 46
aDotInTheVoid 19 days ago
Author
Contributor
This is a hack to get around the real output being "filename": "/home/nixon/upstreams/rust/rust/src/test/rustdoc-json/structs.rs"
, but the test is "filename": "structs.rs",
.
Long term, it's probably usefull to do something like $TEST_BUILD_DIR
, like the ui tests have.
jyn514 19 days ago
Member
Ok, can you leave those examples as a comment in the source? Feel free to change the absolute path to something else as long as it's still clear it's absolute and not relative.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK