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

[WIP] rust case insensitive fs support #59785

Conversation

GuillaumeGomez
Copy link
Member

This PR aims the support for case insensitive file systems in such cases:

pub struct FoO;
pub struct Foo;

I now need people to take a look and look for bugs that I'd have missed (windows' users would be very cool!).

I plan on adding the code sample above as a test but that seems a bit limited compared to the amount of code there is...

r? @QuietMisdreavus

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 7, 2019
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 7, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:1873e6f3:start=1554676253351537609,finish=1554676329159014459,duration=75807476850
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
Setting environment variables from .travis.yml
---
travis_time:start:test_assembly
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:15:50] 
[01:15:50] running 9 tests
[01:15:50] iiiiiiiii
[01:15:50] 
[01:15:50]  finished in 0.154
[01:15:50] travis_fold:end:test_assembly

---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:16:06] 
[01:16:06] running 121 tests
[01:16:32] .iiiii...i.....i..i...i..i.i.i..i.ii...i.....i..i....i..........iiii..........i...ii...i.......ii.i. 100/121
[01:16:37] i.i......iii.i.....ii
[01:16:37] 
[01:16:37]  finished in 30.790
[01:16:37] travis_fold:end:test_debuginfo

---
travis_time:start:test_rustdoc
Check compiletest suite=rustdoc mode=rustdoc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:20:31] 
[01:20:31] running 302 tests
[01:21:45] FFFFFFF.F.F..FF..F.FF...FF.FiFFFF..FFF...FFFFF.FFF.FFF...FFFFF.FFF.F..FFF.F.FFFFFF.F...FF.F.FF..FFF. 100/302
[01:22:47] ...F...FF.........FFFFFFFFFFFFF.F.......Fi.F.FFF.FF.F...FF.FFF.FF..F..FFF..FFF......FFF..F..F......F 200/302
[01:23:52] F..FFF.F.FF....FFF..F..FFF.......F...F.FFF....FF..FF....FFF..FFFF.FFFFFFFFFFF....FFFFFF.FF.FF..F...F 300/302
[01:23:53] F.
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/all.rs stdout ----
[01:23:53] 
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/all" "/checkout/src/test/rustdoc/all.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 3: @has check failed
[01:23:53]  `XPATH PATTERN` did not match
[01:23:53]  // @has foo/all.html '//a[@href="struct.Struct.html"]' 'Struct'
[01:23:53] 4: @has check failed
[01:23:53]  `XPATH PATTERN` did not match
[01:23:53]  // @has foo/all.html '//a[@href="enum.Enum.html"]' 'Enum'
[01:23:53] 5: @has check failed
[01:23:53]  `XPATH PATTERN` did not match
[01:23:53]  // @has foo/all.html '//a[@href="union.Union.html"]' 'Union'
[01:23:53] 6: @has check failed
[01:23:53]  `XPATH PATTERN` did not match
[01:23:53]  // @has foo/all.html '//a[@href="constant.CONST.html"]' 'CONST'
[01:23:53] 7: @has check failed
[01:23:53]  `XPATH PATTERN` did not match
[01:23:53]  // @has foo/all.html '//a[@href="static.STATIC.html"]' 'STATIC'
[01:23:53] 8: @has check failed
[01:23:53]  `XPATH PATTERN` did not match
[01:23:53]  // @has foo/all.html '//a[@href="fn.function.html"]' 'function'
[01:23:53] 26: @has check failed
[01:23:53]  `XPATH PATTERN` did not match
[01:23:53]  // @has foo/all.html '//a[@href="struct.ReexportedStruct.html"]' 'ReexportedStruct'
[01:23:53] Encountered 7 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/all.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/assoc-consts-version.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/assoc-consts-version" "/checkout/src/test/rustdoc/assoc-consts-version.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 13: @has check failed
[01:23:53]  File does not exist 'foo/struct.SomeStruct.html'
[01:23:53]      // @has 'foo/struct.SomeStruct.html' '//*[@id="associatedconstant.SOME_CONST"]//div[@class="since"]' '1.1.2'
[01:23:53] Encountered 1 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/assoc-consts-version.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/assoc-item-cast.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/assoc-item-cast" "/checkout/src/test/rustdoc/assoc-item-cast.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 14: @has check failed
[01:23:53]  File does not exist 'foo/type.AsExprOf.html'
[01:23:53]  // @has foo/type.AsExprOf.html
[01:23:53] 15: @has check failed
[01:23:53]  File does not exist 'foo/type.AsExprOf.html'
[01:23:53]  // @has - '//*[@class="rust typedef"]' 'type AsExprOf<Item, Type> = <Item as AsExpression<Type>>::Expression;'
[01:23:53] Encountered 2 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/assoc-item-cast.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/assoc-consts.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/assoc-consts" "/checkout/src/test/rustdoc/assoc-consts.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 2: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Foo.html'
[01:23:53]      // @has assoc_consts/trait.Foo.html '//*[@class="rust trait"]' 'const FOO: usize;'
[01:23:53] 4: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Foo.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.FOO"]' 'const FOO: usize'
[01:23:53] 6: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Foo.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.FOO_NO_DEFAULT"]' 'const FOO_NO_DEFAULT: bool'
[01:23:53] 8: @!has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Foo.html'
[01:23:53]      // @!has - FOO_HIDDEN
[01:23:53] 16: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has assoc_consts/struct.Bar.html '//code' 'impl Foo for Bar'
[01:23:53] 17: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.FOO"]' 'const FOO: usize'
[01:23:53] 19: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.FOO_NO_DEFAULT"]' 'const FOO_NO_DEFAULT: bool'
[01:23:53] 21: @!has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @!has - FOO_HIDDEN
[01:23:53] 27: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.BAR"]' 'const BAR: usize'
[01:23:53] 35: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.BAZ"]' "const BAZ: Baz<'static, u8, u32>"
[01:23:53] 43: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.F"]' "const F: fn(_: &(dyn ToString + 'static))"
[01:23:53] 49: @!has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @!has assoc_consts/struct.Bar.html 'BAR_PRIVATE'
[01:23:53] 51: @!has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @!has assoc_consts/struct.Bar.html 'BAR_HIDDEN'
[01:23:53] 56: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Qux.html'
[01:23:53]  // @has assoc_consts/trait.Qux.html
[01:23:53] 58: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Qux.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.QUX0"]' 'const QUX0: u8'
[01:23:53] 59: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Qux.html'
[01:23:53]      // @has - '//*[@class="docblock"]' "Docs for QUX0 in trait."
[01:23:53] 62: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Qux.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.QUX1"]' 'const QUX1: i8'
[01:23:53] 63: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Qux.html'
[01:23:53]      // @has - '//*[@class="docblock"]' "Docs for QUX1 in trait."
[01:23:53] 66: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Qux.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.QUX_DEFAULT0"]' 'const QUX_DEFAULT0: u16'
[01:23:53] 67: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Qux.html'
[01:23:53]      // @has - '//*[@class="docblock"]' "Docs for QUX_DEFAULT12 in trait."
[01:23:53] 70: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Qux.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.QUX_DEFAULT1"]' 'const QUX_DEFAULT1: i16'
[01:23:53] 71: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Qux.html'
[01:23:53]      // @has - '//*[@class="docblock"]' "Docs for QUX_DEFAULT1 in trait."
[01:23:53] 74: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Qux.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.QUX_DEFAULT2"]' 'const QUX_DEFAULT2: u32'
[01:23:53] 75: @has check failed
[01:23:53]  File does not exist 'assoc_consts/trait.Qux.html'
[01:23:53]      // @has - '//*[@class="docblock"]' "Docs for QUX_DEFAULT2 in trait."
[01:23:53] 80: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]  // @has assoc_consts/struct.Bar.html '//code' 'impl Qux for Bar'
[01:23:53] 82: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.QUX0"]' 'const QUX0: u8'
[01:23:53] 83: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has - '//*[@class="docblock"]' "Docs for QUX0 in trait."
[01:23:53] 86: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.QUX1"]' 'const QUX1: i8'
[01:23:53] 87: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has - '//*[@class="docblock"]' "Docs for QUX1 in impl."
[01:23:53] 90: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.QUX_DEFAULT0"]' 'const QUX_DEFAULT0: u16'
[01:23:53] 91: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has - '//*[@class="docblock hidden"]' "Docs for QUX_DEFAULT12 in trait."
[01:23:53] 93: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.QUX_DEFAULT1"]' 'const QUX_DEFAULT1: i16'
[01:23:53] 94: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has - '//*[@class="docblock"]' "Docs for QUX_DEFAULT1 in impl."
[01:23:53] 97: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has - '//*[@id="associatedconstant.QUX_DEFAULT2"]' 'const QUX_DEFAULT2: u32'
[01:23:53] 98: @has check failed
[01:23:53]  File does not exist 'assoc_consts/struct.Bar.html'
[01:23:53]      // @has - '//*[@class="docblock"]' "Docs for QUX_DEFAULT2 in trait."
[01:23:53] Encountered 35 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/assoc-consts.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/assoc-types.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/assoc-types" "/checkout/src/test/rustdoc/assoc-types.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 5: @has check failed
[01:23:53]  File does not exist 'assoc_types/trait.Index.html'
[01:23:53]  // @has assoc_types/trait.Index.html
[01:23:53] 7: @has check failed
[01:23:53]  File does not exist 'assoc_types/trait.Index.html'
[01:23:53]      // @has - '//*[@id="associatedtype.Output"]//code' 'type Output: ?Sized'
[01:23:53] 8: @has check failed
[01:23:53]  File does not exist 'assoc_types/trait.Index.html'
[01:23:53]      // @has - '//code[@id="Output.t"]' 'type Output: ?Sized'
[01:23:53] 10: @has check failed
[01:23:53]  File does not exist 'assoc_types/trait.Index.html'
[01:23:53]      // @has - '//code[@id="index.v"]' 'fn index'
[01:23:53] 11: @has check failed
[01:23:53]  File does not exist 'assoc_types/trait.Index.html'
[01:23:53]      // @has - '//*[@id="tymethod.index"]//code' "fn index<'a>(&'a self, index: I) -> &'a Self::Output"
[01:23:53] 13: @has check failed
[01:23:53]  File does not exist 'assoc_types/trait.Index.html'
[01:23:53]      // @has - '//*[@id="tymethod.index"]//code//a[@href="../assoc_types/trait.Index.html#associatedtype.Output"]' "Output"
[01:23:53] Encountered 6 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/assoc-types.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/async-fn.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/async-fn" "/checkout/src/test/rustdoc/async-fn.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 29: @has check failed
[01:23:53]  File does not exist 'async_fn/struct.Foo.html'
[01:23:53]  // @has async_fn/struct.Foo.html
[01:23:53] 30: @matches check failed
[01:23:53]  File does not exist 'async_fn/struct.Foo.html'
[01:23:53]  // @matches - '//code' 'pub async fn f\(\)$'
[01:23:53] Encountered 2 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/async-fn.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/attributes.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/attributes" "/checkout/src/test/rustdoc/attributes.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 11: @has check failed
[01:23:53]  File does not exist 'foo/enum.Foo.html'
[01:23:53]  // @has foo/enum.Foo.html '//*[@class="docblock attributes"]' '#[repr(i64)]'
[01:23:53] 12: @has check failed
[01:23:53]  File does not exist 'foo/enum.Foo.html'
[01:23:53]  // @has foo/enum.Foo.html '//*[@class="docblock attributes"]' '#[must_use]'
[01:23:53] Encountered 2 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/attributes.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/auto-traits.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/auto-traits" "/checkout/src/test/rustdoc/auto-traits.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 9: @has check failed
[01:23:53]  File does not exist 'foo/trait.Foo.html'
[01:23:53]  // @has 'foo/trait.Foo.html' '//pre' 'pub unsafe auto trait Foo'
[01:23:53] 12: @has check failed
[01:23:53]  File does not exist 'foo/trait.Bar.html'
[01:23:53]  // @has 'foo/trait.Bar.html' '//pre' 'pub unsafe auto trait Bar'
[01:23:53] Encountered 2 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/auto-traits.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/blanket-reexport-item.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/blanket-reexport-item" "/checkout/src/test/rustdoc/blanket-reexport-item.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 3: @has check failed
[01:23:53]  File does not exist 'foo/struct.S.html'
[01:23:53]  // @has foo/struct.S.html '//h3[@id="impl-Into"]//code' 'impl<T, U> Into for T'
[01:23:53] Encountered 1 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/blanket-reexport-item.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/cap-lints.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/cap-lints" "/checkout/src/test/rustdoc/cap-lints.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 6: @has check failed
[01:23:53]  File does not exist 'cap_lints/struct.Foo.html'
[01:23:53]  // @has cap_lints/struct.Foo.html //pre '#[must_use]'
[01:23:53] Encountered 1 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/cap-lints.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/check-styled-link.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/check-styled-link" "/checkout/src/test/rustdoc/check-styled-link.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 5: @has check failed
[01:23:53]  File does not exist 'foo/struct.Bar.html'
[01:23:53]  // @has foo/struct.Bar.html '//a[@href="../foo/struct.Foo.html"]' 'Foo'
[01:23:53] Encountered 1 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/check-styled-link.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/const-doc.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/const-doc" "/checkout/src/test/rustdoc/const-doc.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 14: @has check failed
[01:23:53]  File does not exist 'const_doc/struct.ContentType.html'
[01:23:53]      // @has const_doc/struct.ContentType.html
[01:23:53] 15: @has check failed
[01:23:53]  File does not exist 'const_doc/struct.ContentType.html'
[01:23:53]      // @has  - '//*[@id="associatedconstant.Any"]' 'const Any: ContentType'
[01:23:53] Encountered 2 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/const-doc.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/const-fn.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/const-fn" "/checkout/src/test/rustdoc/const-fn.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 10: @has check failed
[01:23:53]  File does not exist 'foo/struct.Foo.html'
[01:23:53]  // @has foo/struct.Foo.html
[01:23:53] 11: @has check failed
[01:23:53]  File does not exist 'foo/struct.Foo.html'
[01:23:53]  // @has - '//*[@class="method"]' 'const fn new()'
[01:23:53] Encountered 2 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/const-fn.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/const.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/const" "/checkout/src/test/rustdoc/const.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 6: @has check failed
[01:23:53]  File does not exist 'const/struct.Foo.html'
[01:23:53]      // @has const/struct.Foo.html '//code[@id="new.v"]' 'const unsafe fn new'
[01:23:53] Encountered 1 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/const.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/default-trait-method-link.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/default-trait-method-link" "/checkout/src/test/rustdoc/default-trait-method-link.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 3: @has check failed
[01:23:53]  File does not exist 'foo/trait.Foo.html'
[01:23:53]  // @has foo/trait.Foo.html '//a[@href="../foo/trait.Foo.html#tymethod.req"]' 'req'
[01:23:53] 4: @has check failed
[01:23:53]  File does not exist 'foo/trait.Foo.html'
[01:23:53]  // @has foo/trait.Foo.html '//a[@href="../foo/trait.Foo.html#method.prov"]' 'prov'
[01:23:53] Encountered 2 errors
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] 
[01:23:53] thread '[rustdoc] rustdoc/default-trait-method-link.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3425:9
[01:23:53] 
[01:23:53] ---- [rustdoc] rustdoc/default_trait_method.rs stdout ----
[01:23:53] 
[01:23:53] error: htmldocck failed!
[01:23:53] status: exit code: 1
[01:23:53] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/default_trait_method" "/checkout/src/test/rustdoc/default_trait_method.rs"
[01:23:53] ------------------------------------------
[01:23:53] 
[01:23:53] ------------------------------------------
[01:23:53] stderr:
[01:23:53] stderr:
[01:23:53] ------------------------------------------
[01:23:53] 8: @has check failed
[01:23:53]  File does not exist 'default_trait_method/trait.Item.html'
[01:23:53]  // @has default_trait_method/trait.Item.html
[01:23:53] 9: @has check failed
[01:23:53]  File does not exist 'default_trait_method/trait.Item.html'
[01:23:53]  // @has - '//*[@id="method.foo"]' 'default fn foo()'
[01:23:53] 10: @has check failed
---
[01:23:53] test result: FAILED. 138 passed; 162 failed; 2 ignored; 0 measured; 0 filtered out
[01:23:53] 
[01:23:53] 
[01:23:53] 
[01:23:53] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "rustdoc" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:23:53] 
[01:23:53] 
[01:23:53] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:23:53] Build completed unsuccessfully in 0:20:04
---
travis_time:end:0d8df817:start=1554681373447968286,finish=1554681373453494109,duration=5525823
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0144524a
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:077c952b
travis_time:start:077c952b
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:020f11c0
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@retep998
Copy link
Member

