Stream: rustdoc

Topic: The duplication in json


view this post on Zulip Nixon Enraght-Moony (Dec 26 2020 at 16:00):

/me is looking into this duplication

view this post on Zulip Nixon Enraght-Moony (Dec 26 2020 at 16:35):

this branch fixes the test suite, but panics on regex

view this post on Zulip Nixon Enraght-Moony (Dec 26 2020 at 18:26):

Welp, more debuging (I can explain the format if you want) has shown duplicate calls arn't coming from item, but outside.

This leaves 2 questions:

  1. Does this happen in html,
  2. What does the regex crate do that isn't in the test suite (could be alot, json suite is sparce)

view this post on Zulip Nixon Enraght-Moony (Dec 26 2020 at 18:55):

Further update, duplication in html

view this post on Zulip Nixon Enraght-Moony (Dec 28 2020 at 19:37):

Update: Trying to run rustdoc-json tests on the rustdoc suite gives a bunch of interesting errors

view this post on Zulip Nixon Enraght-Moony (Dec 28 2020 at 20:01):

It looks like the common link is pub use.

view this post on Zulip Joshua Nelson (Dec 28 2020 at 20:09):

@Nixon Enraght-Moony are they struct imports? take a look at https://github.com/rust-lang/rust/pull/80300#discussion_r549014404

view this post on Zulip Nixon Enraght-Moony (Dec 28 2020 at 20:41):

It's not the ctor, I think

mod inner {
    pub struct Inner {
        pub foo: i32
    }
}


pub use inner::Inner as Outer;
thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Item {
    id: Id("0:4"),
    crate_id: 0,
    name: Some("Inner"),
    source: Some(Span {
        filename: "/home/nixon/upstreams/rust/rust/src/test/rustdoc-json/my.rs",
        begin: (2, 4),
        end: (4, 5),
    }),
    visibility: Public,
    docs: "",
    links: {},
    attrs: [],
    deprecation: None,
    kind: Struct,
    inner: StructItem(Struct {
        struct_type: Plain,
        generics: Generics {
            params: [],
            where_predicates: [],
        },
        fields_stripped: false,
        fields: [Id("0:5")],
        impls: [Id("0:9"), Id("0:10"), Id("0:11"), Id("0:13"), Id("0:14")],
    }),
};
`,
 right: `Item {
    id: Id("0:4"),
    crate_id: 0,
    name: Some("Outer"),
    source: Some(Span {
        filename: "/home/nixon/upstreams/rust/rust/src/test/rustdoc-json/my.rs",
        begin: (2, 4),
        end: (4, 5),
    }),
    visibility: Public,
    docs: "",
    links: {},
    attrs: [],
    deprecation: None,
    kind: Struct,
    inner: StructItem(Struct {
        struct_type: Plain,
        generics: Generics {
            params: [],
            where_predicates: [],
        },
        fields_stripped: false,
        fields: [Id("0:5")],
        impls: [Id("0:9"), Id("0:10"), Id("0:11"), Id("0:13"), Id("0:14")],
    }),
}`', src/librustdoc/json/mod.rs:171:17

view this post on Zulip Joshua Nelson (Dec 28 2020 at 22:40):

hmm, ok

view this post on Zulip Joshua Nelson (Dec 28 2020 at 22:40):

very strange

view this post on Zulip Nixon Enraght-Moony (Jan 03 2021 at 21:44):

Oppened as #80664. Your comment about uniqueness of _definition_ vs _accesabilty_ was right on the money.

view this post on Zulip Joshua Nelson (Jan 03 2021 at 21:52):

nice :smile:

view this post on Zulip Joshua Nelson (Jan 03 2021 at 21:52):

https://github.com/rust-lang/rust/issues/80664#issuecomment-753681341


Last updated: Oct 11 2021 at 22:34 UTC