-
Notifications
You must be signed in to change notification settings - Fork 256
hover tests test_tooltip #1151
Comments
I believe @alexcrichton added the The recent failing tests were legitimate and mostly due to the save-analysis generation being broken for a month or so. I think one failing test was also due to a change in the docs (and a trait link now correctly being returned). I'm not certain about the test hanging when run in isolation. I know they didn't used to do that (I ran them in isolation many times in the past). I suspect it's Racer, but that still doesn't explain why it would only happen when run in isolation. |
I think there's some hover functionality coverage in the |
@aloucks that sounds good thanks! |
I remember now why it was setup as a single test with multiple checks -- it would have had to re-build the test project for every single test case, which would likely be even slower. I considered some kind of global/run-once for a single build but that seemed even less ideal. I found where it's hanging (it's waiting for the build to complete), but I can't explain why it's only happening when running the test in isolation. I see there were some recent changes to the way that Line 1213 in 1c755ef
|
I found the issue causing the test to hang when run alone -- it's unable to build the hover test project. The debug output showed that it was trying to use the rls test binary in place of Lines 45 to 47 in f75e68b
I must have been running |
I want to add some more tests that cover the cases that the current |
Great thanks @aloucks. I can run this test on it's own now with I think it'll help to have as many of these tests as possible running in rust-lang/rust and when regular devs run |
I think that sounds good. I wasn't able to spend as much time on it as I had hoped to last weekend. A few things:
|
Ok I've raised #1175 now splitting the tooltip harness into two. I've also been trying to get to the bottom of the windows errors and have made a little progress. @aloucks for 1. I've just moved the latter parts of test_tooltip_mod_use_external.rs into I think rust changes have broken clippy now, but otherwise does the pr look ok to you? |
@alexheretic Yeah, I got hung-up on clippy too. The PR looks good 👍 |
I wonder if we should split out tests that require racer fallback to work too, this might speed debugging. |
@alexheretic I think that'd be valuable for sure! I'm quite puzzled why macOS tests fail intermittently https://travis-ci.org/rust-lang/rls/jobs/468945232. Any ideas? Sometimes it's 4 tests, sometimes it's 6 tests (or even different count?). The thing is, the analysis should be ready and data should be accurate. Is formatter the culprit? Do we race? Glancing through the code, I'd say Line 1311 in 6844569
should be enough? Any ideas? 😢 |
The drop impl Line 79 in 6844569
Which is otherwise possible as a race condition. I don't understand the cause of the mac test failures and I can't test manually on that platform. I think this shows we need to improve the test so that it gives us as clear an indication as possible of what the root cause is. Clarifying tests that rely on analysis OR racer may help, as if the tests are unexpectedly failing analysis and using racer then the root cause is an issue with analysis and the diff won't help. Is using the field name
|
I think so, yeah - Racer shows span from definition site ( |
@alexheretic could we explicitly disable any Racer fallback for these tests or split them, as you're saying? |
Yes we can and I think we should. I did start experimenting with this, but nightly/clippy issues dampened my efforts at the time. If everything is compiling and the tests are passing; disabling |
Disabled
Full report:
|
Those 2 are from the "std" test run, also 6 from the main run failed:
|
I can try to help you dig into this if you'd like. I'm not super familiar with RLS, but I am familiar with Cargo and use MacOS mostly. Here's traces of a successful and failed runs: success and failure There are a bunch of differences between them, and I noticed the failed case is using a racer fallback, but I have no idea how it decides to do that. One thing I noticed is that it is compiling the diff --git a/src/actions/hover.rs b/src/actions/hover.rs
index a7df910..ef2a6b9 100644
--- a/src/actions/hover.rs
+++ b/src/actions/hover.rs
@@ -1191,6 +1191,7 @@ pub mod test {
related_information_support: true,
};
let mut config = config::Config::default();
+ config.all_targets = false;
let temp_dir = tempfile::tempdir().unwrap().into_path();
config.target_dir = config::Inferrable::Specified(Some(temp_dir.clone())); and it made the problem go away. That may not be directly helpful, but maybe it is a clue? Since it is compiling |
Thanks @ehuss that's interesting. Actually it seems fine to disable The racer fallback triggers when the analysis method fails, so if another build has started concurrently with the hover call that could make sense. |
More details here: rust-lang#1151 (comment)
I think this issue is pretty much done. The only improvement left to do is moving as much out of the ignored tests as possible, leaving these as std testing only. Thanks guys! |
What's the deal with this multi-test. It's been failing a bunch lately, but generally for pretty good reasons as far as I can see. However, we don't run this test upstream which means it doesn't prevent any regressions.
RUSTFLAGS=--cfg=enable_tooltip_tests
is horrible, changing that env causes recompilation of all dependencies. A feature would have been better... but see my first point.@nrc @Xanewok @aloucks
The text was updated successfully, but these errors were encountered: