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

Fix incremental bugs in the HIR map #69015

Closed
wants to merge 3 commits into from
Closed

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Feb 10, 2020

No description provided.

@rust-highfive
Copy link
Collaborator

r? @eddyb

(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 Feb 10, 2020
@Zoxc
Copy link
Contributor Author

Zoxc commented Feb 10, 2020

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Feb 10, 2020

⌛ Trying commit 6f356df with merge f84d986...

bors added a commit that referenced this pull request Feb 10, 2020
[do not merge] Fix incremental bugs in the HIR map
@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-02-10T06:49:19.3384706Z ========================== Starting Command Output ===========================
2020-02-10T06:49:19.3386137Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/d2eee951-f445-47d6-9dd9-0809eea7fc5f.sh
2020-02-10T06:49:19.3386182Z 
2020-02-10T06:49:19.3388966Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-10T06:49:19.3394854Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69015/merge to s
2020-02-10T06:49:19.3396420Z Task         : Get sources
2020-02-10T06:49:19.3396468Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-10T06:49:19.3396502Z Version      : 1.0.0
2020-02-10T06:49:19.3396535Z Author       : Microsoft
---
2020-02-10T06:49:20.3335962Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-10T06:49:20.3347310Z ##[command]git config gc.auto 0
2020-02-10T06:49:20.3349843Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-10T06:49:20.3351420Z ##[command]git config --get-all http.proxy
2020-02-10T06:49:20.3357898Z ##[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/69015/merge:refs/remotes/pull/69015/merge
---
2020-02-10T07:50:04.6164519Z .................................................................................................... 1700/9622
2020-02-10T07:50:09.4618744Z .................................................................................................... 1800/9622
2020-02-10T07:50:22.1584146Z .............................i...................................................................... 1900/9622
2020-02-10T07:50:29.4676202Z .................................................................................................... 2000/9622
2020-02-10T07:50:44.1711453Z ...................iiiii............................................................................ 2100/9622
2020-02-10T07:50:53.8736494Z .................................................................................................... 2300/9622
2020-02-10T07:50:56.3203609Z .................................................................................................... 2400/9622
2020-02-10T07:51:01.0830719Z .................................................................................................... 2500/9622
2020-02-10T07:51:22.7838027Z .................................................................................................... 2600/9622
---
2020-02-10T07:54:02.2678967Z ......................................................................i...............i............. 4900/9622
2020-02-10T07:54:10.1754828Z .................................................................................................... 5000/9622
2020-02-10T07:54:18.5140793Z .................................................................................................... 5100/9622
2020-02-10T07:54:23.3424924Z ............i....................................................................................... 5200/9622
2020-02-10T07:54:34.6175733Z ......................................................................................ii.ii........i 5300/9622
2020-02-10T07:54:42.4097030Z ........................i........................................................................... 5500/9622
2020-02-10T07:54:50.6942440Z .................................................................................................... 5600/9622
2020-02-10T07:54:59.1186145Z ..........................................................................i......................... 5700/9622
2020-02-10T07:55:06.6510974Z .................................................................................................... 5800/9622
2020-02-10T07:55:06.6510974Z .................................................................................................... 5800/9622
2020-02-10T07:55:13.2027894Z .................................................................................................... 5900/9622
2020-02-10T07:55:23.6136344Z ..................................................................ii...i..ii............i........... 6000/9622
2020-02-10T07:55:45.4509446Z .................................................................................................... 6200/9622
2020-02-10T07:55:53.1409689Z .................................................................................................... 6300/9622
2020-02-10T07:55:53.1409689Z .................................................................................................... 6300/9622
2020-02-10T07:56:01.2865984Z ..............................................................................................i..ii. 6400/9622
2020-02-10T07:56:25.2376781Z .................................................................................................... 6600/9622
2020-02-10T07:56:35.6338353Z .................................................................................i.................. 6700/9622
2020-02-10T07:56:37.9014427Z .................................................................................................... 6800/9622
2020-02-10T07:56:40.1771578Z ........................................................................................i........... 6900/9622
---
2020-02-10T07:58:21.9362886Z .................................................................................................... 7600/9622
2020-02-10T07:58:25.9732520Z .................................................................................................... 7700/9622
2020-02-10T07:58:31.5413200Z .................................................................................................... 7800/9622
2020-02-10T07:58:40.2939123Z .................................................................................................... 7900/9622
2020-02-10T07:58:49.4536515Z ................................................................iiiiiii.i........................... 8000/9622
2020-02-10T07:59:04.7969801Z ....i......i........................................................................................ 8200/9622
2020-02-10T07:59:10.3430225Z .................................................................................................... 8300/9622
2020-02-10T07:59:24.5163982Z .................................................................................................... 8400/9622
2020-02-10T07:59:34.0518939Z .................................................................................................... 8500/9622
---
2020-02-10T08:02:01.3286020Z  finished in 7.433
2020-02-10T08:02:01.3460162Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-10T08:02:01.5571816Z 
2020-02-10T08:02:02.5015207Z running 178 tests
2020-02-10T08:02:04.6372282Z iiii......i...........ii..iiii...i....i...........i............i..i..................i....i......... 100/178
2020-02-10T08:02:07.5025934Z ...i.i.i...iii..iiiiiiiiiiiiiiii.......................iii............ii......
2020-02-10T08:02:07.5112437Z 
2020-02-10T08:02:07.5112515Z  finished in 5.737
2020-02-10T08:02:07.5112854Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-10T08:02:07.5113187Z 
---
2020-02-10T08:02:09.3262149Z  finished in 2.222
2020-02-10T08:02:09.3438416Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-10T08:02:09.5023614Z 
2020-02-10T08:02:09.5024338Z running 9 tests
2020-02-10T08:02:09.5025514Z iiiiiiiii
2020-02-10T08:02:09.5026250Z 
2020-02-10T08:02:09.5027311Z  finished in 0.158
2020-02-10T08:02:09.5211686Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-10T08:02:10.5031753Z 
2020-02-10T08:02:10.5031753Z 
2020-02-10T08:02:10.5032034Z running 115 tests
2020-02-10T08:02:28.0502556Z .......................................................F............................................ 100/115
2020-02-10T08:02:30.9176012Z ...............
2020-02-10T08:02:30.9176167Z failures:
2020-02-10T08:02:30.9176205Z 
2020-02-10T08:02:30.9176543Z ---- [incremental] incremental/ich_nested_items.rs stdout ----
2020-02-10T08:02:30.9176600Z 
2020-02-10T08:02:30.9176865Z error in revision `cfail2`: test compilation failed although it shouldn't!
2020-02-10T08:02:30.9176919Z status: exit code: 1
2020-02-10T08:02:30.9177993Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/incremental/ich_nested_items.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "cfail2" "-C" "incremental=/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/ich_nested_items/ich_nested_items.inc" "-Z" "incremental-verify-ich" "-Z" "incremental-queries" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/ich_nested_items" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/ich_nested_items/auxiliary"
2020-02-10T08:02:30.9178962Z ------------------------------------------
2020-02-10T08:02:30.9178992Z 
2020-02-10T08:02:30.9179177Z ------------------------------------------
2020-02-10T08:02:30.9179237Z stderr:
2020-02-10T08:02:30.9179237Z stderr:
2020-02-10T08:02:30.9179531Z ------------------------------------------
2020-02-10T08:02:30.9179582Z warning: function is never used: `bar`
2020-02-10T08:02:30.9179837Z   --> /checkout/src/test/incremental/ich_nested_items.rs:18:12
2020-02-10T08:02:30.9179882Z    |
2020-02-10T08:02:30.9180436Z LL |     pub fn bar() { } // but that doesn't matter.
2020-02-10T08:02:30.9180527Z    |
2020-02-10T08:02:30.9180563Z    = note: `#[warn(dead_code)]` on by default
2020-02-10T08:02:30.9180588Z 
2020-02-10T08:02:30.9180642Z warning: function is never used: `baz`
---
2020-02-10T08:02:30.9181164Z 
2020-02-10T08:02:30.9181196Z warning: function is never used: `bap`
2020-02-10T08:02:30.9181404Z   --> /checkout/src/test/incremental/ich_nested_items.rs:23:12
2020-02-10T08:02:30.9181441Z    |
2020-02-10T08:02:30.9181475Z LL |     pub fn bap() { } // neither does adding a new item
2020-02-10T08:02:30.9181550Z 
2020-02-10T08:02:30.9181550Z 
2020-02-10T08:02:30.9181584Z error: `Hir(foo::bar)` should be clean but is not
2020-02-10T08:02:30.9181822Z    |
2020-02-10T08:02:30.9181822Z    |
2020-02-10T08:02:30.9181990Z LL |     pub fn bar() { } // but that doesn't matter.
2020-02-10T08:02:30.9182048Z 
2020-02-10T08:02:30.9182099Z error: aborting due to previous error
2020-02-10T08:02:30.9182121Z 
2020-02-10T08:02:30.9182141Z 
---
2020-02-10T08:02:30.9188139Z test result: FAILED. 114 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
2020-02-10T08:02:30.9188176Z 
2020-02-10T08:02:30.9188203Z 
2020-02-10T08:02:30.9188230Z 
2020-02-10T08:02:30.9190127Z 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" "--src-base" "/checkout/src/test/incremental" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "incremental" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -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" "7.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-02-10T08:02:30.9190622Z 
2020-02-10T08:02:30.9190665Z 
2020-02-10T08:02:30.9200174Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-02-10T08:02:30.9200341Z Build completed unsuccessfully in 1:06:40
2020-02-10T08:02:30.9200341Z Build completed unsuccessfully in 1:06:40
2020-02-10T08:02:30.9252284Z == clock drift check ==
2020-02-10T08:02:30.9273063Z   local time: Mon Feb 10 08:02:30 UTC 2020
2020-02-10T08:02:31.2261953Z   network time: Mon, 10 Feb 2020 08:02:31 GMT
2020-02-10T08:02:31.2263052Z == end clock drift check ==
2020-02-10T08:02:33.1072879Z 
2020-02-10T08:02:33.1177429Z ##[error]Bash exited with code '1'.
2020-02-10T08:02:33.1192320Z ##[section]Finishing: Run build
2020-02-10T08:02:33.1211624Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69015/merge to s
2020-02-10T08:02:33.1213155Z Task         : Get sources
2020-02-10T08:02:33.1213213Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-10T08:02:33.1213267Z Version      : 1.0.0
2020-02-10T08:02:33.1213302Z Author       : Microsoft
2020-02-10T08:02:33.1213302Z Author       : Microsoft
2020-02-10T08:02:33.1213359Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-10T08:02:33.1213401Z ==============================================================================
2020-02-10T08:02:33.5531711Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-10T08:02:33.5570353Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69015/merge to s
2020-02-10T08:02:33.5759671Z Cleaning up task key
2020-02-10T08:02:33.5760314Z Start cleaning up orphan processes.
2020-02-10T08:02:33.5889115Z Terminate orphan process: pid (3593) (python)
2020-02-10T08:02:33.6133485Z ##[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)

@bors
Copy link
Contributor

bors commented Feb 10, 2020

☀️ Try build successful - checks-azure
Build commit: f84d986 (f84d9860696824a4789e785ae1a1a4e96ee55257)

@rust-timer
Copy link
Collaborator

Queued f84d986 with parent 840bdc3, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit f84d986, comparison URL.

@Zoxc
Copy link
Contributor Author

Zoxc commented Feb 11, 2020

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Feb 11, 2020

⌛ Trying commit e510684e6fbca72455b335482cf6538dd20dc0f2 with merge f2aa56cac4a0eb137d35d91ec60e476122a752e5...

@rust-highfive
Copy link
Collaborator

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.

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)

@bors
Copy link
Contributor

bors commented Feb 11, 2020

💔 Test failed - checks-azure

@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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 11, 2020
@Zoxc
Copy link
Contributor Author

Zoxc commented Feb 11, 2020

@bors try

@bors
Copy link
Contributor

bors commented Feb 11, 2020

⌛ Trying commit e510684e6fbca72455b335482cf6538dd20dc0f2 with merge dcc5ac1c7dd14bb31920c83fef238a462e9ec511...

@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-02-11T13:40:52.7996724Z ========================== Starting Command Output ===========================
2020-02-11T13:40:52.8014851Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/bcda59bf-e854-404b-a6d1-0b08d4eed5ba.sh
2020-02-11T13:40:52.8193277Z 
2020-02-11T13:40:52.8261238Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-11T13:40:52.8266866Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69015/merge to s
2020-02-11T13:40:52.8268466Z Task         : Get sources
2020-02-11T13:40:52.8268503Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-11T13:40:52.8268553Z Version      : 1.0.0
2020-02-11T13:40:52.8268589Z Author       : Microsoft
---
2020-02-11T13:40:53.6688301Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-11T13:40:53.6810127Z ##[command]git config gc.auto 0
2020-02-11T13:40:53.6857283Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-11T13:40:53.6905581Z ##[command]git config --get-all http.proxy
2020-02-11T13:40:53.7038133Z ##[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/69015/merge:refs/remotes/pull/69015/merge
---
2020-02-11T14:34:09.7058120Z .................................................................................................... 1700/9627
2020-02-11T14:34:14.0496946Z .................................................................................................... 1800/9627
2020-02-11T14:34:24.6849563Z ..............................i..................................................................... 1900/9627
2020-02-11T14:34:31.5257538Z .................................................................................................... 2000/9627
2020-02-11T14:34:43.9855783Z ....................iiiii........................................................................... 2100/9627
2020-02-11T14:34:52.3334273Z .................................................................................................... 2300/9627
2020-02-11T14:34:54.3414118Z .................................................................................................... 2400/9627
2020-02-11T14:34:58.4935243Z .................................................................................................... 2500/9627
2020-02-11T14:35:15.3883240Z .................................................................................................... 2600/9627
---
2020-02-11T14:37:39.6134443Z .......................................................................i...............i............ 4900/9627
2020-02-11T14:37:47.5359742Z .................................................................................................... 5000/9627
2020-02-11T14:37:55.0189266Z .................................................................................................... 5100/9627
2020-02-11T14:37:59.4197554Z .............i...................................................................................... 5200/9627
2020-02-11T14:38:09.5925604Z .......................................................................................ii.ii........ 5300/9627
2020-02-11T14:38:13.1595251Z i...i............................................................................................... 5400/9627
2020-02-11T14:38:23.7272106Z .................................................................................................... 5600/9627
2020-02-11T14:38:31.2129772Z ...........................................................................i........................ 5700/9627
2020-02-11T14:38:37.7445695Z .................................................................................................... 5800/9627
2020-02-11T14:38:43.4593201Z .................................................................................................... 5900/9627
2020-02-11T14:38:43.4593201Z .................................................................................................... 5900/9627
2020-02-11T14:38:52.5787985Z ...................................................................ii...i..ii...........i........... 6000/9627
2020-02-11T14:39:11.8704444Z .................................................................................................... 6200/9627
2020-02-11T14:39:18.7477959Z .................................................................................................... 6300/9627
2020-02-11T14:39:26.4509804Z ...............................................................................................i..ii 6400/9627
2020-02-11T14:39:38.8564600Z .................................................................................................... 6500/9627
---
2020-02-11T14:41:33.2749855Z .................................................................................................... 7600/9627
2020-02-11T14:41:37.2546510Z .................................................................................................... 7700/9627
2020-02-11T14:41:42.8256856Z .................................................................................................... 7800/9627
2020-02-11T14:41:51.2655102Z .................................................................................................... 7900/9627
2020-02-11T14:41:59.4934110Z .....................................................................iiiiiii.i...................... 8000/9627
2020-02-11T14:42:13.6021094Z .........i......i................................................................................... 8200/9627
2020-02-11T14:42:19.0970606Z .................................................................................................... 8300/9627
2020-02-11T14:42:33.2351742Z .................................................................................................... 8400/9627
2020-02-11T14:42:42.5861344Z .................................................................................................... 8500/9627
---
2020-02-11T14:45:02.0119018Z  finished in 7.080
2020-02-11T14:45:02.0331564Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-11T14:45:02.2515205Z 
2020-02-11T14:45:02.2516078Z running 178 tests
2020-02-11T14:45:05.3997207Z iiii......i...........ii..iiii...i....i...........i............i..i..................i....i......... 100/178
2020-02-11T14:45:07.8888701Z ...i.i.i...iii..iiiiiiiiiiiiiiii.......................iii............ii......
2020-02-11T14:45:07.8889319Z 
2020-02-11T14:45:07.8893018Z  finished in 5.856
2020-02-11T14:45:07.9110339Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-11T14:45:08.0877885Z 
---
2020-02-11T14:45:10.1617934Z  finished in 2.249
2020-02-11T14:45:10.1819236Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-11T14:45:10.3513464Z 
2020-02-11T14:45:10.3513689Z running 9 tests
2020-02-11T14:45:10.3514489Z iiiiiiiii
2020-02-11T14:45:10.3515126Z 
2020-02-11T14:45:10.3515174Z  finished in 0.168
2020-02-11T14:45:10.3718863Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-02-11T14:45:10.5602787Z 
2020-02-11T14:45:10.5602787Z 
2020-02-11T14:45:10.5603391Z running 115 tests
2020-02-11T14:45:29.2321878Z .......................................................F............................................ 100/115
2020-02-11T14:45:31.4475076Z ...............
2020-02-11T14:45:31.4476016Z failures:
2020-02-11T14:45:31.4476074Z 
2020-02-11T14:45:31.4476671Z ---- [incremental] incremental/ich_nested_items.rs stdout ----
2020-02-11T14:45:31.4476746Z 
2020-02-11T14:45:31.4477042Z error in revision `cfail2`: test compilation failed although it shouldn't!
2020-02-11T14:45:31.4477095Z status: exit code: 1
2020-02-11T14:45:31.4478161Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/incremental/ich_nested_items.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "cfail2" "-C" "incremental=/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/ich_nested_items/ich_nested_items.inc" "-Z" "incremental-verify-ich" "-Z" "incremental-queries" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/ich_nested_items" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/ich_nested_items/auxiliary"
2020-02-11T14:45:31.4478505Z ------------------------------------------
2020-02-11T14:45:31.4478544Z 
2020-02-11T14:45:31.4478748Z ------------------------------------------
2020-02-11T14:45:31.4478807Z stderr:
2020-02-11T14:45:31.4478807Z stderr:
2020-02-11T14:45:31.4479005Z ------------------------------------------
2020-02-11T14:45:31.4479049Z warning: function is never used: `bar`
2020-02-11T14:45:31.4479285Z   --> /checkout/src/test/incremental/ich_nested_items.rs:18:12
2020-02-11T14:45:31.4479339Z    |
2020-02-11T14:45:31.4479553Z LL |     pub fn bar() { } // but that doesn't matter.
2020-02-11T14:45:31.4479650Z    |
2020-02-11T14:45:31.4479688Z    = note: `#[warn(dead_code)]` on by default
2020-02-11T14:45:31.4479715Z 
2020-02-11T14:45:31.4479769Z warning: function is never used: `baz`
---
2020-02-11T14:45:31.4480150Z 
2020-02-11T14:45:31.4480379Z warning: function is never used: `bap`
2020-02-11T14:45:31.4480679Z   --> /checkout/src/test/incremental/ich_nested_items.rs:23:12
2020-02-11T14:45:31.4480723Z    |
2020-02-11T14:45:31.4480762Z LL |     pub fn bap() { } // neither does adding a new item
2020-02-11T14:45:31.4480960Z 
2020-02-11T14:45:31.4480960Z 
2020-02-11T14:45:31.4481000Z error: `Hir(foo::bar)` should be clean but is not
2020-02-11T14:45:31.4481311Z    |
2020-02-11T14:45:31.4481311Z    |
2020-02-11T14:45:31.4481518Z LL |     pub fn bar() { } // but that doesn't matter.
2020-02-11T14:45:31.4481604Z 
2020-02-11T14:45:31.4481641Z error: aborting due to previous error
2020-02-11T14:45:31.4481666Z 
2020-02-11T14:45:31.4481689Z 
---
2020-02-11T14:45:31.4482712Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-02-11T14:45:31.4482764Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-02-11T14:45:31.4484190Z 
2020-02-11T14:45:31.4484333Z 
2020-02-11T14:45:31.4485974Z 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" "--src-base" "/checkout/src/test/incremental" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "incremental" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -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" "7.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-02-11T14:45:31.4486416Z 
2020-02-11T14:45:31.4486442Z 
2020-02-11T14:45:31.4496582Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-02-11T14:45:31.4496663Z Build completed unsuccessfully in 0:58:18
2020-02-11T14:45:31.4496663Z Build completed unsuccessfully in 0:58:18
2020-02-11T14:45:31.4551929Z == clock drift check ==
2020-02-11T14:45:31.4576325Z   local time: Tue Feb 11 14:45:31 UTC 2020
2020-02-11T14:45:31.7505459Z   network time: Tue, 11 Feb 2020 14:45:31 GMT
2020-02-11T14:45:31.7508898Z == end clock drift check ==
2020-02-11T14:45:34.3547129Z 
2020-02-11T14:45:34.3627690Z ##[error]Bash exited with code '1'.
2020-02-11T14:45:34.3638701Z ##[section]Finishing: Run build
2020-02-11T14:45:34.3660847Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69015/merge to s
2020-02-11T14:45:34.3662410Z Task         : Get sources
2020-02-11T14:45:34.3662449Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-11T14:45:34.3662486Z Version      : 1.0.0
2020-02-11T14:45:34.3662537Z Author       : Microsoft
2020-02-11T14:45:34.3662537Z Author       : Microsoft
2020-02-11T14:45:34.3662575Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-11T14:45:34.3662615Z ==============================================================================
2020-02-11T14:45:34.7546390Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-11T14:45:34.7583099Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69015/merge to s
2020-02-11T14:45:34.7679494Z Cleaning up task key
2020-02-11T14:45:34.7680109Z Start cleaning up orphan processes.
2020-02-11T14:45:34.7773411Z Terminate orphan process: pid (3397) (python)
2020-02-11T14:45:34.7982965Z ##[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)

@bors
Copy link
Contributor

bors commented Feb 11, 2020

☀️ Try build successful - checks-azure
Build commit: dcc5ac1c7dd14bb31920c83fef238a462e9ec511 (dcc5ac1c7dd14bb31920c83fef238a462e9ec511)

@rust-timer
Copy link
Collaborator

Queued dcc5ac1c7dd14bb31920c83fef238a462e9ec511 with parent b6690a8, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit dcc5ac1c7dd14bb31920c83fef238a462e9ec511, comparison URL.

@Zoxc
Copy link
Contributor Author

Zoxc commented Feb 12, 2020

I added a parent_module query and that seems to have fixed the large regressions. unused-warnings regresses a bit due to the additional parent_module query.

r? @michaelwoerister

@Zoxc Zoxc changed the title [do not merge] Fix incremental bugs in the HIR map Fix incremental bugs in the HIR map Feb 12, 2020
@michaelwoerister
Copy link
Member

Are these perf results still current?

@Zoxc
Copy link
Contributor Author

Zoxc commented Feb 12, 2020

Yeah. I just removed a commit and its reversion.

} else {
DepKind::HirBody
};
self.dep_graph.read(def_path_hash.to_dep_node(kind));
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand what this logic is supposed to do exactly (before or after the change)...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is supposed to add a read to the node which reveals the parent of the HirId.

Copy link
Member

Choose a reason for hiding this comment

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

OK, I understand the original thinking now: The fingerprint of HirBody contains the information of the entire item (including the "signature" parts) so adding a dependency to HirBody is the conservative choice.

But as you discovered the parent is not hashed into any of the two dep-nodes, so we are clearly missing dependencies here.

I assume that the if hir_id.local_id == ItemLocalId::from_u32_const(0) check is based on the assumption that the parent of any node except the item root is part of the same HIR item and thus the HirBody fingerprint contains the appropriate information? If that's the case it is far from obvious and a clarifying comment will be much appreciated by anybody trying to understand this code.

@@ -46,9 +47,17 @@ impl<'tcx> TyCtxt<'tcx> {
pub fn hir(self) -> Hir<'tcx> {
Hir { tcx: self, map: &self.hir_map }
}

pub fn hir_id_parent_module(self, id: HirId) -> DefId {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe parent_hir_module would be more appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe renaming the query to parent_module_from_def_id and letting this take parent_module is a better option?

}

pub fn provide(providers: &mut Providers<'_>) {
providers.parent_module = |tcx, id| {
let hir = tcx.hir();
hir.get_module_parent(hir.as_local_hir_id(id).unwrap())
Copy link
Member

Choose a reason for hiding this comment

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

Can we make this function get_module_parent and get_module_parent_node less public? The query is always the better choice, right?

@michaelwoerister
Copy link
Member

The fix looks good to me. Am I correct in assuming the #68944 will make the whole thing obsolete?

@Zoxc
Copy link
Contributor Author

Zoxc commented Feb 21, 2020

@michaelwoerister #68944 includes the parent_module commit, but otherwise yes.

bors added a commit that referenced this pull request Mar 1, 2020
Use a query to get parent modules

Split out from #69015 / #68944.

r? @michaelwoerister
@bors
Copy link
Contributor

bors commented Mar 1, 2020

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

@pnkfelix
Copy link
Member

pnkfelix commented Mar 3, 2020

r? @pnkfelix

@Zoxc Zoxc closed this Mar 12, 2020
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants