-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link to internal rustdocs #100
Comments
@Michael-F-Bryan - I'm new to rust. Since I see this is Easy tagged issue shall I take this issue? |
@rajcspsg if you'd like to give it a go that's fine with me, I'm also happy to mentor or answer any questions you encounter while trying to tick this issue off 😁 We'll need to wait for rust-lang/rust-central-station#40 to be fully merged, but after that it should be relatively straightforward. If you subscribe to that issue, GitHub should send you notifications when it is resolved and you can get started. |
@Michael-F-Bryan _ Thanks for mentoring me and I'm happy to take your guidance as I'm new to rust. |
It should mainly be a case of looking for all links to source files in the The easiest way would be to use a tool like grep or ripgrep and search for anything with
You can see that |
To clarify, you are looking for links in this repo to the other repo :) |
Thanks for the suggestion @mark-i-m @Michael-F-Bryan. When I searched for here for I should have get the nightly documentation link instead of 1.1.0 documentation, correct? |
@rajcspsg yes. That version of the docs looks quite outdated ( Now we've released EDIT: Looks like the PR was merged 🎉 |
@rajcspsg IIUC, the new docs should be available tomorrow after the next nightly is released. |
Thanks @Michael-F-Bryan @mark-i-m.
|
Hmm... that link looks pretty outdated too. rust 1.1 was a long time ago. Tomorrow all of the docs should be up (or so I am told). They should look like normal rustdocs and should be hosted at doc.rust-lang.org/nightly/nightly-rustc So tomorrow (hopefully) you should be able to go to doc.rust-lang.org/nightly/nightly-rustc and just use the normal rustdoc search box to find everything (hopefully).
Ah, they're all relative links. If you use the hosted version here the links should work. Thanks for pointing this out though. The intent is for people to view the guide as a book (via that host version). Do you think we should fix the links so that they work on github too? It would be a bit of a tedious piece of work, but it's possible... |
@mark-i-m - Sure. I will try to fix 404 errors in github as well. I will wait for a day till document release and will let you know if I need any help. |
@rajcspsg It looks like there was a bug, which should (hopefully) be fixed for tomorrow. |
Thanks @Michael-F-Bryan @mark-i-m I will work on this and submit PR. |
Thanks! Nice job :)
Hmm... I can't find those either. I asked a followup on rust-lang/rust-central-station#40
Do you mean with respect to these links that you mentioned before?
These should be links to hosted version of the rustc guide itself. I don't think we were expecting anyone to use the github interface to view the book. I'm not sure if we want to make these links absolute or leave them relative as they are... I opened #109 to deal with that; for now, let's leave them as-is. |
Also, I will try to look at the PR soon |
Ok, that was fast. The reason those items you listed are not in the hosted docs is that they are private, whereas rustdoc generates documentation for only public items by default. There is active discussion on generating docs for these private items in rust-lang/rust#29893. |
sure Thanks @mark-i-m !!! |
@rajcspsg I merged your PR :) It appears that private modules are now documented, so I think you should be able to find the remaining items. Are you still interested in working on this? |
@mark-i-m |
That's right |
Hey @mark-i-m I'm still not able to find documentation for below items.
All of them looks like tests but I don't know how to get its documentation link. |
Thanks :) I think anything in src/tools is not part of the compiler proper, so it will not be documented. Likewise, anything in src/test is a test, rather than part of the compiler itself, so those will not be documented either. I think we can leave these links for now. For (5), I think we can use the following link: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/index.html |
@mark-i-m - I've updated the documentation link for https://github.com/rust-lang/rust/tree/master/src/librustc_driver/lib.rs in the PR. |
@mark-i-m @Michael-F-Bryan I think still 2 below items are yet to completed in this issue, correct? |
@rajcspsg Yes, that's correct |
@mark-i-m i may need some pointers to start with. What should be updated in contributing section? |
Perhaps we can start a "Contributor Tips" section at the end? The first tip can be something like "Whenever referring to a part of the rustc source code, please add a link to the rustc rustdocs. Since these links are checked, it will help us discover when something in the compiler changes and the guide needs to be updated." |
@Michael-F-Bryan did you have something specific in mind? |
Ping @Michael-F-Bryan ^^^ |
Oops, looks like I missed this somehow!
I was just thinking we should mention in the contributor guide that the internal API docs are available online and to link to them where possible. The comment you made sounds pretty good.
|
Ping @rajcspsg Are you still interested in working on this? |
I actually have had a lot of trouble looking for the API docs of rustc (are they linked from anywhere? I couldn't easily find it), they should at least be linked in the readme, or have a section somewhere with a link to the docs. FWIW, this is the link: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ |
I agree. The docs are surprisingly hard to Google. |
Wow, there are a lot of comments here. I recently opened up #189, which added links to the rustdoc for the HIR section. I was thinking we should open a fresh issue (this one is perhaps too cluttered) and make it into a "quest issue". Basically, make a checklist of modules that need work, and issue out a call to try to get people involved. Seems like a nice "starter point". But maybe that's not necessary, even? |
@nikomatsakis @mark-i-m Hello guys. I'm really sorry that I'm out for a while due to few personal commitments. I think it would be good to open new issue for pending things for this PR. |
I'll try to curate such a list and open a new issue sometime soon. I'm not sure if I will have time today, though. I will post back here soon. |
Hmm... do we ever mention where they can be found? (https://doc.rust-lang.org/nightly/nightly-rustc/rustc/) Sorry for the delay on this. I have been pretty swamped for the past few weeks (and will probably continue to be swamped until at least Oct 12)... I appreciate your patience! |
Ok, so I opened #209 to track the links @rajcspsg mentioned in #100 (comment). I'm not really sure how to make progress there TBH, but I don't want to lose the list of links. I also opened #208 to update the readme, as per the checklist in the OP. @Michael-F-Bryan @rajcspsg let me know what you think. @rajcspsg I think the only thing left here is to update the intro section of the guide itself with a note and link to the compiler rustdocs. |
@mark-i-m shall we mark |
Hmm... do we ever mention where they can be found? (https://doc.rust-lang.org/nightly/nightly-rustc/rustc/) |
@mark-i-m I will update and send PR for that. I have a question. |
Perhaps both? compiler-documenting seems like a logical place, but I would also like the link to be highly-visible, since they are really useful. |
Hooray! 🎉 This is done 😄 Nice job @rajcspsg! This is a major improvement to the guide! |
Thanks @mark-i-m for accepting my PR :) |
This issue is high in the Google results for "rustc internal rustdoc" and the link above doesn't work. This one does though: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ |
https://doc.rust-lang.org/nightly/nightly-rustc/ is the URL that will continue to work even if crates are renamed. |
When rust-lang/rust-central-station#40 lands we'll have a stable location which contains internal API documentation (i.e. the equivalent of
./x.py doc
withcrate-docs = true
) 🎉This means when referring to a particular struct or function we'll be able too link to its API docs instead of linking to the original source file and hoping for the best.
Once that PR is merged we'll need to:
The text was updated successfully, but these errors were encountered: