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

Conditionally skip two passes if their related attributes were not found #57691

Merged
merged 1 commit into from Jan 28, 2019

Conversation

Projects
None yet
6 participants
@Zoxc
Copy link
Contributor

Zoxc commented Jan 17, 2019

No description provided.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 17, 2019

r? @matthewjasper

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

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Jan 17, 2019

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

Click to expand the log.
travis_time:end:01e62106:start=1547706771405606304,finish=1547706772314363741,duration=908757437
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[01:03:41] .....................................ii............................................................. 3700/5297
[01:03:46] .................................................................................................... 3900/5297
[01:03:48] ...........i........................................................................................ 4000/5297
[01:03:51] .................................................................................................... 4100/5297
[01:04:02] ........................FF.......................................................................... 4200/5297
[01:04:09] .................................................................................................... 4400/5297
[01:04:13] ............................................................i....................................... 4500/5297
[01:04:19] .................................................................................................... 4600/5297
[01:04:22] .................................................................................................... 4700/5297
[01:04:22] .................................................................................................... 4700/5297
[01:04:25] .................................................................................................... 4800/5297
[01:04:30] .................................................................................................... 4900/5297
[01:04:34] .................................................................................................... 5000/5297
[01:04:37] .................................................................................................... 5100/5297
[01:04:39] .................................................................................................... 5200/5297
xport-macro/a" "-Crpath" "-O" "-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/ui/proc-macro/export-macro/auxiliary" "-A" "unused"
[01:04:42] ------------------------------------------
[01:04:42] 
[01:04:42] ------------------------------------------
[01:04:42] stderr:
---
[01:04:42] ---- [ui] ui/proc-macro/exports.rs stdout ----
[01:04:42] 
[01:04:42] error: ui test compiled successfully!
[01:04:42] status: exit code: 0
[01:04:42] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/proc-macro/exports.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/proc-macro/exports/a" "-Crpath" "-O" "-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/ui/proc-macro/exports/auxiliary" "-A" "unused"
[01:04:42] ------------------------------------------
[01:04:42] 
[01:04:42] ------------------------------------------
[01:04:42] stderr:
---
[01:04:42] 
[01:04:42] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:495:22
[01:04:42] 
[01:04:42] 
[01:04:42] 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/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:04:42] 
[01:04:42] 
[01:04:42] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:04:42] Build completed unsuccessfully in 0:04:12
[01:04:42] Build completed unsuccessfully in 0:04:12
[01:04:42] make: *** [check] Error 1
[01:04:42] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:14d94515
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Thu Jan 17 07:37:44 UTC 2019
---
travis_time:end:01d0971e:start=1547710665686152910,finish=1547710665693091994,duration=6939084
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:19073eec
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:166b5595
$ dmesg | grep -i kill

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

@Zoxc Zoxc force-pushed the Zoxc:pass-skip branch from 7518ec2 to c8f5132 Jan 17, 2019

@matthewjasper

This comment has been minimized.

Copy link
Contributor

matthewjasper commented Jan 23, 2019

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 24, 2019

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

@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Jan 25, 2019

AST validation is supposed to work on the "final" AST and check that internal expansion passes don't produce anything suspicious either.
That's why it was placed after all the proc-macro/allocator expansions.
That's certainly less important than checking user input though.

Beside that collecting flags for later passes seems "off-topic" for AST validation.

Still seems ok, other passes are even less suitable for collecting the flags for this optimization.
@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 25, 2019

📌 Commit c8f5132 has been approved by petrochenkov

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 27, 2019

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout pass-skip (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self pass-skip --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
warning: Cannot merge binary files: Cargo.lock (HEAD vs. heads/homu-tmp)
Auto-merging src/librustc_passes/lib.rs
Auto-merging src/librustc_passes/ast_validation.rs
CONFLICT (content): Merge conflict in src/librustc_passes/ast_validation.rs
Auto-merging src/librustc_driver/driver.rs
Auto-merging Cargo.lock
CONFLICT (content): Merge conflict in Cargo.lock
Automatic merge failed; fix conflicts and then commit the result.

@Zoxc Zoxc force-pushed the Zoxc:pass-skip branch from c8f5132 to 1b393bd Jan 27, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 27, 2019

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

Click to expand the log.
travis_time:end:0413038e:start=1548601462533702093,finish=1548601463580519019,duration=1046816926
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
######################################################################    98.6%
######################################################################## 100.0%
[00:02:20] extracting /checkout/obj/build/cache/2019-01-04/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
[00:02:20]     Updating crates.io index
[00:02:31] error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
[00:02:31] Build completed unsuccessfully in 0:00:26
[00:02:31] Makefile:70: recipe for target 'prepare' failed
[00:02:31] make: *** [prepare] Error 1
[00:02:32] Command failed. Attempt 2/5:
[00:02:32] Command failed. Attempt 2/5:
[00:02:32] error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
[00:02:32] Build completed unsuccessfully in 0:00:00
[00:02:32] Makefile:70: recipe for target 'prepare' failed
[00:02:32] make: *** [prepare] Error 1
[00:02:34] Command failed. Attempt 3/5:
[00:02:34] Command failed. Attempt 3/5:
[00:02:35] error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
[00:02:35] Build completed unsuccessfully in 0:00:00
[00:02:35] make: *** [prepare] Error 1
[00:02:35] Makefile:70: recipe for target 'prepare' failed
[00:02:38] Command failed. Attempt 4/5:
[00:02:38] Command failed. Attempt 4/5:
[00:02:38] error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
[00:02:38] Build completed unsuccessfully in 0:00:00
[00:02:38] Makefile:70: recipe for target 'prepare' failed
[00:02:38] make: *** [prepare] Error 1
[00:02:42] Command failed. Attempt 5/5:
[00:02:42] Command failed. Attempt 5/5:
[00:02:43] error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
[00:02:43] Build completed unsuccessfully in 0:00:00
[00:02:43] make: *** [prepare] Error 1
[00:02:43] Makefile:70: recipe for target 'prepare' failed
[00:02:43] The command has failed after 5 attempts.
---
travis_time:end:0407f010:start=1548601641032659799,finish=1548601641038532664,duration=5872865
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:26c47241
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:009ac55a
travis_time:start:009ac55a
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:1a00ce97
$ dmesg | grep -i kill

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

@Zoxc Zoxc force-pushed the Zoxc:pass-skip branch from 1b393bd to cfe6544 Jan 27, 2019

@Zoxc

This comment has been minimized.

Copy link
Contributor Author

Zoxc commented Jan 27, 2019

@bors r=petrochenkov

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 27, 2019

📌 Commit cfe6544 has been approved by petrochenkov

Centril added a commit to Centril/rust that referenced this pull request Jan 27, 2019

Rollup merge of rust-lang#57691 - Zoxc:pass-skip, r=petrochenkov
Conditionally skip two passes if their related attributes were not found

bors added a commit that referenced this pull request Jan 27, 2019

Auto merge of #57938 - Centril:rollup, r=Centril
Rollup of 3 pull requests

Successful merges:

 - #57442 (Simplify `ConstValue::ScalarPair`)
 - #57691 (Conditionally skip two passes if their related attributes were not found)
 - #57899 (Unused variable suggestions apply on all patterns.)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 28, 2019

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout pass-skip (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self pass-skip --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
warning: Cannot merge binary files: Cargo.lock (HEAD vs. heads/homu-tmp)
Auto-merging Cargo.lock
CONFLICT (content): Merge conflict in Cargo.lock
Automatic merge failed; fix conflicts and then commit the result.

@Zoxc Zoxc force-pushed the Zoxc:pass-skip branch from cfe6544 to 1bdd2f6 Jan 28, 2019

@Zoxc

This comment has been minimized.

Copy link
Contributor Author

Zoxc commented Jan 28, 2019

@bors r=petrochenkov

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 28, 2019

📌 Commit 1bdd2f6 has been approved by petrochenkov

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 28, 2019

⌛️ Testing commit 1bdd2f6 with merge cc4d1e5...

bors added a commit that referenced this pull request Jan 28, 2019

Auto merge of #57691 - Zoxc:pass-skip, r=petrochenkov
Conditionally skip two passes if their related attributes were not found
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 28, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: petrochenkov
Pushing cc4d1e5 to master...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 28, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: petrochenkov
Pushing cc4d1e5 to master...

@bors bors merged commit 1bdd2f6 into rust-lang:master Jan 28, 2019

1 check passed

homu Test successful
Details

@Zoxc Zoxc deleted the Zoxc:pass-skip branch Jan 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment