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

Display doc comments for private types #911

Closed
3 tasks
vignesh-sankaran opened this issue Jul 25, 2017 · 7 comments
Closed
3 tasks

Display doc comments for private types #911

vignesh-sankaran opened this issue Jul 25, 2017 · 7 comments
Labels
C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works E-has-mentor E-help-wanted

Comments

@vignesh-sankaran
Copy link
Contributor

vignesh-sankaran commented Jul 25, 2017

crates.io is documented as its own crate as cargo_registry, and the S3 interaction as cargo_registry_s3. I found out about how to display private types' documentation via cargo doc --no-defaults --passes collapse-docs --passes unindent-comments, but I don't think docs.rs has an option to do this for us. Is there an option to specify this another way e.g. in the Cargo.toml? Otherwise we could host the documentation on a different site ala Serde.

Tasks involved in completing this, added by @carols10cents:

  • Add a [package.metadata.docs.rs] to Cargo.toml as shown in this PR description
  • Set the rustdoc-args key to [ "--no-defaults --passes collapse-docs --passes unindent-comments" ]
  • Send in a PR and remind @carols10cents to release a new version of cargo-registry after merging the PR :)
@kureuil
Copy link
Contributor

kureuil commented Jul 25, 2017

Support for custom rustdoc arguments was merged a while ago, so we should be able to expose private types' documentation on docs.rs.

@carols10cents carols10cents added the C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works label Aug 2, 2017
@mattgathu
Copy link
Contributor

Hi. I'm interested in implementing this. Can I be assigned. thanks

@vignesh-sankaran
Copy link
Contributor Author

Don't think we assign issues with this repo, you can just start working on it and submit a PR when you're ready :). Let us know if you have any questions :).

@mattgathu
Copy link
Contributor

cool. thanks

mattgathu added a commit to mattgathu/crates.io that referenced this issue Sep 6, 2017
Fixes rust-lang#911

- Adds a [package.metadata.docs.rs] to Cargo.toml
- Sets the rustdoc-args key to [ "--no-defaults --passes collapse-docs --passes unindent-comments" ]
@mattgathu
Copy link
Contributor

Hi I have created a PR: #1042 that implements the tasks in the description.

bors-voyager bot added a commit that referenced this issue Sep 7, 2017
1042: Display doc comments for private types r=carols10cents

Fixes #911

- Adds a [package.metadata.docs.rs] to Cargo.toml
- Sets the rustdoc-args key to [ "--no-defaults --passes collapse-docs --passes unindent-comments" ]
bors-voyager bot added a commit that referenced this issue Sep 7, 2017
1042: Display doc comments for private types r=carols10cents

Fixes #911

- Adds a [package.metadata.docs.rs] to Cargo.toml
- Sets the rustdoc-args key to [ "--no-defaults --passes collapse-docs --passes unindent-comments" ]
@carols10cents
Copy link
Member

carols10cents commented Sep 9, 2017

Hmmmmmm, so I published cargo-registry 0.2.0, and it's up on docs.rs, but I don't see private things like the DOCUMENTATION_BLACKLIST constant in the docs :( I'm not sure what's wrong, going to open an issue with docs.rs to try and figure it out.

@carols10cents carols10cents reopened this Sep 9, 2017
bors-voyager bot added a commit that referenced this issue Sep 10, 2017
1047: Fix docs.rs metadata for docs of private types r=carols10cents

Fixes: #911

Tested with [this crate](https://docs.rs/docsrs-test/0.0.4/docsrs_test/).
@carols10cents
Copy link
Member

v0.2.1 works!!!!! https://docs.rs/cargo-registry/0.2.1/cargo_registry/krate/index.html shows private stuff!!

Thank you @mattgathu and @onur!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works E-has-mentor E-help-wanted
Projects
None yet
Development

No branches or pull requests

4 participants