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

Keep code coloring in search results short text #68699

Conversation

GuillaumeGomez
Copy link
Member

Fixes #32040.

Screenshot from 2020-01-31 14-11-32

r? @kinnison

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, 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.
2020-01-31T13:26:02.0925227Z ========================== Starting Command Output ===========================
2020-01-31T13:26:02.0928293Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/45e31de6-b8b1-474b-88de-7515c1df7020.sh
2020-01-31T13:26:02.0928495Z 
2020-01-31T13:26:02.0932686Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-31T13:26:02.0938155Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68699/merge to s
2020-01-31T13:26:02.0939705Z Task         : Get sources
2020-01-31T13:26:02.0939733Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-31T13:26:02.0939761Z Version      : 1.0.0
2020-01-31T13:26:02.0939835Z Author       : Microsoft
---
2020-01-31T13:26:03.1718480Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-31T13:26:03.1728315Z ##[command]git config gc.auto 0
2020-01-31T13:26:03.1730567Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-31T13:26:03.1732426Z ##[command]git config --get-all http.proxy
2020-01-31T13:26:03.1739419Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68699/merge:refs/remotes/pull/68699/merge
---
2020-01-31T14:23:45.6329974Z .................................................................................................... 1700/9559
2020-01-31T14:23:50.4633091Z .................................................................................................... 1800/9559
2020-01-31T14:24:03.0591696Z .........................i.......................................................................... 1900/9559
2020-01-31T14:24:10.1427969Z .................................................................................................... 2000/9559
2020-01-31T14:24:24.5804082Z ...............iiiii................................................................................ 2100/9559
2020-01-31T14:24:34.3278172Z .................................................................................................... 2300/9559
2020-01-31T14:24:36.8528933Z .................................................................................................... 2400/9559
2020-01-31T14:24:41.8811932Z .................................................................................................... 2500/9559
2020-01-31T14:25:02.1892237Z .................................................................................................... 2600/9559
---
2020-01-31T14:27:32.6907269Z .................................................................................................... 4800/9559
2020-01-31T14:27:37.7534009Z ..........................................................i...............i......................... 4900/9559
2020-01-31T14:27:45.4769002Z .................................................................................................... 5000/9559
2020-01-31T14:27:53.4470976Z .................................................................................................... 5100/9559
2020-01-31T14:27:58.1432477Z .i.................................................................................................. 5200/9559
2020-01-31T14:28:08.6431989Z ..........................................................................ii.ii........i...i........ 5300/9559
2020-01-31T14:28:16.9834399Z ............i....................................................................................... 5500/9559
2020-01-31T14:28:27.0088440Z .................................................................................................... 5600/9559
2020-01-31T14:28:33.2915744Z .............................................................i...................................... 5700/9559
2020-01-31T14:28:40.1866310Z .................................................................................................... 5800/9559
2020-01-31T14:28:40.1866310Z .................................................................................................... 5800/9559
2020-01-31T14:28:47.9558532Z .................................................................................................... 5900/9559
2020-01-31T14:28:56.7269989Z ....................................................ii...i..ii...........i.......................... 6000/9559
2020-01-31T14:29:18.6421078Z .................................................................................................... 6200/9559
2020-01-31T14:29:26.3183854Z .................................................................................................... 6300/9559
2020-01-31T14:29:26.3183854Z .................................................................................................... 6300/9559
2020-01-31T14:29:31.7709343Z ................................................................................i..ii............... 6400/9559
2020-01-31T14:29:57.7737976Z .................................................................................................... 6600/9559
2020-01-31T14:30:03.1013314Z ........................................................i........................................... 6700/9559
2020-01-31T14:30:05.3142704Z .................................................................................................... 6800/9559
2020-01-31T14:30:07.5980256Z ........................................................i........................................... 6900/9559
---
2020-01-31T14:31:47.0739990Z .................................................................................................... 7600/9559
2020-01-31T14:31:52.3560532Z .................................................................................................... 7700/9559
2020-01-31T14:31:58.8624807Z .................................................................................................... 7800/9559
2020-01-31T14:32:09.4485946Z .................................................................................................... 7900/9559
2020-01-31T14:32:15.3806411Z ............iiiiiii.i............................................................................... 8000/9559
2020-01-31T14:32:29.4255106Z .................................................................................................... 8200/9559
2020-01-31T14:32:39.8168022Z .................................................................................................... 8300/9559
2020-01-31T14:32:52.9036940Z .................................................................................................... 8400/9559
2020-01-31T14:32:59.5272151Z .................................................................................................... 8500/9559
---
2020-01-31T14:35:18.3162761Z  finished in 7.075
2020-01-31T14:35:18.3302281Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-31T14:35:18.5194521Z 
2020-01-31T14:35:18.5194783Z running 169 tests
2020-01-31T14:35:21.5539534Z iiii......i........ii..iiii...i....i...........i............i..i..................i....i............ 100/169
2020-01-31T14:35:23.8193028Z i.i.i...iii..iiiiiiiiii.......................iii............ii......
2020-01-31T14:35:23.8195006Z 
2020-01-31T14:35:23.8201127Z  finished in 5.490
2020-01-31T14:35:23.8414785Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-31T14:35:24.0200957Z 
---
2020-01-31T14:35:25.9726932Z  finished in 2.131
2020-01-31T14:35:25.9909219Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-31T14:35:26.1536023Z 
2020-01-31T14:35:26.1537000Z running 9 tests
2020-01-31T14:35:26.1538025Z iiiiiiiii
2020-01-31T14:35:26.1539044Z 
2020-01-31T14:35:26.1551311Z  finished in 0.163
2020-01-31T14:35:26.1732332Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-31T14:35:26.3619893Z 
---
2020-01-31T14:35:46.3227832Z  finished in 20.149
2020-01-31T14:35:46.3445008Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-31T14:35:46.5264293Z 
2020-01-31T14:35:46.5264614Z running 116 tests
2020-01-31T14:36:00.0625033Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii..........i.....i..i.......ii.i.ii. 100/116
2020-01-31T14:36:02.0763590Z ....iiii.....ii.
2020-01-31T14:36:02.0766653Z 
2020-01-31T14:36:02.0771372Z  finished in 15.732
2020-01-31T14:36:02.0777587Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-31T14:36:02.0778452Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-01-31T14:49:39.1199975Z 
2020-01-31T14:49:39.1206243Z    Doc-tests core
2020-01-31T14:49:43.7973248Z 
2020-01-31T14:49:43.8027513Z running 2471 tests
2020-01-31T14:49:52.7632782Z ......iiiii......................................................................................... 100/2471
2020-01-31T14:50:01.5567940Z ..................................................................................ii................ 200/2471
2020-01-31T14:50:22.1994761Z .................i.................................................................................. 400/2471
2020-01-31T14:50:22.1994761Z .................i.................................................................................. 400/2471
2020-01-31T14:50:31.7548651Z ......................................................................i..i..................iiii.... 500/2471
2020-01-31T14:50:47.8028451Z .................................................................................................... 700/2471
2020-01-31T14:50:56.3758705Z .................................................................................................... 800/2471
2020-01-31T14:51:04.6096802Z .................................................................................................... 900/2471
2020-01-31T14:51:13.4004852Z .................................................................................................... 1000/2471
---
2020-01-31T14:54:55.1735147Z 
2020-01-31T14:54:55.1735386Z running 1007 tests
2020-01-31T14:55:13.3850157Z i................................................................................................... 100/1007
2020-01-31T14:55:23.1640772Z .................................................................................................... 200/1007
2020-01-31T14:55:29.8541311Z ..................iii......i......i...i......i...................................................... 300/1007
2020-01-31T14:55:34.8504335Z .................................................................................................... 400/1007
2020-01-31T14:55:41.6526968Z ..........................................i..i.....................................ii............... 500/1007
2020-01-31T14:55:53.9529957Z .................................................................................................... 700/1007
2020-01-31T14:55:53.9529957Z .................................................................................................... 700/1007
2020-01-31T14:56:00.4808379Z .................................iiii............................................................... 800/1007
2020-01-31T14:56:14.7207243Z .................................................................................................... 900/1007
2020-01-31T14:56:21.5503698Z .......................................................iiii......................................... 1000/1007
2020-01-31T14:56:21.8652219Z test result: ok. 987 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-01-31T14:56:21.8652427Z 
2020-01-31T14:56:21.8760638Z  finished in 167.837
2020-01-31T14:56:21.8773173Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-01-31T15:05:21.0026822Z running 44 tests
2020-01-31T15:05:21.0120193Z ...........F................................
2020-01-31T15:05:21.0120316Z failures:
2020-01-31T15:05:21.0120348Z 
2020-01-31T15:05:21.0121053Z ---- html::markdown::tests::test_plain_summary_line stdout ----
2020-01-31T15:05:21.0121904Z thread 'html::markdown::tests::test_plain_summary_line' panicked at 'assertion failed: `(left == right)`
2020-01-31T15:05:21.0122001Z   left: `"code <code>let x = i32;</code> ..."`,
2020-01-31T15:05:21.0122331Z  right: `"code `let x = i32;` ..."`: original: code `let x = i32;` ...', src/librustdoc/html/markdown/tests.rs:215:9
2020-01-31T15:05:21.0122688Z 
2020-01-31T15:05:21.0122714Z 
2020-01-31T15:05:21.0122753Z failures:
2020-01-31T15:05:21.0122799Z     html::markdown::tests::test_plain_summary_line
2020-01-31T15:05:21.0122799Z     html::markdown::tests::test_plain_summary_line
2020-01-31T15:05:21.0122848Z 
2020-01-31T15:05:21.0122904Z test result: FAILED. 43 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
2020-01-31T15:05:21.0122936Z 
2020-01-31T15:05:21.0153555Z error: test failed, to rerun pass '-p rustdoc --lib'
2020-01-31T15:05:21.0166635Z 
2020-01-31T15:05:21.0166635Z 
2020-01-31T15:05:21.0167417Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/rustdoc/Cargo.toml" "-p" "rustdoc:0.0.0" "--" "--quiet"
2020-01-31T15:05:21.0167580Z 
2020-01-31T15:05:21.0167608Z 
2020-01-31T15:05:21.0179771Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-01-31T15:05:21.0179847Z Build completed unsuccessfully in 1:32:57
2020-01-31T15:05:21.0179847Z Build completed unsuccessfully in 1:32:57
2020-01-31T15:05:21.0238550Z == clock drift check ==
2020-01-31T15:05:21.0257265Z   local time: Fri Jan 31 15:05:21 UTC 2020
2020-01-31T15:05:21.1884616Z   network time: Fri, 31 Jan 2020 15:05:21 GMT
2020-01-31T15:05:21.1885179Z == end clock drift check ==
2020-01-31T15:05:22.1740102Z 
2020-01-31T15:05:22.1846449Z ##[error]Bash exited with code '1'.
2020-01-31T15:05:22.1859841Z ##[section]Finishing: Run build
2020-01-31T15:05:22.1886810Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68699/merge to s
2020-01-31T15:05:22.1888900Z Task         : Get sources
2020-01-31T15:05:22.1888968Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-31T15:05:22.1889018Z Version      : 1.0.0
2020-01-31T15:05:22.1889063Z Author       : Microsoft
2020-01-31T15:05:22.1889063Z Author       : Microsoft
2020-01-31T15:05:22.1889131Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-01-31T15:05:22.1889187Z ==============================================================================
2020-01-31T15:05:22.6127691Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-01-31T15:05:22.6173515Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/68699/merge to s
2020-01-31T15:05:22.6282896Z Cleaning up task key
2020-01-31T15:05:22.6283650Z Start cleaning up orphan processes.
2020-01-31T15:05:22.6386169Z Terminate orphan process: pid (5303) (python)
2020-01-31T15:05:22.6590923Z ##[section]Finishing: Finalize Job

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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, 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.
2020-01-31T15:54:07.6231787Z ========================== Starting Command Output ===========================
2020-01-31T15:54:07.6235227Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/4e9d0f39-4a10-4df5-aaf9-16b8bb005343.sh
2020-01-31T15:54:07.6235336Z 
2020-01-31T15:54:07.6238375Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-31T15:54:07.6244955Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68699/merge to s
2020-01-31T15:54:07.6246844Z Task         : Get sources
2020-01-31T15:54:07.6246881Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-31T15:54:07.6246917Z Version      : 1.0.0
2020-01-31T15:54:07.6246954Z Author       : Microsoft
---
2020-01-31T15:54:08.7072211Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-31T15:54:08.7174844Z ##[command]git config gc.auto 0
2020-01-31T15:54:08.7231918Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-31T15:54:08.7284825Z ##[command]git config --get-all http.proxy
2020-01-31T15:54:08.7450955Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68699/merge:refs/remotes/pull/68699/merge
---
2020-01-31T16:49:18.2349980Z .................................................................................................... 1700/9559
2020-01-31T16:49:23.4470933Z .................................................................................................... 1800/9559
2020-01-31T16:49:36.2895994Z .........................i.......................................................................... 1900/9559
2020-01-31T16:49:43.4447652Z .................................................................................................... 2000/9559
2020-01-31T16:49:57.6850073Z ...............iiiii................................................................................ 2100/9559
2020-01-31T16:50:07.5325573Z .................................................................................................... 2300/9559
2020-01-31T16:50:09.9892215Z .................................................................................................... 2400/9559
2020-01-31T16:50:15.1903156Z .................................................................................................... 2500/9559
2020-01-31T16:50:36.0981942Z .................................................................................................... 2600/9559
---
2020-01-31T16:53:08.5973012Z .................................................................................................... 4800/9559
2020-01-31T16:53:13.4574051Z ..........................................................i...............i......................... 4900/9559
2020-01-31T16:53:21.0125649Z .................................................................................................... 5000/9559
2020-01-31T16:53:28.7509311Z .................................................................................................... 5100/9559
2020-01-31T16:53:33.5137376Z .i.................................................................................................. 5200/9559
2020-01-31T16:53:44.2191777Z ..........................................................................ii.ii........i...i........ 5300/9559
2020-01-31T16:53:52.5631868Z ............i....................................................................................... 5500/9559
2020-01-31T16:54:02.4090627Z .................................................................................................... 5600/9559
2020-01-31T16:54:08.7114159Z .............................................................i...................................... 5700/9559
2020-01-31T16:54:15.7163909Z .................................................................................................... 5800/9559
2020-01-31T16:54:15.7163909Z .................................................................................................... 5800/9559
2020-01-31T16:54:23.6505678Z .................................................................................................... 5900/9559
2020-01-31T16:54:32.3974298Z ....................................................ii...i...ii..........i.......................... 6000/9559
2020-01-31T16:54:53.9360359Z .................................................................................................... 6200/9559
2020-01-31T16:55:01.3554287Z .................................................................................................... 6300/9559
2020-01-31T16:55:01.3554287Z .................................................................................................... 6300/9559
2020-01-31T16:55:09.5255006Z ................................................................................i..ii............... 6400/9559
2020-01-31T16:55:35.7478780Z .................................................................................................... 6600/9559
2020-01-31T16:55:41.1871518Z ........................................................i........................................... 6700/9559
2020-01-31T16:55:43.3300234Z .................................................................................................... 6800/9559
2020-01-31T16:55:45.6228521Z ........................................................i........................................... 6900/9559
---
2020-01-31T16:57:24.3570106Z .................................................................................................... 7600/9559
2020-01-31T16:57:29.6724060Z .................................................................................................... 7700/9559
2020-01-31T16:57:36.2225175Z .................................................................................................... 7800/9559
2020-01-31T16:57:46.7206797Z .................................................................................................... 7900/9559
2020-01-31T16:57:52.9176444Z ............iiiiiii.i............................................................................... 8000/9559
2020-01-31T16:58:06.8859513Z .................................................................................................... 8200/9559
2020-01-31T16:58:17.1910703Z .................................................................................................... 8300/9559
2020-01-31T16:58:30.1539437Z .................................................................................................... 8400/9559
2020-01-31T16:58:36.7325304Z .................................................................................................... 8500/9559
---
2020-01-31T17:00:56.3426185Z  finished in 7.432
2020-01-31T17:00:56.3644350Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-31T17:00:56.5520544Z 
2020-01-31T17:00:56.5521548Z running 169 tests
2020-01-31T17:00:59.6173431Z iiii......i........ii..iiii...i....i...........i............i..i..................i....i............ 100/169
2020-01-31T17:01:01.7996283Z i.i.i...iii..iiiiiiiiii.......................iii............ii......
2020-01-31T17:01:01.7998465Z 
2020-01-31T17:01:01.7999043Z  finished in 5.435
2020-01-31T17:01:01.8205596Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-31T17:01:01.9913558Z 
---
2020-01-31T17:01:03.9675608Z  finished in 2.147
2020-01-31T17:01:03.9884877Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-31T17:01:04.1660147Z 
2020-01-31T17:01:04.1661520Z running 9 tests
2020-01-31T17:01:04.1663005Z iiiiiiiii
2020-01-31T17:01:04.1663573Z 
2020-01-31T17:01:04.1665663Z  finished in 0.177
2020-01-31T17:01:04.1876395Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-31T17:01:04.3375708Z 
---
2020-01-31T17:01:24.9597845Z  finished in 20.772
2020-01-31T17:01:24.9792354Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-31T17:01:25.1323702Z 
2020-01-31T17:01:25.1323946Z running 116 tests
2020-01-31T17:01:38.3733157Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii..........i.....i..i.......ii.i.ii. 100/116
2020-01-31T17:01:40.1796145Z ....iiii.....ii.
2020-01-31T17:01:40.1798628Z 
2020-01-31T17:01:40.1805652Z  finished in 15.201
2020-01-31T17:01:40.1810011Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-31T17:01:40.1811499Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-01-31T17:14:43.7398135Z 
2020-01-31T17:14:43.7399507Z    Doc-tests core
2020-01-31T17:14:48.6051101Z 
2020-01-31T17:14:48.6061621Z running 2471 tests
2020-01-31T17:14:57.5298885Z ......iiiii......................................................................................... 100/2471
2020-01-31T17:15:06.4307893Z ..................................................................................ii................ 200/2471
2020-01-31T17:15:27.7747288Z .................i.................................................................................. 400/2471
2020-01-31T17:15:27.7747288Z .................i.................................................................................. 400/2471
2020-01-31T17:15:37.4137443Z ......................................................................i..i..................iiii.... 500/2471
2020-01-31T17:15:53.6759979Z .................................................................................................... 700/2471
2020-01-31T17:16:02.0874970Z .................................................................................................... 800/2471
2020-01-31T17:16:10.4441791Z .................................................................................................... 900/2471
2020-01-31T17:16:19.1157499Z .................................................................................................... 1000/2471
---
2020-01-31T17:19:54.5030725Z 
2020-01-31T17:19:54.5031185Z running 1007 tests
2020-01-31T17:20:12.2959155Z i................................................................................................... 100/1007
2020-01-31T17:20:22.0822958Z .................................................................................................... 200/1007
2020-01-31T17:20:29.1048537Z ..................iii......i......i...i......i...................................................... 300/1007
2020-01-31T17:20:34.1397780Z .................................................................................................... 400/1007
2020-01-31T17:20:40.8503883Z ..........................................i..i.....................................ii............... 500/1007
2020-01-31T17:20:53.3898110Z .................................................................................................... 700/1007
2020-01-31T17:20:53.3898110Z .................................................................................................... 700/1007
2020-01-31T17:20:59.7644427Z .................................iiii............................................................... 800/1007
2020-01-31T17:21:13.6888292Z .................................................................................................... 900/1007
2020-01-31T17:21:20.2577141Z .......................................................iiii......................................... 1000/1007
2020-01-31T17:21:20.5378727Z test result: ok. 987 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-01-31T17:21:20.5379004Z 
2020-01-31T17:21:20.5484510Z  finished in 168.236
2020-01-31T17:21:20.5496977Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-01-31T17:29:49.0466567Z running 44 tests
2020-01-31T17:29:49.0549225Z ...........F................................
2020-01-31T17:29:49.0549301Z failures:
2020-01-31T17:29:49.0561793Z 
2020-01-31T17:29:49.0562903Z ---- html::markdown::tests::test_plain_summary_line stdout ----
2020-01-31T17:29:49.0563300Z thread 'html::markdown::tests::test_plain_summary_line' panicked at 'assertion failed: `(left == right)`
2020-01-31T17:29:49.0563585Z   left: `"type <code>Type<\'static></code> ..."`,
2020-01-31T17:29:49.0563969Z  right: `"type <code>Type<\'static><code> ..."`: original: type `Type<'static>` ...', src/librustdoc/html/markdown/tests.rs:215:9
2020-01-31T17:29:49.0564299Z 
2020-01-31T17:29:49.0564347Z 
2020-01-31T17:29:49.0564391Z failures:
2020-01-31T17:29:49.0564443Z     html::markdown::tests::test_plain_summary_line
2020-01-31T17:29:49.0564443Z     html::markdown::tests::test_plain_summary_line
2020-01-31T17:29:49.0564475Z 
2020-01-31T17:29:49.0564553Z test result: FAILED. 43 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
2020-01-31T17:29:49.0564587Z 
2020-01-31T17:29:49.0579608Z error: test failed, to rerun pass '-p rustdoc --lib'
2020-01-31T17:29:49.0601037Z 
2020-01-31T17:29:49.0601037Z 
2020-01-31T17:29:49.0602085Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/rustdoc/Cargo.toml" "-p" "rustdoc:0.0.0" "--" "--quiet"
2020-01-31T17:29:49.0602831Z 
2020-01-31T17:29:49.0602970Z 
2020-01-31T17:29:49.0607962Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-01-31T17:29:49.0608481Z Build completed unsuccessfully in 1:29:55
2020-01-31T17:29:49.0608481Z Build completed unsuccessfully in 1:29:55
2020-01-31T17:29:49.0666165Z == clock drift check ==
2020-01-31T17:29:49.0681644Z   local time: Fri Jan 31 17:29:49 UTC 2020
2020-01-31T17:29:49.6246814Z   network time: Fri, 31 Jan 2020 17:29:49 GMT
2020-01-31T17:29:49.6247879Z == end clock drift check ==
2020-01-31T17:29:50.3336796Z 
2020-01-31T17:29:50.3487572Z ##[error]Bash exited with code '1'.
2020-01-31T17:29:50.3500569Z ##[section]Finishing: Run build
2020-01-31T17:29:50.3536011Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68699/merge to s
2020-01-31T17:29:50.3538157Z Task         : Get sources
2020-01-31T17:29:50.3538224Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-31T17:29:50.3538289Z Version      : 1.0.0
2020-01-31T17:29:50.3538331Z Author       : Microsoft
2020-01-31T17:29:50.3538331Z Author       : Microsoft
2020-01-31T17:29:50.3538377Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-01-31T17:29:50.3538429Z ==============================================================================
2020-01-31T17:29:50.8336048Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-01-31T17:29:50.8379710Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/68699/merge to s
2020-01-31T17:29:50.8527634Z Cleaning up task key
2020-01-31T17:29:50.8528495Z Start cleaning up orphan processes.
2020-01-31T17:29:50.8676814Z Terminate orphan process: pid (3789) (python)
2020-01-31T17:29:50.8936860Z ##[section]Finishing: Finalize Job

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)

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

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

There's a test case to fix, and a few ideas/points in comments.

src/librustdoc/html/markdown/tests.rs Outdated Show resolved Hide resolved
src/librustdoc/html/static/main.js Outdated Show resolved Hide resolved
src/librustdoc/html/static/main.js Outdated Show resolved Hide resolved
@kinnison kinnison added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 1, 2020
@GuillaumeGomez GuillaumeGomez force-pushed the keep-code-color-search-result branch from 9e7808f to c95068f Compare February 1, 2020 20:25
@GuillaumeGomez
Copy link
Member Author

Updated!

@GuillaumeGomez GuillaumeGomez added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 1, 2020
@kinnison
Copy link
Contributor

kinnison commented Feb 1, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Feb 1, 2020

📌 Commit c95068f5035c6cecb90ba5a555219d751249739c has been approved by kinnison

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 1, 2020
@ollie27
Copy link
Member

ollie27 commented Feb 1, 2020

@bors r-

The plain_summary_line function is used for more than just the search index. For example it's used for the sidebar titles so this PR results in:
image

Additionally if the summaries for the search index are be rendered to HTML then the text will need to be HTML escaped. HTML rendering should use pulldown_cmark::html::push_html because that already handles HTML escaping along with supporting more than just the <code> tag.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 1, 2020
@GuillaumeGomez
Copy link
Member Author

