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

Do not emit JSON dumps of diagnostic codes #63721

Merged
merged 2 commits into from
Aug 21, 2019

Conversation

Mark-Simulacrum
Copy link
Member

This decouples the error index generator from libsyntax for the most part (though it still depends on librustdoc for the markdown parsing and generation).

Fixes #34588

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 19, 2019
@Mark-Simulacrum
Copy link
Member Author

Hm, let's try r? @matthewjasper perhaps? Mostly this is just shuffling some things around so should be a pretty open review for anyone to take.

@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (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.
2019-08-19T22:46:00.4366122Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-19T22:46:00.4541599Z ##[command]git config gc.auto 0
2019-08-19T22:46:00.4619328Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-19T22:46:00.4672517Z ##[command]git config --get-all http.proxy
2019-08-19T22:46:00.4795566Z ##[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/63721/merge:refs/remotes/pull/63721/merge
---
2019-08-19T22:46:36.0131590Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-19T22:46:36.0131638Z 
2019-08-19T22:46:36.0131855Z   git checkout -b <new-branch-name>
2019-08-19T22:46:36.0131884Z 
2019-08-19T22:46:36.0131932Z HEAD is now at ef10896ea Merge ffec016917a68265fbe7c39ab9a51d280a28c689 into 29a54035c77cb2ba7ea2c24b2437760d0495a2c8
2019-08-19T22:46:36.0260860Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-19T22:46:36.0263781Z ==============================================================================
2019-08-19T22:46:36.0263840Z Task         : Bash
2019-08-19T22:46:36.0263885Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-19T22:54:08.9220951Z    Compiling rustc_macros v0.1.0 (/checkout/src/librustc_macros)
2019-08-19T22:54:17.6938323Z     Checking syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
2019-08-19T22:54:19.1157062Z     Checking rustc_errors v0.0.0 (/checkout/src/librustc_errors)
2019-08-19T22:54:20.3234086Z     Checking fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2019-08-19T22:54:22.7409519Z thread 'rustc' panicked at 'env var `RUSTC_ERROR_METADATA_DST` isn't set', src/libcore/option.rs:1166:5
2019-08-19T22:54:22.7677696Z 
2019-08-19T22:54:22.7679113Z error: internal compiler error: unexpected panic
2019-08-19T22:54:22.7681090Z 
2019-08-19T22:54:22.7684080Z note: the compiler unexpectedly panicked. this is a bug.
2019-08-19T22:54:22.7684080Z note: the compiler unexpectedly panicked. this is a bug.
2019-08-19T22:54:22.7684292Z 
2019-08-19T22:54:22.7685407Z note: we would appreciate a bug report: ***/blob/master/CONTRIBUTING.md#bug-reports
2019-08-19T22:54:22.7685653Z 
2019-08-19T22:54:22.7686429Z note: rustc 1.38.0-beta.1 (e450539c2 2019-08-13) running on x86_64-unknown-linux-gnu
2019-08-19T22:54:22.7686696Z 
2019-08-19T22:54:22.7687350Z note: compiler flags: -Z binary-dep-depinfo -Z unstable-options -Z external-macro-backtrace -Z force-unstable-if-unmarked -C opt-level=2 -C debuginfo=0 -C prefer-dynamic -C debug-assertions=n -C link-args=-Wl,-rpath,$ORIGIN/../lib --crate-type lib
2019-08-19T22:54:22.7687548Z 
2019-08-19T22:54:22.7687763Z note: some of the compiler flags provided by cargo are hidden
2019-08-19T22:54:22.7787286Z error: Could not compile `syntax`.
2019-08-19T22:54:22.7787591Z 
2019-08-19T22:54:22.7788058Z To learn more, run the command again with --verbose.
2019-08-19T22:54:22.7816788Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
2019-08-19T22:54:22.7816788Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
2019-08-19T22:54:22.7817348Z expected success, got: exit code: 101
2019-08-19T22:54:22.7820062Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
2019-08-19T22:54:22.7820318Z Build completed unsuccessfully in 0:04:48
2019-08-19T22:54:22.7874426Z == clock drift check ==
2019-08-19T22:54:22.7890107Z   local time: Mon Aug 19 22:54:22 UTC 2019
2019-08-19T22:54:23.0655575Z   network time: Mon, 19 Aug 2019 22:54:23 GMT
2019-08-19T22:54:23.0659635Z == end clock drift check ==
2019-08-19T22:54:24.1997859Z ##[error]Bash exited with code '1'.
2019-08-19T22:54:24.2079482Z ##[section]Starting: Checkout
2019-08-19T22:54:24.2083971Z ==============================================================================
2019-08-19T22:54:24.2084041Z Task         : Get sources
2019-08-19T22:54:24.2084112Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@Mark-Simulacrum
Copy link
Member Author

Turns out stage 0 was also emitting these so it'll need RUSTC_ERROR_METADATA_DST for a cycle probably.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (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.
2019-08-19T23:25:39.4104776Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-19T23:25:39.4291547Z ##[command]git config gc.auto 0
2019-08-19T23:25:39.4362687Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-19T23:25:39.4417551Z ##[command]git config --get-all http.proxy
2019-08-19T23:25:39.4556994Z ##[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/63721/merge:refs/remotes/pull/63721/merge
---
2019-08-19T23:26:13.4258772Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-19T23:26:13.4258802Z 
2019-08-19T23:26:13.4259024Z   git checkout -b <new-branch-name>
2019-08-19T23:26:13.4259053Z 
2019-08-19T23:26:13.4259102Z HEAD is now at b5f68c93b Merge 755c8683815eb17d2b79611b304fd67d76ef56b8 into 29a54035c77cb2ba7ea2c24b2437760d0495a2c8
2019-08-19T23:26:13.4409662Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-19T23:26:13.4412438Z ==============================================================================
2019-08-19T23:26:13.4412484Z Task         : Bash
2019-08-19T23:26:13.4412519Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-20T00:25:17.1996376Z .................................................................................................... 1500/8929
2019-08-20T00:25:22.5185585Z .................................................................................................... 1600/8929
2019-08-20T00:25:35.1132968Z .................................i...............i.................................................. 1700/8929
2019-08-20T00:25:42.5148339Z .................................................................................................... 1800/8929
2019-08-20T00:25:56.1664316Z .........................iiiii...................................................................... 1900/8929
2019-08-20T00:26:06.0858097Z .................................................................................................... 2100/8929
2019-08-20T00:26:08.5050750Z .................................................................................................... 2200/8929
2019-08-20T00:26:13.0166768Z .................................................................................................... 2300/8929
2019-08-20T00:26:19.3440999Z .................................................................................................... 2400/8929
---
2019-08-20T00:29:02.4172890Z .................................................................................................... 4600/8929
2019-08-20T00:29:09.1455193Z .........i...............i.......................................................................... 4700/8929
2019-08-20T00:29:19.7077920Z .................................................................................................... 4800/8929
2019-08-20T00:29:25.3856604Z .................................................................................................... 4900/8929
2019-08-20T00:29:36.2838094Z ..........................................................................................ii.ii..... 5000/8929
2019-08-20T00:29:45.3209635Z .................................................................................................... 5200/8929
2019-08-20T00:29:54.5530078Z .................................................................................................... 5300/8929
2019-08-20T00:30:01.0049499Z ..............................................i..................................................... 5400/8929
2019-08-20T00:30:07.5100500Z .................................................................................................... 5500/8929
2019-08-20T00:30:07.5100500Z .................................................................................................... 5500/8929
2019-08-20T00:30:17.5022885Z .................................................................................................... 5600/8929
2019-08-20T00:30:29.0934421Z .......................................ii...i..ii...........i....................................... 5700/8929
2019-08-20T00:30:45.6058700Z .................................................................................................... 5900/8929
2019-08-20T00:30:50.2303076Z .................................................................................................... 6000/8929
2019-08-20T00:30:50.2303076Z .................................................................................................... 6000/8929
2019-08-20T00:31:02.4896608Z ........................................i..ii....................................................... 6100/8929
2019-08-20T00:31:22.7874388Z ..................................................................................i................. 6300/8929
2019-08-20T00:31:24.9710167Z .................................................................................................... 6400/8929
2019-08-20T00:31:27.2211372Z ......................................................i............................................. 6500/8929
2019-08-20T00:31:30.2749572Z .................................................................................................... 6600/8929
---
2019-08-20T00:32:26.8910276Z .................................................................................................... 7200/8929
2019-08-20T00:32:33.3627766Z .................................................................................................... 7300/8929
2019-08-20T00:32:42.8565061Z .................................................................................................... 7400/8929
2019-08-20T00:32:51.8366201Z .................................................................................................... 7500/8929
2019-08-20T00:32:58.1005699Z ..ii......i......................................................................................... 7600/8929
2019-08-20T00:33:17.6900149Z .................................................................................................... 7800/8929
2019-08-20T00:33:26.1172448Z .................................................................................................... 7900/8929
2019-08-20T00:33:34.8723126Z .................................................................................................... 8000/8929
2019-08-20T00:34:11.5055434Z .................................................................................................... 8100/8929
---
2019-08-20T00:35:49.2647926Z  finished in 17.713
2019-08-20T00:35:49.2813336Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-20T00:35:49.8185150Z 
2019-08-20T00:35:49.8192568Z running 148 tests
2019-08-20T00:35:52.4652290Z i....iii......iii..iiii....i............................i..i..................i....i.........ii.i.i. 100/148
2019-08-20T00:35:54.3196125Z .iiii..............i.........iii.i......ii......
2019-08-20T00:35:54.3196557Z 
2019-08-20T00:35:54.3196603Z  finished in 4.994
2019-08-20T00:35:54.3196850Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-20T00:35:54.4567945Z 
---
2019-08-20T00:35:56.3408278Z  finished in 2.047
2019-08-20T00:35:56.3563323Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-20T00:35:56.5087337Z 
2019-08-20T00:35:56.5087577Z running 9 tests
2019-08-20T00:35:56.5089082Z iiiiiiiii
2019-08-20T00:35:56.5090118Z 
2019-08-20T00:35:56.5094142Z  finished in 0.153
2019-08-20T00:35:56.5267122Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-20T00:35:56.7003304Z 
---
2019-08-20T00:36:13.8239085Z  finished in 17.248
2019-08-20T00:36:13.8914247Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-20T00:36:14.0769762Z 
2019-08-20T00:36:14.0770473Z running 122 tests
2019-08-20T00:36:36.1159562Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....i..........iiii..........i...ii...i.......ii.i 100/122
2019-08-20T00:36:40.2809550Z .i.i......iii.i.....ii
2019-08-20T00:36:40.2810170Z 
2019-08-20T00:36:40.2810672Z  finished in 26.389
2019-08-20T00:36:40.2818547Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-20T00:36:40.2820378Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-08-20T00:49:55.4204783Z running 970 tests
2019-08-20T00:49:55.4309105Z .................................................................................................... 100/970
2019-08-20T00:49:55.4433527Z .................................................................................................... 200/970
2019-08-20T00:49:55.4532724Z .................................................................................................... 300/970
2019-08-20T00:49:55.5420998Z ................................................................................................ii.. 400/970
2019-08-20T00:49:55.6556783Z .................................................................................................... 600/970
2019-08-20T00:49:55.6604048Z .................................................................................................... 700/970
2019-08-20T00:49:55.6723497Z .................................................................................................... 800/970
2019-08-20T00:49:56.1822592Z .................................................................................................... 900/970
2019-08-20T00:49:56.1822592Z .................................................................................................... 900/970
2019-08-20T00:49:57.3496064Z ......................................................................
2019-08-20T00:49:57.3498267Z test result: ok. 968 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out
2019-08-20T00:49:57.3498657Z 
2019-08-20T00:49:57.3499725Z    Doc-tests core
2019-08-20T00:50:02.4235787Z 
2019-08-20T00:50:02.4236787Z running 2380 tests
2019-08-20T00:50:14.5705455Z ......iiiii......................................................................................... 100/2380
2019-08-20T00:50:26.9179095Z .........................................................................ii......................... 200/2380
2019-08-20T00:50:55.8969886Z .................................................................................................... 400/2380
2019-08-20T00:50:55.8969886Z .................................................................................................... 400/2380
2019-08-20T00:51:07.0166159Z ..............................i..i.................iiii............................................. 500/2380
2019-08-20T00:51:29.9611671Z .................................................................................................... 700/2380
2019-08-20T00:51:41.4145035Z .................................................................................................... 800/2380
2019-08-20T00:51:52.8611134Z .................................................................................................... 900/2380
2019-08-20T00:52:04.7827891Z .................................................................................................... 1000/2380
---
2019-08-20T00:57:20.3672252Z 
2019-08-20T00:57:20.3672518Z running 991 tests
2019-08-20T00:57:42.7761146Z i................................................................................................... 100/991
2019-08-20T00:57:55.0191033Z .................................................................................................... 200/991
2019-08-20T00:58:03.4304944Z .................iii......i......i...i......i....................................................... 300/991
2019-08-20T00:58:08.2064517Z .................................................................................................... 400/991
2019-08-20T00:58:15.8286478Z ..................................i..i.................................ii........................... 500/991
2019-08-20T00:58:30.1617391Z .................................................................................................... 700/991
2019-08-20T00:58:30.1617391Z .................................................................................................... 700/991
2019-08-20T00:58:38.1447600Z .................iiii............................................................................... 800/991
2019-08-20T00:58:51.9824909Z .................................................................................................... 900/991
2019-08-20T00:58:59.1405266Z .......................................iiii................................................
2019-08-20T00:58:59.1405437Z 
2019-08-20T00:58:59.1610536Z  finished in 238.255
2019-08-20T00:58:59.1627075Z Testing unwind stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-20T00:58:59.3088612Z     Finished release [optimized] target(s) in 0.14s
---
2019-08-20T01:13:09.0828637Z   |
2019-08-20T01:13:09.0828999Z 5 | extern crate serialize as rustc_serialize;
2019-08-20T01:13:09.0829326Z   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
2019-08-20T01:13:09.0829572Z   |
2019-08-20T01:13:09.0829874Z   = note: `-D unused-extern-crates` implied by `-D rust-2018-idioms`
2019-08-20T01:13:09.0834569Z error: aborting due to previous error
2019-08-20T01:13:09.0838545Z 
2019-08-20T01:13:09.1060752Z error: Could not compile `error_index_generator`.
2019-08-20T01:13:09.1060833Z 
---
2019-08-20T01:13:09.1164347Z == clock drift check ==
2019-08-20T01:13:09.1181135Z   local time: Tue Aug 20 01:13:09 UTC 2019
2019-08-20T01:13:09.2758815Z   network time: Tue, 20 Aug 2019 01:13:09 GMT
2019-08-20T01:13:09.2762202Z == end clock drift check ==
2019-08-20T01:13:14.0992568Z ##[error]Bash exited with code '1'.
2019-08-20T01:13:14.1105433Z ##[section]Starting: Checkout
2019-08-20T01:13:14.1107673Z ==============================================================================
2019-08-20T01:13:14.1107734Z Task         : Get sources
2019-08-20T01:13:14.1107785Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

This scans the tree for `error_codes.rs` and loads all of them.
This is no longer used by the index generator and was always an unstable
compiler detail, so strip it out.

This also leaves in RUSTC_ERROR_METADATA_DST since the stage0 compiler
still needs it to be set.
@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Aug 20, 2019

📌 Commit 72e2cfd has been approved by matthewjasper

@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 Aug 20, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 20, 2019
…x, r=matthewjasper

Do not emit JSON dumps of diagnostic codes

This decouples the error index generator from libsyntax for the most part (though it still depends on librustdoc for the markdown parsing and generation).

Fixes rust-lang#34588
Centril added a commit to Centril/rust that referenced this pull request Aug 21, 2019
…x, r=matthewjasper

Do not emit JSON dumps of diagnostic codes

This decouples the error index generator from libsyntax for the most part (though it still depends on librustdoc for the markdown parsing and generation).

Fixes rust-lang#34588
bors added a commit that referenced this pull request Aug 21, 2019
Rollup of 7 pull requests

Successful merges:

 - #63721 (Do not emit JSON dumps of diagnostic codes)
 - #63753 (Bump toml dependency.)
 - #63755 (Use dedicated type for spans in pre-expansion gating.)
 - #63759 (Allow 'default async fn' to parse.)
 - #63760 (Update books)
 - #63762 (`async_await` was stabilized in 1.39.0, not 1.38.0.)
 - #63766 (Remove some duplication when resolving constants)

Failed merges:

r? @ghost
@bors bors merged commit 72e2cfd into rust-lang:master Aug 21, 2019
Centril added a commit to Centril/rust that referenced this pull request Sep 13, 2019
…gify, r=Mark-Simulacrum

Remove raw string literal quotes from error index descriptions

The error index has unnecessary `r##"` and `"##` around the descriptions from rust-lang#63721. Removing the `stringify` call removes them.

r? @Mark-Simulacrum
Centril added a commit to Centril/rust that referenced this pull request Sep 14, 2019
…gify, r=Mark-Simulacrum

Remove raw string literal quotes from error index descriptions

The error index has unnecessary `r##"` and `"##` around the descriptions from rust-lang#63721. Removing the `stringify` call removes them.

r? @Mark-Simulacrum
Centril added a commit to Centril/rust that referenced this pull request Sep 14, 2019
…gify, r=Mark-Simulacrum

Remove raw string literal quotes from error index descriptions

The error index has unnecessary `r##"` and `"##` around the descriptions from rust-lang#63721. Removing the `stringify` call removes them.

r? @Mark-Simulacrum
Centril added a commit to Centril/rust that referenced this pull request Sep 14, 2019
…gify, r=Mark-Simulacrum

Remove raw string literal quotes from error index descriptions

The error index has unnecessary `r##"` and `"##` around the descriptions from rust-lang#63721. Removing the `stringify` call removes them.

r? @Mark-Simulacrum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error index test integration needs to be more robust
5 participants