-
Notifications
You must be signed in to change notification settings - Fork 212
If static.files directory is present, use that #1889
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for working on this!
some thoughts:
- won't rustdoc also put invocation specific files into that sub-directory? So the normal build also has to handle this somehow?
- when the files are also in the same subdirectory, do the links to these also include the subdirectory? or are they requested from the crate root as right now?
Also it would be awesome if we could start adding more tests for the build specifics too. Build-tests are relatively recent (see tests
in this module) but I would love to cover more of the build process in these.
Nope! That's part of the goal of using a different directory in rust-lang/rust#101702. Static files and invocation files will never be in the same directory. Invocation specific files will still be generated in the doc root (search-index, crates, source-files) or alongside HTML files in subdirectories (trait implementors, sidebar-items).
After rust-lang/rust#101702 lands, files like main-xxx.js will still be loaded (
Sounds good, I'll give it a shot. |
b554dab
to
bcfc130
Compare
bcfc130
to
32dcff4
Compare
I was able to manually test this against a
This should be used with export DOCSRS_TOOLCHAIN=62fd07b1ee7441dad3ff012468c1251d889a5f5b, which is the try build generated here. Note there has been another revision since, to improve performance, so we'll want to test it one last time before everything is nailed down. |
Alright, rust-lang/rust#101702 is fully reviewed and ready to go. I've manually tested this docs.rs branch using the instructions above and the latest try build,
Which was built here: rust-lang/rust#101702 (comment) And it all works. |
this is fantastic, could you make a PR with that please? I've wanted to support this for local development for ages. |
I will try. Unfortunately most of the patch is just commenting out lines of code I don't fully understand, so I need to figure out what those do so I can decide to either make them not happen for CI builds or fix them so they work with CI builds. But I definitely agree this would be very helpful for development and would like to have it. |
This prepares for rust-lang/rust#101702 by adding special handling of the static.files directory.
I still need to figure out how to get the rustwide builder to build based on my local toolchain in order to test this. I've gotten it working once before but I remember it was kinda complicated.