@ollie27 Great catch! We really need the front-end checks to come back...

cc @pietroalbini :)

@GuillaumeGomez
Copy link
Member Author

@ollie27 I fixed the html being added into the titles. However, I don't think we ever use the search index content directly. Do you have a location in mind where it would be the case? Because otherwise, it'll greatly increase the search index size. And I don't really want to put a markdown converter in the front end...

@ollie27
Copy link
Member

ollie27 commented Feb 14, 2020

However, I don't think we ever use the search index content directly. Do you have a location in mind where it would be the case? Because otherwise, it'll greatly increase the search index size.

@GuillaumeGomez I don't know what you mean.

The search index summaries and the sidebar titles are generated separately. Currently they both use the plain_summary_line function. If you want to include HTML in the search index then you need to add a new function specifically for that rather than modifying plain_summary_line.

@bors
Copy link
Contributor

bors commented Feb 15, 2020

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

@GuillaumeGomez
Copy link
Member Author

@ollie27 Sorry, I didn't write that in a very understandable way... To make it simple: with the current version, is this issue fixed?

@ollie27
Copy link
Member

ollie27 commented Feb 15, 2020

To make it simple: with the current version, is this issue fixed?

No, you appear to be trying to treat a symptom rather than the cause. The issue with this PR is that plain_summary_line is no longer producing plain text but (malformed) HTML. As I've said you need to create a new function to render the HTML summaries for the search index and leave plain_summary_line alone.

@GuillaumeGomez
Copy link
Member Author

Ok!

@joelpalmer
Copy link

Triaged

@joelpalmer joelpalmer added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 23, 2020
@joelpalmer joelpalmer added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 2, 2020
@GuillaumeGomez GuillaumeGomez force-pushed the keep-code-color-search-result branch from 464c3e1 to d57901d Compare April 25, 2020 18:37
@GuillaumeGomez
Copy link
Member Author

I went for the simplest solution (and I think the best too): I only perform this change on the front-end side. Is it good for you too @ollie27 ?

@kinnison kinnison dismissed their stale review April 26, 2020 19:49

Obsolete

@ollie27
Copy link
Member

ollie27 commented May 3, 2020

I went for the simplest solution (and I think the best too): I only perform this change on the front-end side. Is it good for you too @ollie27 ?

This will treat any backticks as though they are surrounding code spans but that's not always the case.

@GuillaumeGomez
Copy link
Member Author

Do you have an example in mind? That'd make the testing simpler.

@ollie27
Copy link
Member

ollie27 commented May 9, 2020

Some examples I came up with:

/// foo `this is a code span` bar \`this isn't\` baz
pub struct Foo;

/// foo `` this is a code span containing `backticks` `` bar
pub struct Bar;

@GuillaumeGomez
Copy link
Member Author

