Skip to content
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

rustdoc: incorporate stability index throughout #15263

Merged
merged 1 commit into from
Jul 1, 2014

Conversation

aturon
Copy link
Member

@aturon aturon commented Jun 30, 2014

This commit hooks rustdoc into the stability index infrastructure in two
ways:

  1. It looks up stability levels via the index, rather than by manual
    attributes.
  2. It adds stability level information throughout rustdoc output, rather
    than just at the top header. In particular, a stability color (with
    mouseover text) appears next to essentially every item that appears
    in rustdoc's HTML output.

Along the way, the stability index code has been lightly refactored.

annotator.index
}
/// Construct the stability index for a crate being compiled.
pub fn build_index(krate: &Crate) -> Index {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

@aturon
Copy link
Member Author

aturon commented Jun 30, 2014

@huonw Thanks for catching that -- leftovers from a larger refactor that I ended up backing out. I've reverted the function back to a constructor method.

});
let traits = traits.collect::<Vec<&(clean::Impl, Option<String>)>>();

let (non_trait, traits) = v.partitioned(|i| i.impl_.trait_.is_none());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how clever!

@alexcrichton
Copy link
Member

This is amazing, I can't wait to see this evolve over time!

This commit hooks rustdoc into the stability index infrastructure in two
ways:

1. It looks up stability levels via the index, rather than by manual
attributes.

2. It adds stability level information throughout rustdoc output, rather
than just at the top header. In particular, a stability color (with
mouseover text) appears next to essentially every item that appears
in rustdoc's HTML output.

Along the way, the stability index code has been lightly refactored.
@aturon
Copy link
Member Author

aturon commented Jul 1, 2014

@alexcrichton Updated:

  • js cross-crate magic now pulls stability information
  • colors improved
  • no more nested stability blazes

I didn't bother trying to stretch out the stability blaze to go alongside the method documentation. Let's start with this look, and we can iterate later.

@huonw
Copy link
Member

huonw commented Jul 1, 2014

Random thought I just had inspired by this, rustdoc could emit a crate-summary page coloured by stability, e.g.

stability page sketch

then it'll be easy to tell at a glance what's stable and what's not (and so how much work we have left to do).

(Sorry for the really basic sketch: it could be on a per-crate basis, or by-default collapse items with inherited stability etc.)

@aturon
Copy link
Member Author

aturon commented Jul 1, 2014

@huonw Awesome sketch :) I'm hoping to work on some kind of stability dashboard infrastructure, which will include a json dump. I'd like to do http://huonw.github.io/isrustfastyet/ graphs for number of stable/unstable/experimental items for at least libstd as well. I'll catch you on IRC to discuss at some point soon.

bors added a commit that referenced this pull request Jul 1, 2014
…chton

This commit hooks rustdoc into the stability index infrastructure in two
ways:

1. It looks up stability levels via the index, rather than by manual
attributes.

2. It adds stability level information throughout rustdoc output, rather
than just at the top header. In particular, a stability color (with
mouseover text) appears next to essentially every item that appears
in rustdoc's HTML output.

Along the way, the stability index code has been lightly refactored.
@bors bors closed this Jul 1, 2014
@bors bors merged commit 256df5e into rust-lang:master Jul 1, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 17, 2023
…ykril

Enable derive feature for serde in lsp-server

Publishing failed due to this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants