-
Notifications
You must be signed in to change notification settings - Fork 253
Implement hover subcommand for #292 #301
Conversation
|
I tested this manually and could only get the following response regardless of (line,col): Is this not implemented or is my current implementation missing something? |
|
It is implemented and ought to work - you'll need to give exactly the right location for a ref (this can be surprisingly difficult, and I think both row and col are 0-indexed, but maybe they are 1-indexed?). Its also possible this is broken in the current nightly if you are using today's (I thought it wouldn't be, but I'm not sure if a PR landed in time or not). |
|
The code looks good - I'm somewhat reluctant to merge it if it doesn't work, but I don't see where it could be going wrong. |
|
I would agree to not merge it until it's working. I submitted the PR just to make sure that a) it didn't forgotten amongst everything else I'm working on and b) to get other eyes to see if I was doing something obviously wrong. Also, it seems that the tests are failing before this commit as well. I checked out the previous commit and ran the tests. It's always crashing trying to run the second test. |
|
This should work now, will need rebasing on top of #300 |
|
Testing this with I've checked lines 15 and 16 columns 0-18 and they all return the same thing. 15,14 is the only combination that returns a result for Edit: This is on OS X 10.11.6 (El Capitan), rust latest nightly with |
|
@Nashenas88 so just to clarify: are you saying that And |
|
@nrc I intended to write that (15,14) is the first spot on that one line that It does work in multiple other spots in the file. In all cases I've just tried it again with the nightly from tonight, but haven't attempted a new rebase of rls tonight. It has the same results. It was rebased on current master and nightly when I wrote the previous comment, and it had the changes from #300 in the rebase. I was busy tonight so I couldn't investigate additionally, but I'll try looking into it late tomorrow night or sometime Saturday. |
|
OK, that sounds good in some respects and weird in others - I don't see how we could pass the hover test, but not have this work. Let me know if you get stuck investigating and I can also take a look. |
|
I rabbit-holed too much on Saturday trying to get gdb to work with the test. Sunday was busy due to Mother's day. This morning I dug a little more, and I'm still confused. Before serialization they're both sending exactly the same piece of data. I need to debug at the point where the server is receiving the call to see what the difference is. It could also be how I'm parsing the return somehow... I won't have time to look at this again until after work. |
|
I haven't had more than 30 minutes at a time to look at this, but I've found one difference so far. In @nrc Is there something else I'm missing when calling the cli version? I'm executing it like so: |
|
So it sounds like you might be querying before the build and analysis is finished - do you see the 'build done' notification? You'll need |
|
So, interestingly, running with or without the I'll rebase against latest, retest and then I think this should be good to go. Sorry for the long, overly complicated delay. |
|
@nrc This is ready to go now. |
|
Thanks for sticking with it! Looks good |
Implement hover subcommand for #292