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

Update rls-data for save analysis #45096

Merged
merged 6 commits into from
Oct 26, 2017
Merged

Update rls-data for save analysis #45096

merged 6 commits into from
Oct 26, 2017

Conversation

DSpeckhals
Copy link
Contributor

rls-data: 0.10 -> 0.11

This will allow for more fine-grained save analysis for enum variants (tuple and struct).

The first commit updates rls-data, and makes the changes to dump_visitor. The second commit updates the rls submodule, and removes "members" that were deleted from that update in src/Cargo.toml.

Note, that when building the project, rustfmt-nightly was updated in Cargo.lock. If these changes should be excluded, I can revert it.

cc/ @nrc

0.10 -> 0.11

This will allow for more fine-grained save analysis for enum variants
(tuple and struct)
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @arielb1 (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.

@carols10cents
Copy link
Member

Thanks for the PR! We’ll periodically check in on it to make sure that @arielb1 or someone else from the team reviews it soon.

@carols10cents carols10cents added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 9, 2017
@arielb1
Copy link
Contributor

arielb1 commented Oct 11, 2017

r? @jonathandturner

@rust-highfive rust-highfive assigned sophiajt and unassigned arielb1 Oct 11, 2017
@alexcrichton
Copy link
Member

Thanks for the PR! Can this also update the rustfmt submodule? It looks like this is pulling in rustfmt from crates.io but we'd prefer it to come from the in-tree submodule to ensure that all tools are using the same version.

@sunjay
Copy link
Member

sunjay commented Oct 11, 2017

I have some instructions that should help you update the rustfmt submodule. Please let me know in the PR if you run into anything so I can update the instructions before they get merged.

@DSpeckhals
Copy link
Contributor Author

@alexcrichton I pushed a commit that updates rustfmt.

@sunjay Thanks for the tips! They saved me some frustration.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Oct 11, 2017

📌 Commit 218103e has been approved by alexcrichton

@sophiajt
Copy link
Contributor

r? @alexcrichton

@bors
Copy link
Contributor

bors commented Oct 13, 2017

⌛ Testing commit 218103e with merge 33a10f59619a455f8479ac4db5da648ca9f8fd5c...

@bors
Copy link
Contributor

bors commented Oct 14, 2017

💔 Test failed - status-appveyor

@kennytm
Copy link
Member

kennytm commented Oct 14, 2017

RLS tests failed on Windows.

[01:39:36] running 26 tests
[01:39:36] test actions::test::test_find_word_at_pos ... ok
[01:39:36] test server::test_parse_as_notification ... ok
[01:39:36] test build::cargo::test::test_dedup_flags ... ok
[01:39:36] test test::test_all_features ... ok
[01:39:37] test test::test_bin_lib_project ... ok
[01:39:37] {"message":"cannot find struct, variant or union type `LibCfgTestStruct` in module `bin_lib`","code":{"code":"E0422","explanation":"\nYou are trying to use an identifier that is either undefined or not a struct.\nErroneous code example:\n\n```compile_fail,E0422\nfn main () {\n    let x = Foo { x: 1, y: 2 };\n}\n```\n\nIn this case, `Foo` is undefined, so it inherently isn't anything, and\ndefinitely not a struct.\n\n```compile_fail\nfn main () {\n    let foo = 1;\n    let x = foo { x: 1, y: 2 };\n}\n```\n\nIn this case, `foo` is defined, but is not a struct, so Rust can't use it as\none.\n"},"level":"error","spans":[{"file_name":"test_data\\bin_lib\\src\\main.rs","byte_start":121,"byte_end":137,"line_start":6,"line_end":6,"column_start":25,"column_end":41,"is_primary":true,"text":[{"text":"    let test = bin_lib::LibCfgTestStruct { };","highlight_start":25,"highlight_end":41}],"label":"not found in `bin_lib`","suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}
[01:39:37] test test::test_bin_lib_project_no_cfg_test ... ok
[01:39:37] test test::test_borrow_error ... ok
[01:39:38] test test::test_completion ... ok
[01:39:38] test test::test_find_all_refs ... ok
[01:39:39] test test::test_find_all_refs_no_cfg_test ... ok
[01:39:39] test test::test_find_impls ... ok
[01:39:40] test test::test_goto_def ... ok
[01:39:41] test test::test_highlight ... ok
[01:39:41] test test::test_hover ... ok
[01:39:42] test test::test_infer_bin ... ok
[01:39:42] test test::test_infer_custom_bin ... ok
[01:39:43] test test::test_infer_lib ... ok
[01:39:43] test test::test_multiple_binaries ... ok
[01:40:37] test test::test_features has been running for over 60 seconds
[01:40:43] test test::test_no_default_features has been running for over 60 seconds
[01:44:57] test test::test_features ... FAILED
[01:44:57] test test::test_omit_init_build ... ok
[01:44:57] test test::test_parse_error_on_malformed_input ... ok
[01:44:58] test test::test_reformat ... ok
[01:44:58] test test::test_reformat_with_range ... ok
[01:44:59] test test::test_rename ... ok
[01:45:00] test test::test_workspace_symbol ... FAILED
[01:45:03] test test::test_no_default_features ... FAILED
[01:45:03] 
[01:45:03] failures:
[01:45:03] 
[01:45:03] ---- test::test_features stdout ----
[01:45:03] 	thread 'test::test_features' panicked at 'Hit timeout', src\tools\rls\src\test\harness.rs:189:12
[01:45:03] 
[01:45:03] ---- test::test_workspace_symbol stdout ----
[01:45:03] 	expect_messages:
[01:45:03]   results: [
[01:45:03]     "{\"jsonrpc\":\"2.0\",\"id\":0,\"result\":{\"capabilities\":{\"textDocumentSync\":2,\"hoverProvider\":true,\"completionProvider\":{\"resolveProvider\":true,\"triggerCharacters\":[\".\",\":\"]},\"definitionProvider\":true,\"referencesProvider\":true,\"documentHighlightProvider\":true,\"documentSymbolProvider\":true,\"workspaceSymbolProvider\":true,\"codeActionProvider\":true,\"documentFormattingProvider\":true,\"documentRangeFormattingProvider\":false,\"renameProvider\":true,\"executeCommandProvider\":{\"commands\":[\"rls.applySuggestion\"]}}}}",
[01:45:03]     "{\"jsonrpc\":\"2.0\",\"method\":\"rustDocument/beginBuild\",\"params\":null}",
[01:45:03]     "{\"jsonrpc\":\"2.0\",\"method\":\"rustDocument/diagnosticsBegin\",\"params\":null}",
[01:45:03]     "{\"jsonrpc\":\"2.0\",\"method\":\"rustDocument/diagnosticsEnd\",\"params\":null}"
[01:45:03] ],
[01:45:03]   expected: [
[01:45:03]     ExpectedMessage {
[01:45:03]         id: Some(
[01:45:03]             0
[01:45:03]         ),
[01:45:03]         contains: [
[01:45:03]             "capabilities"
[01:45:03]         ]
[01:45:03]     },
[01:45:03]     ExpectedMessage {
[01:45:03]         id: None,
[01:45:03]         contains: [
[01:45:03]             "beginBuild"
[01:45:03]         ]
[01:45:03]     },
[01:45:03]     ExpectedMessage {
[01:45:03]         id: None,
[01:45:03]         contains: [
[01:45:03]             "diagnosticsBegin"
[01:45:03]         ]
[01:45:03]     },
[01:45:03]     ExpectedMessage {
[01:45:03]         id: None,
[01:45:03]         contains: [
[01:45:03]             "diagnosticsEnd"
[01:45:03]         ]
[01:45:03]     }
[01:45:03] ]
[01:45:03] expect_messages:
[01:45:03]   results: [
[01:45:03]     "{\"jsonrpc\":\"2.0\",\"id\":42,\"result\":[{\"name\":\"nemo\",\"kind\":12,\"location\":{\"uri\":\"file:///C:/projects/rust/src/tools/rls/test_data/workspace_symbol/src/main.rs\",\"range\":{\"start\":{\"line\":11,\"character\":11},\"end\":{\"line\":11,\"character\":15}}},\"containerName\":\"x\"},{\"name\":\"nemo\",\"kind\":2,\"location\":{\"uri\":\"file:///C:/projects/rust/src/tools/rls/test_data/workspace_symbol/src/foo.rs\",\"range\":{\"start\":{\"line\":0,\"character\":4},\"end\":{\"line\":0,\"character\":8}}},\"containerName\":\"foo\"}]}"
[01:45:03] ],
[01:45:03]   expected: [
[01:45:03]     ExpectedMessage {
[01:45:03]         id: Some(
[01:45:03]             42
[01:45:03]         ),
[01:45:03]         contains: [
[01:45:03]             "\"id\":42",
[01:45:03]             "main.rs",
[01:45:03]             "\"name\":\"nemo\"",
[01:45:03]             "\"kind\":12",
[01:45:03]             "\"range\":{\"start\":{\"line\":11,\"character\":11},\"end\":{\"line\":11,\"character\":15}}",
[01:45:03]             "\"containerName\":\"x\"",
[01:45:03]             "foo.rs",
[01:45:03]             "\"name\":\"nemo\"",
[01:45:03]             "\"kind\":5",
[01:45:03]             "\"range\":{\"start\":{\"line\":0,\"character\":4},\"end\":{\"line\":0,\"character\":8}}",
[01:45:03]             "\"containerName\":\"foo\""
[01:45:03]         ]
[01:45:03]     }
[01:45:03] ]
[01:45:03] thread 'test::test_workspace_symbol' panicked at 'Could not find `"kind":5` in `{"jsonrpc":"2.0","id":42,"result":[{"name":"nemo","kind":12,"location":{"uri":"file:///C:/projects/rust/src/tools/rls/test_data/workspace_symbol/src/main.rs","range":{"start":{"line":11,"character":11},"end":{"line":11,"character":15}}},"containerName":"x"},{"name":"nemo","kind":2,"location":{"uri":"file:///C:/projects/rust/src/tools/rls/test_data/workspace_symbol/src/foo.rs","range":{"start":{"line":0,"character":4},"end":{"line":0,"character":8}}},"containerName":"foo"}]}`', src\libcore\option.rs:839:4
[01:45:03] 
[01:45:03] ---- test::test_no_default_features stdout ----
[01:45:03] 	thread 'test::test_no_default_features' panicked at 'Hit timeout', src\tools\rls\src\test\harness.rs:189:12
[01:45:03] 
[01:45:03] 
[01:45:03] failures:
[01:45:03]     test::test_features
[01:45:03]     test::test_no_default_features
[01:45:03]     test::test_workspace_symbol
[01:45:03] 
[01:45:03] test result: FAILED. 23 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out
[01:45:03] 
[01:45:03] error: test failed, to rerun pass '--bin rls'
[01:45:03] 
[01:45:03] 
[01:45:03] command did not execute successfully: "C:\\projects\\rust\\build\\x86_64-pc-windows-msvc\\stage0/bin\\cargo.exe" "test" "--target" "x86_64-pc-windows-msvc" "--release" "--locked" "--color" "always" "--manifest-path" "C:\\projects\\rust\\src/tools/rls\\Cargo.toml"
[01:45:03] expected success, got: exit code: 101
[01:45:03] 
[01:45:03] 
[01:45:03] You can disable the tool in `src/tools/toolstate.toml`

@kennytm kennytm 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 Oct 14, 2017
@DSpeckhals
Copy link
Contributor Author

Hmmm...the test failures only happen when running the tests with x.py. Running with cargo test within the RLS works fine.

I know why test::test_features and test::test_no_default_features are failing (easy fix in src/Cargo.toml), but I'm unsure about test::test_workspace_symbol. It seems like a versioning mismatch with rls-data between rustc and rls. Again, this test is passing when running with nightly (10-13) on the RLS, but not with x.py. I'm not well-versed on the nuances between the test runners. Any help would be greatly appreciated.

@bors
Copy link
Contributor

bors commented Oct 14, 2017

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

@alexcrichton
Copy link
Member

Can you reproduce with ./x.py test src/tools/rls?

@DSpeckhals
Copy link
Contributor Author

Can you reproduce with ./x.py test src/tools/rls?

Yes.

But not while running cargo test within rls. I'm thinking it has something to do with which rustc is being run with the RLS. I've been trying to debug it.

@alexcrichton
Copy link
Member

Maybe other dependencies have a slightly different version? I've had great difficulty myself in debugging rls tests historically... I've found though that RUST_LOG tends to be helpful in diagnosing failures.

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 21, 2017
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Oct 23, 2017

📌 Commit 933b3fb has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Oct 23, 2017

⌛ Testing commit 933b3fbf9bdeb978f96132c959bf2042b4513c73 with merge 9569d3e0e27f939e9d05c6e44caf06bcf161e085...

@kennytm kennytm 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 Oct 24, 2017
@bors
Copy link
Contributor

bors commented Oct 24, 2017

💔 Test failed - status-travis

@kennytm
Copy link
Member

kennytm commented Oct 24, 2017

x86_64-gnu-aux failed, the RLS test test_bin_lib_project did not pass.

[01:35:39] test test::test_bin_lib_project has been running for over 60 seconds
[01:39:59] test test::test_bin_lib_project ... FAILED
[01:39:59]
[01:39:59] failures:
[01:39:59]
[01:39:59] ---- test::test_bin_lib_project stdout ----
[01:39:59] thread 'test::test_bin_lib_project' panicked at 'Hit timeout', /checkout/src/tools/rls/src/test/harness.rs:189:12
[01:39:59]
[01:39:59]
[01:39:59] failures:
[01:39:59] test::test_bin_lib_project
[01:39:59]
[01:39:59] test result: FAILED. 26 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
[01:39:59]
[01:39:59] error: test failed, to rerun pass '--bin rls'
[01:39:59]
[01:39:59]
[01:39:59] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/rls/Cargo.toml"
[01:39:59] expected success, got: exit code: 101
[01:39:59]
[01:39:59]
[01:39:59] You can disable the tool in `src/tools/toolstate.toml`

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

The failure is an intermittent timing issue with new tests in the RLS. See rust-lang/rls#524 for context.

Until the fix is made, would it be reasonable to mark the RLS as "Compiling" instead of "Testing" in src/tools/toolstate.toml?

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

bors commented Oct 24, 2017

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

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Oct 25, 2017

📌 Commit aba409c has been approved by alexcrichton

@kennytm kennytm 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 Oct 25, 2017
@bors
Copy link
Contributor

bors commented Oct 26, 2017

⌛ Testing commit aba409c with merge fa29bce...

bors added a commit that referenced this pull request Oct 26, 2017
…r=alexcrichton

Update rls-data for save analysis

rls-data: 0.10 -> 0.11

This will allow for more fine-grained save analysis for enum variants (tuple and struct).

The first commit updates rls-data, and makes the changes to dump_visitor. The second commit updates the rls submodule, and removes "members" that were deleted from that update in src/Cargo.toml.

Note, that when building the project, rustfmt-nightly was updated in Cargo.lock. If these changes should be excluded, I can revert it.

cc/ @nrc
@bors
Copy link
Contributor

bors commented Oct 26, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing fa29bce 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.

10 participants