-
Notifications
You must be signed in to change notification settings - Fork 770
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
[READY] Omnisharp roslyn #885
Conversation
Current status:
|
Codecov Report
@@ Coverage Diff @@
## master #885 +/- ##
==========================================
- Coverage 96.18% 96.13% -0.05%
==========================================
Files 83 83
Lines 6468 7098 +630
==========================================
+ Hits 6221 6824 +603
- Misses 247 274 +27 |
☔ The latest upstream changes (presumably #883) made this pull request unmergeable. Please resolve the merge conflicts. |
Thanks for once again investing the time into this. You're probably aware that we don't like the idea of supporting multiple engines for a single language. Reviewed 10 of 15 files at r1, 2 of 2 files at r2. build.py, line 499 at r3 (raw file):
Trailing spaces. ycmd/tests/cs/debug_info_test.py, line 59 at r3 (raw file):
Does roslyn actually have no logs? Comments from Reviewable |
Merge conflicts have been resolved. |
☔ The latest upstream changes (presumably #857) made this pull request unmergeable. Please resolve the merge conflicts. |
Merge conflicts have been resolved again. Could I get a review? Comments from Reviewable |
First, thank you for your patience and your effort. Here's what we all have been thinking about this. Supporting two C# servers would be a burden. Especially considering none of the maintainers is a C# developer. Maintaining two servers shall be hard. I'm also not sure what I think about the approach of trying and seeing which server works - using On the other hand Roslyn is supposed to have a LSP server capabilities and that should be fairly easy to use now that #857 has been merged. @micbou @puremourning and I have all been able to hack a random LSP server in a short amount of time. @puremourning @mispencer @Valloric @vheon Reviewed 1 of 15 files at r1, 2 of 3 files at r5, 1 of 2 files at r6, 3 of 4 files at r7, 8 of 8 files at r9. ycmd/completers/cs/cs_completer.py, line 36 at r9 (raw file):
Parentheses aren't needed here. ycmd/completers/cs/cs_completer.py, line 118 at r9 (raw file):
Are we sure this is a good idea? ycmd/tests/cs/init.py, line 65 at r9 (raw file):
Why does this need so many tries? ycmd/tests/cs/debug_info_test.py, line 59 at r3 (raw file): Previously, mispencer wrote…
I think it's preferable to have separate files for separate logs. Comments from Reviewable |
The double backend is needed for me because there were some legacy solutions, which I am actively working on, that I could not get Roslyn Omnisharp to work properly with, and there were some other newer solutions, which I am also actively working on, that the legacy Omnisharp could not open. Thus, to support all my use cases, YCMD needed to support both the legacy and Roslyn Omnisharp. Furthermore, there are still some features from the legacy Omnisharp which I would miss that are not supported in Roslyn Omnisharp. However, having said all that, I have noticed a issue which could have caused my issues with legacy solutions and it is supposedly fixed in the latest version (1.28). I will have to re-test. If bumping the Roslyn Omnisharp version resolves my issue, I would (reluctantly) consent to a single backend with Roslyn Omnisharp. LSP is still an open issue in Roslyn Omnisharp. I know the initial implementation was included in the latest beta of Roslyn Omnisharp, but I wasn't under the impression that it was stable yet. Though LSP may be a simple implementation, it would still a decent implementation effort, and I'm not sure what we would gain. The existing Omnisharp interface is not deprecated, and I don't believe it will be any time soon. Review status: 16 of 17 files reviewed at latest revision, 3 unresolved discussions. ycmd/completers/cs/cs_completer.py, line 36 at r9 (raw file): Previously, bstaletic (Boris Staletic) wrote…
Done. ycmd/completers/cs/cs_completer.py, line 118 at r9 (raw file): Previously, bstaletic (Boris Staletic) wrote…
Fast enough. It normally shows up by the time I type 3-4 characters, which is about the minimum needed to be typed to select the correct result anyway. Note, please, that this is the way that the C# completer currently works, so this would be expected behavior by anyone using the C# completion. See #116 for justification why it currently functions this way. ycmd/tests/cs/init.py, line 65 at r9 (raw file): Previously, bstaletic (Boris Staletic) wrote…
It probably doesn't need to so high. I'm pretty sure I just got frustrated by CI failures from timeout and set it to a excessively high number. Comments from Reviewable |
Apart from us not wanting to support two backends, this is the only concern left. I am not sure if we want to take features away from the users. Is there an effort to make FixIts work with Roslyn?
Alright, sounds good to me. I'm fine with sticking to this API. Review status: 16 of 17 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. ycmd/completers/cs/cs_completer.py, line 118 at r9 (raw file): Previously, mispencer wrote…
Alright, then I guess this is fine. ycmd/tests/cs/init.py, line 65 at r9 (raw file): Previously, mispencer wrote…
Okay. Can you add a comment stating this is because of the CI timing out? Comments from Reviewable |
I have opened a issue in Omnisharp-Roslyn (OmniSharp/omnisharp-roslyn#1098) about the fixits (code issues in Omnisharp jargon). We'll see what they say. Should I be concerned about the coverage failures? Review status: 15 of 17 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. ycmd/tests/cs/init.py, line 65 at r9 (raw file): Previously, bstaletic (Boris Staletic) wrote…
Done. Comments from Reviewable |
Thanks for opening the issue.
@puremourning @micbou @Valloric What are your opinions on this? On the other hand, testing on Cygwin means we actually support it, which hasn't been the case before.
Codecov has been reporting nonsense lately and we should probably start investigating. Reviewed 1 of 2 files at r10. ycmd/completers/cs/cs_completer.py, line 691 at r10 (raw file):
Last two parameters are misaligned. ycmd/completers/cs/cs_completer.py, line 805 at r10 (raw file):
Why is the second parameter called direction? ycmd/completers/cs/cs_completer.py, line 819 at r10 (raw file):
@micbou Were there any caveats/gotchas in using Comments from Reviewable |
If there is any interest in this, I can look into it.
I have made some changes to increase the coverage number, though I kinda feel I'm maximizing a measurement, rather than code quality. Review status: 14 of 17 files reviewed at latest revision, 3 unresolved discussions. ycmd/completers/cs/cs_completer.py, line 691 at r10 (raw file): Previously, bstaletic (Boris Staletic) wrote…
Done. ycmd/completers/cs/cs_completer.py, line 805 at r10 (raw file): Previously, bstaletic (Boris Staletic) wrote…
It's the direction of conversion (window-to-cygwin or cygwin-to-window). ycmd/completers/cs/cs_completer.py, line 819 at r10 (raw file): Previously, bstaletic (Boris Staletic) wrote…
I don't think any of those apply in Cygwin, which is the only OS this runs in. Comments from Reviewable |
Great, but let's not rush. I'd like to see what others have to say about it.
We shouldn't be trying to hide unlikely and uncovered branches with If you need something to return a specific value or throw a specific exception, python provides Here's an example of overridden Reviewed 3 of 3 files at r11. ycmd/completers/cs/cs_completer.py, line 805 at r10 (raw file): Previously, mispencer wrote…
It's still not clear which direction is which. So this would benefit a lot from a comment explaining what ycmd/completers/cs/cs_completer.py, line 819 at r10 (raw file): Previously, mispencer wrote…
That might as well be true, I know next to nothing about Cygwin. For reference: #785 (comment) Comments from Reviewable |
Re: Cygwin You won't be surprised to hear that I have no particular interest in supporting Cygwin, and personally see it as more things I have to worry about for future changes. But that's a super selfish viewpoint and should not be taken seriously :) What I would say IMO is that we should only support Cygwin (properly) if the maintenance burden is low, and that we have good evidence that we have strong demand for it, and a ahem willing volunteer to own the integration and maintenance. We currently support it on a best-efforts basis, but if that's not enough then it is worth a discussion. Reviewed 2 of 15 files at r1. appveyor.yml, line 8 at r5 (raw file):
we can probably remove these lines. i have no issue with dropping older msvc as it is trivial to acquire new versions and you can aiui have multiple versions installed. build.py, line 85 at r5 (raw file):
is this adding support for cygwin ? My recollection is that we don't (officially) support it. if so is there value in doing that in a different PR ? build.py, line 164 at r5 (raw file):
i'm not clear why this is necessary. build.py, line 283 at r5 (raw file):
if we are really going to support two completers in parallel i wonder if it would be better to use build.py, line 551 at r5 (raw file):
don't we already use 7zip in the make? I seem to recall that we don't have to look in the registry for this? build.py, line 555 at r5 (raw file):
what's extract command on linux/macOS? ycmd/completers/cs/cs_completer.py, line 59 at r5 (raw file):
Any reason not to use ycmd/completers/cs/cs_completer.py, line 207 at r5 (raw file):
is there really a need to support both engines and toggle between them? this sounds painfully coplicated and worse, how many users are really going to understand this and be able to actually do it? ci/travis/travis_install.linux.sh, line 29 at r5 (raw file):
80 characters ci/travis/travis_install.linux.sh, line 36 at r5 (raw file):
what sets i suspect we really want Comments from Reviewable |
Review status: all files reviewed at latest revision, 12 unresolved discussions, some commit checks failed. ci/travis/travis_install.linux.sh, line 36 at r5 (raw file): Previously, puremourning (Ben Jackson) wrote…
For the record Comments from Reviewable |
☔ The latest upstream changes (presumably #924) made this pull request unmergeable. Please resolve the merge conflicts. |
Closing PR as it's not moving forward; can reopen in the future if desired. |
I doubt there are very many C# developers who would be content to use a version of C# that is several years old just to be able to use fixits. |
See #213 for prior pull request.
Allow using omnisharp-roslyn. See #209 (comment).
This pull request does not make roslyn the default (yet). Rather, it must be switched to the roslyn implementation by running the
UseRoslynOmnisharp
completer subcommand. This is per-solution, and pre-runtime.This change is