ycmd icon indicating copy to clipboard operation
ycmd copied to clipboard

Try starting Omnisharp server without solution file

Open sankhesh opened this issue 2 years ago • 9 comments

With this change, ycmd will attempt to start the Omnisharp server with the current working directory when no solution file is found. The runtime check for solution file presence is not required and exception raising is defered to Omnisharp.


This change is Reviewable

sankhesh avatar Oct 12 '22 13:10 sankhesh

@sankhesh can you given an example of a specific problem that this solves?

@mispencer WDYT?

puremourning avatar Oct 12 '22 13:10 puremourning

@puremourning Currently, ycmd checks for a solution file in the module configuration and current working directory and starts the Omnisharp server iff a solution file exists.

However, it is common for C# projects (Unity projects, for example) to not have a VS solution file to go with. Secondly, Onmisharp doesn't really require a solution file anymore. It just needs a working directory which is what the change provides.

Hth

sankhesh avatar Oct 12 '22 13:10 sankhesh

Thanks,

Can we please add a test directory and some tests that show it works? Hopefully just a simple project without a solution file and basic tests. We have test primitives for things like StartCompleterServerInDirectory or something.

Otherwise, I'm likely to just break this as I don't c# often

puremourning avatar Oct 12 '22 14:10 puremourning

Yeah - the test failure in CI is related to this feature. I'll fix the tests so that it provides sufficient testing for this feature as well.

Btw, can you label this PR as "hacktoberfest-accepted". Might as well :)

sankhesh avatar Oct 12 '22 15:10 sankhesh

Btw, can you label this PR as "hacktoberfest-accepted". Might as well :)

I don't know what that means but if you need me to do something for you to earn internet points, then let me know and I guess I can do it if it isn't too much effort.

puremourning avatar Oct 12 '22 15:10 puremourning

Ah, I see. Hacktoberfest is a fun month-long fest that rewards open source contributors. To claim this PR as a valid contribution, a maintainer (I assume you're one) would need to label this PR with the text hacktoberfest-accepted.

sankhesh avatar Oct 12 '22 15:10 sankhesh

@Mergifyio rebase

puremourning avatar Jan 09 '23 19:01 puremourning

⚠️ This pull request got rebased on behalf of a random user of the organization. This behavior will change on the 1st February 2023, Mergify will pick the author of the pull request instead.

To get the future behavior now, you can configure bot_account options (e.g.: bot_account: { author } or update_bot_account: { author }.

Or you can create a dedicated github account for squash and rebase operations, and use it in different bot_account options.

mergify[bot] avatar Jan 09 '23 19:01 mergify[bot]

rebase

✅ Branch has been successfully rebased

mergify[bot] avatar Jan 09 '23 19:01 mergify[bot]