So I have to skip if it's "\`" and handle multiple backticks. Makes sense.

@ollie27
Copy link
Member

ollie27 commented May 12, 2020

So I have to skip if it's "`" and handle multiple backticks. Makes sense.

No. The summaries stored in the search index don't contain that information. For:

/// foo `this is a code span` bar \`this isn't\` baz
pub struct Foo;

the search index contains:

foo `this is a code span` bar `this isn't` baz

There is no way in JavaScript to know which backticks meant codeblocks and which didn't.

As I've said, to do this right the summaries need to be rendered and stored in the search index as HTML.

@@ -1424,6 +1424,17 @@ function getSearchElement() {
return tmp;
}

function colorCode(s) {
var parts = s.split("`");
Copy link
Member

Choose a reason for hiding this comment

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

This seems extremely fragile. We should be using the builtin markdown renderer for this

@ollie27 ollie27 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jul 24, 2020
@Dylan-DPC-zz
Copy link

r? @jyn514

@rust-highfive rust-highfive assigned jyn514 and unassigned kinnison Aug 19, 2020
@jyn514
Copy link
Member

jyn514 commented Aug 19, 2020

I agree with @Manishearth and @ollie27. The way forward here is to separate plain_summary_line into two functions: one for search results and one for sidebar titles. Trying to parse markdown in JavaScript sounds like a really bad idea - that's what pulldown is for.

@GuillaumeGomez
Copy link
Member Author

But then we'll make the search index grows, which I'm trying to avoid. However I agree that doing it on the JS side doesn't look so good. So I really don't know here...

@Manishearth
Copy link
Member

I don't think they will grow much here

@GuillaumeGomez
Copy link
Member Author

Another issue is for links: do we want to allow them or not? If they're relative, it's not going to have the expected output, so I guess we'll need to to remove the links there too.

@Manishearth
Copy link
Member

Yes, strip links

@jyn514
Copy link
Member

jyn514 commented Sep 11, 2020

Marking this as waiting on author since it doesn't require frontend tests to fix.

@jyn514 jyn514 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Sep 11, 2020
@camelid
Copy link
Member

camelid commented Sep 15, 2020

So is the plan to go with rendering Markdown to HTML using pulldown?

@GuillaumeGomez
Copy link
Member Author

Yes.

@crlf0710 crlf0710 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 8, 2020
@camelid
Copy link
Member

camelid commented Oct 30, 2020

Closing in favor of #77686.

@camelid camelid closed this Oct 30, 2020
@GuillaumeGomez GuillaumeGomez deleted the keep-code-color-search-result branch August 19, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

Rustdoc search results ignore markdown formatting