-
Notifications
You must be signed in to change notification settings - Fork 166
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
Provide a command to easily install and update OmniSharp Roslyn #382
Conversation
This command currently only works on Linux, macOS, Cygwin and WSL. Windows support could be added in the future through the use of a simple PowerShell script. For the installation to take place the user will also have to have Curl installed on their machine. Running the command again will update the existing server, after stopping all running instances.
Great stuff @axvr, thanks! I do think it would be good to have the script locally in this repo, so future devs can easily modify it themselves if things change - and if anyone wants to write a Windows version then the two will be in the same place which will be helpful. As far as I know other O# editors already have their own versions of this - VSCode has some kind of install system and Emacs has also has a process for getting the latest roslyn. However if we add the script to this repo, we can always migrate it to a more generic OmniSharp repo later (perhaps even add it directly to OmniSharp-roslyn?). How does that sound to you? I think we should also make the installed server path |
Yeah, Emacs implemented something along those lines a little while ago: If it helps, here's their PR that added Windows support: OmniSharp/omnisharp-emacs#330 |
Thanks, this is really going to help people get up and running easily! |
@nickspoons, thanks! If I have time over the next couple of days I'll try and get around to:
|
@axvr I was actually just getting started on some of that now - not the Windows script but the other 3 points. I'm thinking of moving the default install location from I'll make a PR and you can tell me what you think. |
@nickspoons, great idea. I had originally used the location |
Nice work @axvr! I was starting to work on similar functionality, but you're much faster 😁 The direction I was going was extending the python part of the plugin to do the download & extraction, with the benefit being that it's cross-platform. If you're interested, I could look into integrating that as an alternative to figuring out a powershell install script? |
@stevearc, to be honest, I don't think it will take too long to write a PowerShell version of the install script because I believe that Microsoft have already implemented all of commands that are required for the installation. The script I created is was designed to be general purpose, it is capable of installing the mono version of the server, the standard version of the server, the HTTP version, and any previous releases of the server. This was done to allow it to be used in other OmniSharp editor plugins, especially as I wrote it in a language native to the *nix family of OSs, and was planning on writing a PowerShell variant for MS Windows. At the moment the script may not be of much use (except here), but if more editor plugins are created for other editors it may be useful. I had originally attempted to write the installer in vim script but I found that it was difficult to debug and made the code more complex than it needed to be (lots of But if you wan't to try writing it in Python instead, be my guest, I'll happily take an unbiased look at it. 🙂 |
Since you think the PS script won't be difficult, I'll leave you to it. Thanks again for adding this! |
Improve usability by adding a simple way of installing the OmniSharp Roslyn server.
This command currently only works on Linux, macOS, Cygwin and WSL. Windows support could be added in the future through the use of a simple PowerShell script.
For the installation to take place the user will also have to have Curl installed on their machine. This is intentional to avoid omnisharp-vim needing to know where it is installed to on the user's machine.
Running the command again will update the existing server, after stopping all running instances.
You may want to move the script used somewhere else (e.g. the OmniSharp GitHub organisation), if you are unhappy with it being in my personal repo. I have licenced the script under the Unlicence, so feel free to do so. The script could also be used in other OmniSharp editor plugins.
Potential enhancements could include:
g:OmniSharp_server_path
if server is found under the path which the installer installs it to.I am open to all suggestions and improvements :)