Skip to content

Crate documentation lists rand_wasm_bindgen_test crate #913

Closed

Description

@jimblandy

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.

Activity

  1. vks commented on Nov 29, 2019

    @vks
    Contributor

    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};
  2. dhardy commented on Nov 29, 2019

    @dhardy
    Member

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

  3. added a commit that references this issue on Nov 29, 2019
    ebaca19
  4. vks commented on Dec 9, 2019

    @vks
    Contributor

    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.

  5. dhardy commented on Dec 9, 2019

    @dhardy
    Member

    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?

  6. vks commented on Dec 9, 2019

    @vks
    Contributor

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

  7. dhardy commented on Dec 9, 2019

    @dhardy
    Member

    "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.)

  8. vks commented on Aug 24, 2021

    @vks
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions