Skip to content

Select Polonius algorithm via POLONIUS_ALGORITHM environment variable - #51246

Merged
bors merged 2 commits into
rust-lang:masterfrom
vakaras:select_polonius_algo_via_env_var
Jun 5, 2018
Merged

Select Polonius algorithm via POLONIUS_ALGORITHM environment variable#51246
bors merged 2 commits into
rust-lang:masterfrom
vakaras:select_polonius_algo_via_env_var

Conversation

@vakaras

@vakaras vakaras commented May 31, 2018

Copy link
Copy Markdown
Contributor

This pull request allows selecting the Polonius algorithm being used by providing an environment variable POLONIUS_ALGORITHM.

Example usage:

POLONIUS_ALGORITHM=compare RUST_LOG=rustc_mir::borrow_check::nll=trace  ./x.py test --stage 1 --compare-mode polonius -- src/test/ui/nll/issue-47680.rs
...
stderr:
------------------------------------------
 INFO 2018-05-31T17:35:31Z: rustc_mir::borrow_check::nll: Using Polonius algorithm: Compare
 INFO 2018-05-31T17:35:31Z: rustc_mir::borrow_check::nll: Using Polonius algorithm: Compare

------------------------------------------
...

r? @nikomatsakis

@rust-highfive

Copy link
Copy Markdown
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 31, 2018
@rust-highfive

Copy link
Copy Markdown
Contributor