retep998 commented Apr 8, 2019

At some point this will be changed to be enabled by default for Windows users?

@GuillaumeGomez
Copy link
Member Author

I hope so? I'd prefer something to detect the filesystem. But for now, there is still some work to be done in here.

Copy link
Member

@QuietMisdreavus QuietMisdreavus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having a hard time reading through this. What does it actually do when it encounters a name conflict? Where is that tracked? Right now i'm having to sift through a bunch of unrelated changes to even see what's going on.

&mut self,
krate: &clean::Crate,
) -> Result<(), Error> {
/*if !self.shared.case_insensitive {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the check that would make it bail (the only thing that reads the new case_insensitive parameter) is still commented out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point was to test it when generating std without having to change boostrap, I'll remove it once this PR is done.

/// Returns `true` if the `collapse-docs` pass was run on this crate.
pub fn was_collapsed(&self) -> bool {
self.passes.contains("collapse-docs")
}

/// Based on whether the `collapse-docs` pass was run, return either the `doc_value` or the
/// `collapsed_doc_value` of the given item.
pub fn maybe_collapsed_doc_value<'a>(&self, item: &'a clean::Item) -> Option<Cow<'a, str>> {
pub fn maybe_collapsed_doc_value<'b>(&self, item: &'b clean::Item) -> Option<Cow<'b, str>> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change the name of the lifetime parameter here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point I added a parameter with a lifetime to SharedContext, making necessary to make this change. It's completely useless now.

@@ -703,8 +731,34 @@ pub fn run(mut krate: clean::Crate,
cx.krate(krate)
}

fn url_to_path(url: &str, start_path: &str) -> Option<String> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a doc comment describing what this function is supposed to do? It took me too long to try to figure out what's happening here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

@@ -1254,8 +1316,11 @@ themePicker.onblur = handleThemeButtonsBlur;
Ok(())
}

fn render_sources(dst: &Path, scx: &mut SharedContext,
krate: clean::Crate) -> Result<clean::Crate, Error> {
fn render_sources<'a>(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this lifetime parameter was unnecessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely!

/// all sub-items which need to be rendered.
///
/// The rendering driver uses this closure to queue up more work.
fn item<F>(&mut self, item: clean::Item, all: &mut AllTypes, mut f: F,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you move this method? It makes it hard to read the PR, since git won't show me if you needed to change it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sorry, I was just going down and back between two functions and this one was in the middle so I moved it. Just like the rest, I'll put it "back" once done.

@@ -2452,14 +2605,15 @@ impl<'a> fmt::Display for Item<'a> {
}
}
write!(fmt, "<a class=\"{}\" href=''>{}</a>",
self.item.type_(), self.item.name.as_ref().unwrap())?;
self.item.type_(), self.item.name.as_ref().expect("name is unavailable 4"))?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is all this unrelated code being changed? It makes it hard to read the PR because of all this extra noise between the substantial additions. If you really want to add the unwrap/expect conversions to this PR, can you at least break it into its own commit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply because I had a failure and I couldn't find from where so to track it down, I replaced most unwrap calls with expect.

@@ -3101,7 +3277,7 @@ fn item_trait(
VisSpace(&it.visibility),
UnsafetySpace(t.unsafety),
if t.is_auto { "auto " } else { "" },
it.name.as_ref().unwrap(),
it.name.as_ref().expect("name unavailable 10"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's two "name unavailable 10" messages. (And i'm not a fan of having the separate numbered messages just to make them different - we can get the line number in the backtrace.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

containing_item: &clean::Item,
it: DefId,
what: AssocItemRender<'_>) -> fmt::Result {
fn render_assoc_items(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you run rustfmt on this, or did you manually change all these signatures? Please avoid including unrelated code style changes in the same commit as substantial changes - it inflates the line count and creates misleading blame messages.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function changed a few times following my needs and this is the result, nothing magical behind that. ;)

@ollie27
Copy link
Member

ollie27 commented Apr 14, 2019

cc #25879

@GuillaumeGomez
Copy link
Member Author

@QuietMisdreavus: But more globally, do you think this is the correct way to do this? Or should I try to put it into the Cache somehow (not sure if that's possible nor wanted) or in another part of the code?

@Dylan-DPC-zz
Copy link

ping from triage @QuietMisdreavus @GuillaumeGomez any updates on this?

@GuillaumeGomez
Copy link
Member Author

Still waiting for @QuietMisdreavus feedback. :)

@QuietMisdreavus
Copy link
Member

Does this also work for the redirect files, since those are grouped by namespace instead of just kind?

pub struct Foo;

pub enum FoO {}

@GuillaumeGomez The basic approach - generating a mapping of item paths to filename stems in case of conflict - is fine. However, my complaints about the PR being difficult to review still stand. The changes are sprawling, divided into commits that cannot be viewed on their own, offer no explanation of the overall approach or specific implementation details, and grouped in with unrelated (and in many cases unnecessary) changes. I can't offer comments on your approach if it takes all my energy to just pick apart what your PR is doing in the first place.

@GuillaumeGomez
Copy link
Member Author

Ok, I'll try to clean it up but considering the amount of changes, I think it'll be complicated in any case. I'll add comments though and write down a global explanation of what I have in mind.

@bors
Copy link
Contributor

bors commented Jun 22, 2019

☔ The latest upstream changes (presumably #62041) made this pull request unmergeable. Please resolve the merge conflicts.

@Mark-Simulacrum
Copy link
Member

I'm going to close this PR for the time being, it can be reopened once @GuillaumeGomez finishes rebasing and reworking the PR into a more reviewable state.

@avborhanian
Copy link
Contributor

Hey, would it be kosher for me to try to make the necessary changes to make it reviewable and open a new pull request with said changes?

@Mark-Simulacrum
Copy link
Member

I think so, yes, though I myself am currently uncertain as to the approach in general :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants