rust-lang / docs.rs

crates.io documentation generator
https://docs.rs
MIT License
955 stars 193 forks source link

Update to latest nightly [request] #171

Closed Flarp closed 6 years ago

Flarp commented 6 years ago

The current version of Rust being used, rustc 1.22.0-dev (b1cfd1750 2017-09-21, has a bug that prevents crates from being compiled if they're generating dynamic documentation with macros. (Report here, fix here.) I (selfishly) need nightly in order to be able to compile my crate. I can confirm it works on my local machine using nightly, but not using stable.

Build log from docs.rs here, offending code here.

onur commented 6 years ago

Hi, after I lost my OSX machine, building rustc became a serious problem, I am still looking for a replacement I'll try my best to update rustc as soon as possible.

gnzlbg commented 6 years ago

The docs of my crate don't build because the rust compiler used is too old:

https://docs.rs/crate/slice-deque/

onur commented 6 years ago

Hi guys I got a new OSX machine and we are back in business 💛

You can see the update progress here: onur/rust#6

rozbb commented 6 years ago

+1 on this. ramp 0.3.11 needs to be rebuilt because the unique feature was renamed to ptr_internals very recently. https://docs.rs/crate/ramp/0.3.11/builds/83294

Thank you!

AdamNiederer commented 6 years ago

This also affects coresimd, stdsimd, and faster.

sfleischman105 commented 6 years ago

This is currently affecting pleco and pleco_engine as well due to the use of NonNull. https://docs.rs/crate/pleco/0.3.4/builds/84494

gnzlbg commented 6 years ago

@steveklabnik docs.rs has been broken for over a month, any chance that the rust docs team / infrastructure teams can help @onur here somehow ? docs.rs is an important part of the docs ecosystem.

Flarp commented 6 years ago

@gnzlbg @onur is actively trying to update it, there appears to be some problems. Look here https://github.com/onur/rust/pull/6

bluss commented 6 years ago

Would be awesome to upstream onur's rust/rustdoc patches so that this problem didn't have to exist.

onur commented 6 years ago

I'd like to give you an update.

I managed to successfully build rustc for every platform docs.rs supports, but theme picker in the recent rustdoc is not compatible with docs.rs' css/js cache and actually did break entire UI. I'll try to fix or disable theme picker.

gnzlbg commented 6 years ago

Are you using upstream rustc or a modified version of it?

onur commented 6 years ago

@GuillaumeGomez can we make theme picker a bit more sane? Docs.rs is re-naming every common css and js file (main.css, main.js, rustdoc.css etc.) to serve them once instead of serving same copy over and over again for each crate documentation. Therefore dark.css and main.css is becoming: http://docs.rs/dark-{RUSTC_VERSION}.css in docs.rs. But unfortunately switchTheme in storage.js is not compatible with this model and only works with filenames like main.css and dark.css.

GuillaumeGomez commented 6 years ago

That'll require a new option to rustdoc but here what I propose:

Providing an option to replace an existing theme by yours so you'll be able to rename a theme.

What do you think about it?

onur commented 6 years ago

@GuillaumeGomez I prefer a single theme.css file with both dark and light color schemes and a basic javascript to change class of main element.

Imagine you have a themes.css with:

body.dark-theme {
   background-color: #000;
}
body.light-theme {
   background-color: #fff;
}

And your javascript file can change class attribute of body to set desired theme. With this way docs.rs can move/rename/reuse every css/js file.

I don't think your idea will work on docs.rs, it seems user has to choose and replace theme, not docs.rs.

GuillaumeGomez commented 6 years ago

I don't think this is a good idea. It'd make the CSS content much bigger or would greatly increase the javascript runtime load. Also, having all themes in a single file would make the add of new themes very difficult to both do and test (the themes tests just got merged and I don't really want to have to update it to take such a specific rule into account).

I don't think your idea will work on docs.rs, it seems user has to choose and replace theme, not docs.rs.

I'm not sure to understand your point. They don't "choose" and "replace" themes. They have a few themes provided, they can pick between them, that's all.