The job x86_64-gnu-llvm-3.9 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.
[00:08:00]    Compiling proc_macro v0.0.0 (file:///checkout/src/libproc_macro)
[00:08:20]    Compiling syntax_ext v0.0.0 (file:///checkout/src/libsyntax_ext)
[00:15:05]    Compiling rustc_typeck v0.0.0 (file:///checkout/src/librustc_typeck)
[00:15:05]    Compiling rustc_mir v0.0.0 (file:///checkout/src/librustc_mir)
[00:15:09] error[E0599]: no variant named `from_str` found for type `polonius_engine::Algorithm` in the current scope
[00:15:09]    --> librustc_mir/borrow_check/nll/mod.rs:165:17
[00:15:09]     |
[00:15:09] 165 |                 Algorithm::from_str(&algorithm).unwrap(),
[00:15:09]     |                 ^^^^^^^^^^^^^^^^^^^ variant not found in `polonius_engine::Algorithm`
[00:15:19] error: aborting due to previous error
[00:15:19] 
[00:15:19] For more information about this error, try `rustc --explain E0599`.
[00:15:20] error: Could not compile `rustc_mir`.
[00:15:20] error: Could not compile `rustc_mir`.
[00:15:20] 
[00:15:20] Caused by:
[00:15:20]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rustc_mir librustc_mir/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=37665b7817f51641 -C extra-filename=-37665b7817f51641 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern graphviz=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libgraphviz-be994de8b3050feb.so --extern syntax=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax-4074300b8e2af006.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-5d0a8a65bb9fe29f.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-5d0a8a65bb9fe29f.rlib --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-ac6d20f88773f905.so --extern polonius_engine=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libpolonius_engine-fea5947f694181d1.rlib --extern rustc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc-656208abd197f17f.so --extern byteorder=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbyteorder-78ebc049d4f53f46.rlib --extern rustc_target=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-58741ed9de9aae4f.so --extern rustc_apfloat=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_apfloat-642a7efe79e24835.rlib --extern log_settings=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog_settings-f16e9eee09cda644.rlib --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-5ebb1e8ea909a7e0.so --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-99b4534960f92449.rlib --extern arena=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libarena-e46cee1a85353cbb.so --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-5073f1296cd24b67.rlib --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-37a39e1dc238018f.so --extern either=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libeither-11fcd35bf55f48b3.rlib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/backtrace-sys-88673787176f9d86/out -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-62d80197b9ec531e/out` (exit code: 101)
[00:17:21] error: build failed
[00:17:21] error: build failed
[00:17:21] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:17:21] expected success, got: exit code: 101
[00:17:21] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:17:21] travis_fold:end:stage0-rustc

[00:17:21] travis_time:end:stage0-rustc:start=1527760740441013970,finish=1527761464485628886,duration=724044614916


[00:17:21] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:17:21] Build completed unsuccessfully in 0:12:17
[00:17:21] Makefile:28: recipe for target 'all' failed
[00:17:21] make: *** [all] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1cdd4615
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@vakaras
vakaras force-pushed the select_polonius_algo_via_env_var branch 2 times, most recently from 02e2169 to 8d61e69 Compare May 31, 2018 17:09
@vakaras vakaras changed the title [WIP] Select Polonius algorithm via POLONIUS_ALGORITHM environment variable Select Polonius algorithm via POLONIUS_ALGORITHM environment variable May 31, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't know why this would be info! level in particular — I would say make it debug!, and probably:

debug!("compute_regions: using polonius algorithm {:?}", algorithm);

@nikomatsakis nikomatsakis 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 Jun 1, 2018
@vakaras
vakaras force-pushed the select_polonius_algo_via_env_var branch from 8d61e69 to 265b04d Compare June 2, 2018 12:20
@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Jun 4, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 265b04d has been approved by nikomatsakis

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 4, 2018
@bors

bors commented Jun 4, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 265b04d with merge 6ac784c21adad47ecf3e1e49a14859c8617ad4d5...

@bors

bors commented Jun 4, 2018

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 4, 2018
@lqd

lqd commented Jun 4, 2018

Copy link
Copy Markdown
Member

🤔

---- net::tcp::tests::connect_timeout_unbound stdout ----
thread 'net::tcp::tests::connect_timeout_unbound' panicked at 'called `Result::unwrap_err()` on an `Ok` value: TcpStream { addr: V4(127.0.0.1:3648), peer: V4(127.0.0.1:3648), socket: 720 }', libcore\result.rs:945:5

@emilyalbini

Copy link
Copy Markdown
Member

This seems to be spurious?

@bors retry

@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 Jun 4, 2018
@bors

bors commented Jun 4, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 265b04d with merge 005322cc0a24306657e0e23af6d0591c2cb8f260...

@bors

bors commented Jun 4, 2018

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 4, 2018
@rust-highfive

Copy link
Copy Markdown
Contributor

The job dist-mips64-linux 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_fold:end:dpl_0
travis_time:start:27558300
travis_fold:start:dpl.1
Installing deploy dependencies
ERROR:  Could not find a valid gem 'aws-sdk-core' (= 2.11.62) in any repository
ERROR:  Possible alternatives: aws-sdk-core
/home/travis/.rvm/rubies/ruby-2.2.7/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- dpl/provider/s3 (LoadError)
 from /home/travis/.rvm/rubies/ruby-2.2.7/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/provider.rb:92:in `rescue in block in new'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/provider.rb:67:in `block in new'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/cli.rb:41:in `fold'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/provider.rb:66:in `new'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/cli.rb:31:in `run'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/cli.rb:7:in `run'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/bin/dpl:5:in `<top (required)>'
 from /home/travis/.rvm/gems/ruby-2.2.7/bin/dpl:23:in `load'
 from /home/travis/.rvm/gems/ruby-2.2.7/bin/dpl:23:in `<main>'
failed to deploy

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)

1 similar comment
@rust-highfive

Copy link
Copy Markdown
Contributor

The job dist-mips64-linux 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_fold:end:dpl_0
travis_time:start:27558300
travis_fold:start:dpl.1
Installing deploy dependencies
ERROR:  Could not find a valid gem 'aws-sdk-core' (= 2.11.62) in any repository
ERROR:  Possible alternatives: aws-sdk-core
/home/travis/.rvm/rubies/ruby-2.2.7/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- dpl/provider/s3 (LoadError)
 from /home/travis/.rvm/rubies/ruby-2.2.7/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/provider.rb:92:in `rescue in block in new'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/provider.rb:67:in `block in new'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/cli.rb:41:in `fold'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/provider.rb:66:in `new'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/cli.rb:31:in `run'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/cli.rb:7:in `run'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/bin/dpl:5:in `<top (required)>'
 from /home/travis/.rvm/gems/ruby-2.2.7/bin/dpl:23:in `load'
 from /home/travis/.rvm/gems/ruby-2.2.7/bin/dpl:23:in `<main>'
failed to deploy

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)

@vakaras

vakaras commented Jun 5, 2018

Copy link
Copy Markdown
Contributor Author
ERROR:  Could not find a valid gem 'aws-sdk-core' (= 2.11.62) in any repository
ERROR:  Possible alternatives: aws-sdk-core

Was this some network issue?

@emilyalbini

Copy link
Copy Markdown
Member

Yeah, that's a Travis failure.

@bors retry #44159

@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 Jun 5, 2018
@bors

bors commented Jun 5, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 265b04d with merge 90f34b5...

bors added a commit that referenced this pull request Jun 5, 2018
…komatsakis

Select Polonius algorithm via `POLONIUS_ALGORITHM` environment variable

This pull request allows selecting the Polonius algorithm being used by providing an environment variable `POLONIUS_ALGORITHM`.

Example usage:
```
POLONIUS_ALGORITHM=compare RUST_LOG=rustc_mir::borrow_check::nll=trace  ./x.py test --stage 1 --compare-mode polonius -- src/test/ui/nll/issue-47680.rs
...
stderr:
------------------------------------------
 INFO 2018-05-31T17:35:31Z: rustc_mir::borrow_check::nll: Using Polonius algorithm: Compare
 INFO 2018-05-31T17:35:31Z: rustc_mir::borrow_check::nll: Using Polonius algorithm: Compare

------------------------------------------
...
```

r? @nikomatsakis
@bors

bors commented Jun 5, 2018

Copy link
Copy Markdown
Collaborator

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 90f34b5 to master...

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.

6 participants