Skip to content

Crate documentation lists rand_wasm_bindgen_test crate #913

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

Closed
jimblandy opened this issue Nov 23, 2019 · 7 comments
Closed

Crate documentation lists rand_wasm_bindgen_test crate #913

jimblandy opened this issue Nov 23, 2019 · 7 comments

Comments

@jimblandy
Copy link

In the documentation at https://rust-random.github.io/rand/rand/index.html, the list of crates in the left sidebar includes the crate rand_wasm_bindgen_test, which doesn't seem to have anything of interest to users. This crate should probably be marked to be excluded from the documentation.

@vks
Copy link
Collaborator

vks commented Nov 29, 2019

This does not happen on docs.rs, so it seems to be specific to the way we build the docs. Maybe we can exclude that crate or do something like the following:

diff --git a/tests/wasm_bindgen/src/lib.rs b/tests/wasm_bindgen/src/lib.rs
index 9af0b9e..6afe76f 100644
--- a/tests/wasm_bindgen/src/lib.rs
+++ b/tests/wasm_bindgen/src/lib.rs
@@ -8,7 +8,7 @@

 // Crate to test WASM with the `wasm-bindgen` lib.

-#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png")]
+#![doc(hidden)]

 use rand::rngs::{OsRng, StdRng};
 use rand::{Rng, SeedableRng};

@dhardy
Copy link
Member

dhardy commented Nov 29, 2019

We can try that @vks. Care to make a PR?

@vks
Copy link
Collaborator

vks commented Dec 9, 2019

It seems like we would have to replace cargo doc --no-deps --all --all-features with a command that ignores the WASM test crate, which requires listing all other crates explicitly.

@dhardy
Copy link
Member

dhardy commented Dec 9, 2019

Indeed, and as I already said in #914 in my opinion it is better not to do this (i.e. live with this little issue). Do you agree @vks?

@vks
Copy link
Collaborator

vks commented Dec 9, 2019

If we do this, we should maybe add some documentation that the module is internal and for tests only.

@dhardy
Copy link
Member

dhardy commented Dec 9, 2019

"test" is in the name already. But if you prefer we can get rid of this. It's largely redundant with getrandom's testing, but there @josephlr found a way of removing the separate test crate. (I guess it's just laziness on my part that this hasn't been done in Rand yet.)

@vks
Copy link
Collaborator

vks commented Aug 24, 2021

I don't see rand_wasm_bindgen_test anymore, so I think this is fixed.

@vks vks closed this as completed Aug 24, 2021
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 a pull request may close this issue.

3 participants