Problems of publishing on crates.io


#1

I am a new user of Rust, and have published my first crate trees last week. Two Problems found:

  1. Missing documents after the first release
    Three versions have been published, but only the very first version 0.1.0 has its document generated on docs.rs. The latter releases, version 0.1.1 and 0.1.2 have no document at all.

  2. Wrong rendering of markdown list in the crate page.
    In “Quick start” section, “Tree notaion”, “Forest notation”, “Preorder traversal” and “String representation” items are all numbered as #1.


#2

I can answer the second one :slight_smile:!

For markdown lists, if you want to add content corresponding to a list item, you should indent it by 4 spaces. So this code:

1. An item

    ```rust
    fn main() {
        panic!("it's alive!")
    }
    ```

1. Another item

    Note that I still used 1. for the item number, but it will render as 2.

produces this:

  1. An item

    fn main() {
        panic!("it's alive!")
    }
    
  2. Another item

    Note that I still used 1. for the item number, but it will render as 2.


If you don’t indent the text / code beneath the list item, it treats it as “that was the end of the list, this is new content”. It’s useful to have that indentation, because sometimes you want to do lists this:

  1. Item one

    Leading sentence about sub items:

    1. Sub 1

    2. Sub 2

      Stuff for sub item 2.

    Summary note about sub items.

  2. Item 2

    Item 2 sentence

Ending note


#3

Thanks! I’ll try to fix it in the next version.
It’s strange that the rendering on docs.rs or github are fine.


#4

Inconsistency between crates.io and docs.rs should be considered a bug, shouldn’t it? They’re both part of the official build system.


#5

And it looks like the Discourse link parser doesn’t consider .rs a valid TLD, based on it autolinking crates.io but not docs.rs.


#6

docs.rs has only very very recently come under purview of the docs team, like, less than a month. We’re still working it out.


#7

docs.rs is broken ATM; it’s nothing to do with your crate.


#8

I just published version 0.1.3, but found the document link navigated to version 0.1.2’s. Quite strange.