Skip to content

Commit e4286f0

Browse files
committed
Update to the latest omnisharp-roslyn version
- Update to 1.39.12 - Make `mono` optional
1 parent c5b87a7 commit e4286f0

File tree

3 files changed

+49
-34
lines changed

3 files changed

+49
-34
lines changed

build.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -903,44 +903,44 @@ def GetCsCompleterDataForPlatform():
903903
####################################
904904
DATA = {
905905
'win32': {
906-
'version': 'v1.37.11',
906+
'version': 'v1.39.12',
907907
'download_url': ( 'https://github.com/OmniSharp/omnisharp-roslyn/release'
908-
's/download/v1.37.11/omnisharp.http-win-x86.zip' ),
909-
'file_name': 'omnisharp.http-win-x86.zip',
910-
'check_sum': ( '461544056b144c97e8413de8c1aa1ddd9e2902f5a9f2223af8046d65'
911-
'4d95f2a0' ),
908+
's/download/v1.39.12/omnisharp-win-x86.zip' ),
909+
'file_name': 'omnisharp-win-x86.zip',
910+
'check_sum': ( '05ffec8d8b72831f9dab73bcaef373e35115ef5a68951c78283cedc5'
911+
'fb578ddf' ),
912912
},
913913
'win64': {
914-
'version': 'v1.37.11',
914+
'version': 'v1.39.12',
915915
'download_url': ( 'https://github.com/OmniSharp/omnisharp-roslyn/release'
916-
's/download/v1.37.11/omnisharp.http-win-x64.zip' ),
917-
'file_name': 'omnisharp.http-win-x64.zip',
918-
'check_sum': ( '7f6f0abfac00d028b90aaf1f56813e4fbb73d84bdf2c4704862aa976'
919-
'1b61a59c' ),
916+
's/download/v1.39.12/omnisharp-win-x64.zip' ),
917+
'file_name': 'omnisharp-win-x64.zip',
918+
'check_sum': ( 'a52562b44c9baa2811f0a617f182a5886bb79bb1532850827d89f173'
919+
'd8c962b6' ),
920920
},
921921
'macos': {
922-
'version': 'v1.37.11',
922+
'version': 'v1.39.12',
923923
'download_url': ( 'https://github.com/OmniSharp/omnisharp-roslyn/release'
924-
's/download/v1.37.11/omnisharp.http-osx.tar.gz' ),
925-
'file_name': 'omnisharp.http-osx.tar.gz',
926-
'check_sum': ( '84b84a8a3cb8fd3986ea795d9230457c43bf130b482fcb77fef57c67'
927-
'e151828a' ),
924+
's/download/v1.39.12/omnisharp-osx.tar.gz' ),
925+
'file_name': 'omnisharp-osx.tar.gz',
926+
'check_sum': ( '663807abcaa8524b7853803df12e02415376c73bcc93a76eb95d6361'
927+
'aa5aa59a' ),
928928
},
929929
'linux32': {
930-
'version': 'v1.37.11',
930+
'version': 'v1.39.12',
931931
'download_url': ( 'https://github.com/OmniSharp/omnisharp-roslyn/release'
932-
's/download/v1.37.11/omnisharp.http-linux-x86.tar.gz' ),
933-
'file_name': 'omnisharp.http-linux-x86.tar.gz',
934-
'check_sum': ( 'a5ab39380a5d230c75f08bf552980cdc5bd8c31a43348acbfa66f1f4'
935-
'6f12851f' ),
932+
's/download/v1.39.12/omnisharp-linux-x86.tar.gz' ),
933+
'file_name': 'omnisharp-linux-x86.tar.gz',
934+
'check_sum': ( 'd8f58e1f4e2ec68c19674b1d1ca377ee5acc19960802078a93c12919'
935+
'1aafc57a' ),
936936
},
937937
'linux64': {
938-
'version': 'v1.37.11',
938+
'version': 'v1.39.12',
939939
'download_url': ( 'https://github.com/OmniSharp/omnisharp-roslyn/release'
940-
's/download/v1.37.11/omnisharp.http-linux-x64.tar.gz' ),
941-
'file_name': 'omnisharp.http-linux-x64.tar.gz',
942-
'check_sum': ( '9a6e9a246babd777229eebb57f0bee86e7ef5da271c67275eae5ed9d'
943-
'7b0ad563' ),
940+
's/download/v1.39.12/omnisharp-linux-x64.tar.gz' ),
941+
'file_name': 'omnisharp-linux-x64.tar.gz',
942+
'check_sum': ( '759b45d4814c052d6dc4f43dbc779f6252dc5c1453556768369ee1fc'
943+
'dc6d79f5' ),
944944
},
945945
}
946946
if OnWindows():

update_omnisharp.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
"releases/{version}/{file_name}" ),
2424
}
2525
FILE_NAME = {
26-
'win32': 'omnisharp.http-win-x86.zip',
27-
'win64': 'omnisharp.http-win-x64.zip',
28-
'macos': 'omnisharp.http-osx.tar.gz',
29-
'linux32': 'omnisharp.http-linux-x86.tar.gz',
30-
'linux64': 'omnisharp.http-linux-x64.tar.gz',
26+
'win32': 'omnisharp-win-x86.zip',
27+
'win64': 'omnisharp-win-x64.zip',
28+
'macos': 'omnisharp-osx.tar.gz',
29+
'linux32': 'omnisharp-linux-x86.tar.gz',
30+
'linux64': 'omnisharp-linux-x64.tar.gz',
3131
}
3232

3333

ycmd/completers/cs/cs_completer.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
os.path.join( PATH_TO_ROSLYN_OMNISHARP, 'omnisharp', 'OmniSharp.exe' ) )
3939

4040

41+
def MonoRequired( roslyn_path: str ):
42+
return not utils.OnWindows() and roslyn_path.endswith( '.exe' )
43+
44+
4145
def ShouldEnableCsCompleter( user_options ):
4246
user_roslyn_path = user_options[ 'roslyn_binary_path' ]
4347
if user_roslyn_path and not os.path.isfile( user_roslyn_path ):
@@ -49,10 +53,17 @@ def ShouldEnableCsCompleter( user_options ):
4953
roslyn = user_roslyn_path
5054
else:
5155
roslyn = PATH_TO_OMNISHARP_ROSLYN_BINARY
52-
if roslyn:
53-
return True
54-
LOGGER.info( 'No mono executable at %s', mono )
55-
return False
56+
if not roslyn:
57+
return False
58+
59+
if MonoRequired( roslyn ):
60+
mono = FindExecutableWithFallback( user_options[ 'mono_binary_path' ],
61+
FindExecutable( 'mono' ) )
62+
if not mono:
63+
LOGGER.info( 'No mono executable at %s', mono )
64+
return False
65+
66+
return True
5667

5768

5869
class CsharpCompleter( language_server_completer.LanguageServerCompleter ):
@@ -62,6 +73,8 @@ def __init__( self, user_options ):
6273
self._roslyn_path = user_options[ 'roslyn_binary_path' ]
6374
else:
6475
self._roslyn_path = PATH_TO_OMNISHARP_ROSLYN_BINARY
76+
self._mono = FindExecutableWithFallback( user_options[ 'mono_binary_path' ],
77+
FindExecutable( 'mono' ) )
6578

6679

6780
def GetServerName( self ):
@@ -77,6 +90,8 @@ def GetCommandLine( self ):
7790
cmdline = [ self._roslyn_path, '-lsp' ]
7891
if utils.LOGGER.isEnabledFor( logging.DEBUG ):
7992
cmdline += [ '-v' ]
93+
if MonoRequired( self._roslyn_path ):
94+
cmdline.insert( 0, self._mono )
8095
return cmdline
8196

8297

0 commit comments

Comments
 (0)