From 69f902515f908f8b42f7af0adaaf7149f141bf4f Mon Sep 17 00:00:00 2001 From: Boris Staletic Date: Wed, 12 Jun 2024 08:04:47 +0200 Subject: [PATCH] Upgrade completers - JDT v1.31.0 - R-A 2024-06-11 - TSServer 5.4.5 - Gopls 0.15.3 --- build.py | 10 ++--- third_party/tsserver/package.json | 2 +- ycmd/tests/java/subcommands_test.py | 22 +++++----- ycmd/tests/rust/diagnostics_test.py | 52 ++++++++++++++++++++++- ycmd/tests/typescript/diagnostics_test.py | 4 +- 5 files changed, 69 insertions(+), 21 deletions(-) diff --git a/build.py b/build.py index 2fac005663..ba1868ff1e 100755 --- a/build.py +++ b/build.py @@ -89,13 +89,13 @@ def Exit( self ): )$ """ -JDTLS_MILESTONE = '1.31.0' -JDTLS_BUILD_STAMP = '202401111522' +JDTLS_MILESTONE = '1.36.0' +JDTLS_BUILD_STAMP = '202405301306' JDTLS_SHA256 = ( - '6c25f62d0b74d1dd92ab19afbafbe5041eb06c2b853eab57f7f42fe6feb01f7c' + '028e274d06f4a61cad4ffd56f89ef414a8f65613c6d05d9467651b7fb03dae7b' ) -DEFAULT_RUST_TOOLCHAIN = 'nightly-2023-08-18' +DEFAULT_RUST_TOOLCHAIN = 'nightly-2024-06-11' RUST_ANALYZER_DIR = p.join( DIR_OF_THIRD_PARTY, 'rust-analyzer' ) BUILD_ERROR_MESSAGE = ( @@ -945,7 +945,7 @@ def EnableGoCompleter( args ): new_env.pop( 'GOROOT', None ) new_env[ 'GOBIN' ] = p.join( new_env[ 'GOPATH' ], 'bin' ) - gopls = 'golang.org/x/tools/gopls@v0.14.0' + gopls = 'golang.org/x/tools/gopls@v0.15.3' CheckCall( [ go, 'install', gopls ], env = new_env, quiet = args.quiet, diff --git a/third_party/tsserver/package.json b/third_party/tsserver/package.json index 6e44a76e2d..402b5a9040 100644 --- a/third_party/tsserver/package.json +++ b/third_party/tsserver/package.json @@ -1,6 +1,6 @@ { "description": "ycmd tsserver runtime area with required typescript version and plugins", "dependencies": { - "typescript": "5.1.6" + "typescript": "5.4.5" } } diff --git a/ycmd/tests/java/subcommands_test.py b/ycmd/tests/java/subcommands_test.py index deefadce41..3edefb1d08 100644 --- a/ycmd/tests/java/subcommands_test.py +++ b/ycmd/tests/java/subcommands_test.py @@ -695,15 +695,10 @@ def test_Subcommands_GoToReferences_MultipleProjects( self, app ): { 'response': requests.codes.ok, 'data': contains_inanyorder( - # NOTE: Yes, jdt doubles the references in the second project. LocationMatcher( abstract_test_widget, 10, 15 ), LocationMatcher( test_factory, 28, 9 ), LocationMatcher( test_launcher, 32, 11 ), LocationMatcher( test_widget_impl, 18, 15 ), - LocationMatcher( abstract_test_widget, 10, 15 ), - LocationMatcher( test_factory, 28, 9 ), - LocationMatcher( test_launcher, 32, 11 ), - LocationMatcher( test_widget_impl, 18, 15 ) ) } ), ]: @@ -1193,7 +1188,7 @@ def test_Subcommands_FixIt_SingleDiag_MultipleOption_Insertion( self, app ): } ), has_entries( { 'kind': 'quickassist', - 'text': "Add Javadoc for 'Wimble'" + 'text': "Add Javadoc comment" } ), has_entries( { 'text': "Sort Members for 'TestFactory.java'" @@ -1264,7 +1259,7 @@ def test_Subcommands_FixIt_SingleDiag_SingleOption_Modify( self, app ): ), } ), has_entries( { - 'text': "Add Javadoc for 'getWidget'" + 'text': "Add Javadoc comment" } ), has_entries( { 'text': "Sort Members for 'TestFactory.java'" @@ -1337,7 +1332,7 @@ def test_Subcommands_FixIt_SingleDiag_MultiOption_Delete( self, app ): } ), has_entries( { 'kind': 'quickassist', - 'text': "Add Javadoc for 'testString'", + 'text': "Add Javadoc comment", 'chunks': instance_of( list ) } ), has_entries( { @@ -1346,6 +1341,9 @@ def test_Subcommands_FixIt_SingleDiag_MultiOption_Delete( self, app ): has_entries( { 'text': "Add all missing imports" } ), + has_entries( { + 'text': "Add @SuppressWarnings 'unused' to 'testString'" + } ), ) } ) @@ -1425,7 +1423,7 @@ def test_Subcommands_FixIt_MultipleDiags( self, app ): 'chunks': instance_of( list ), } ), has_entries( { - 'text': "Add Javadoc for 'getWidget'", + 'text': "Add Javadoc comment", 'chunks': instance_of( list ), } ), has_entries( { @@ -1559,7 +1557,7 @@ def test_Subcommands_FixIt_Range( self, app ): 'chunks': instance_of( list ), } ), has_entries( { - 'text': "Add Javadoc for 'launch'", + 'text': "Add Javadoc comment", 'chunks': instance_of( list ), } ), has_entries( { @@ -1658,7 +1656,7 @@ def test_Subcommands_FixIt_Unicode( self, app ): 'chunks': instance_of( list ), } ), has_entries( { - 'text': "Add Javadoc for 'DoWhatever'" + 'text': "Add Javadoc comment" } ), has_entries( { 'text': "Sort Members for 'Test.java'", @@ -1725,7 +1723,7 @@ def test_Subcommands_FixIt_InvalidURI( self, app ): ), } ), has_entries( { - 'text': "Add Javadoc for 'getWidget'" + 'text': "Add Javadoc comment" } ), has_entries( { 'text': "Sort Members for 'TestFactory.java'" diff --git a/ycmd/tests/rust/diagnostics_test.py b/ycmd/tests/rust/diagnostics_test.py index 9fe9d1a5a5..25c2254f20 100644 --- a/ycmd/tests/rust/diagnostics_test.py +++ b/ycmd/tests/rust/diagnostics_test.py @@ -38,6 +38,7 @@ MAIN_FILEPATH = PathToTestFile( 'common', 'src', 'main.rs' ) +TEST_FILEPATH = PathToTestFile( 'common', 'src', 'test.rs' ) DIAG_MATCHERS_PER_FILE = { MAIN_FILEPATH: contains_inanyorder( has_entries( { @@ -50,7 +51,55 @@ ( 14, 13 ), ( 14, 19 ) ) ), 'fixit_available': False - } ) + } ), + has_entries( { + 'kind': 'WARNING', + 'text': 'unused variable: `a`\n`#[warn(unused_variables)]` ' + 'on by default [unused_variables]', + 'location': LocationMatcher( MAIN_FILEPATH, 20, 9 ), + 'location_extent': RangeMatcher( MAIN_FILEPATH, ( 20, 9 ), ( 20, 10 ) ), + 'ranges': contains_exactly( RangeMatcher( MAIN_FILEPATH, + ( 20, 9 ), + ( 20, 10 ) ) ), + 'fixit_available': False + } ), + has_entries( { + 'kind': 'HINT', + 'text': 'if this is intentional, ' + 'prefix it with an underscore: `_a` [unused_variables]', + 'location': LocationMatcher( MAIN_FILEPATH, 20, 9 ), + 'location_extent': RangeMatcher( MAIN_FILEPATH, ( 20, 9 ), ( 20, 10 ) ), + 'ranges': contains_exactly( RangeMatcher( MAIN_FILEPATH, + ( 20, 9 ), + ( 20, 10 ) ) ), + 'fixit_available': False + } ), + ), + TEST_FILEPATH: contains_inanyorder( + has_entries( { + 'kind': 'WARNING', + 'text': 'function cannot return without recursing\n' + 'a `loop` may express intention better if this is ' + 'on purpose\n' + '`#[warn(unconditional_recursion)]` on by default ' + '[unconditional_recursion]', + 'location': LocationMatcher( TEST_FILEPATH, 11, 1 ), + 'location_extent': RangeMatcher( TEST_FILEPATH, ( 11, 1 ), ( 11, 14 ) ), + 'ranges': contains_exactly( RangeMatcher( TEST_FILEPATH, + ( 11, 1 ), + ( 11, 14 ) ) ), + 'fixit_available': False + } ), + has_entries( { + 'kind': 'HINT', + 'text': 'recursive call site [unconditional_recursion]', + 'location': LocationMatcher( TEST_FILEPATH, 14, 5 ), + 'location_extent': RangeMatcher( TEST_FILEPATH, ( 14, 5 ), ( 14, 15 ) ), + 'ranges': contains_exactly( RangeMatcher( TEST_FILEPATH, + ( 14, 5 ), + ( 14, 15 ) ) ), + 'fixit_available': False + } ), ) } @@ -102,6 +151,7 @@ def test_Diagnostics_FileReadyToParse( self, app ): assert_that( results, DIAG_MATCHERS_PER_FILE[ filepath ] ) + @WithRetry() @SharedYcmd def test_Diagnostics_Poll( self, app ): project_dir = PathToTestFile( 'common' ) diff --git a/ycmd/tests/typescript/diagnostics_test.py b/ycmd/tests/typescript/diagnostics_test.py index 0c519eae3a..97cb12b722 100644 --- a/ycmd/tests/typescript/diagnostics_test.py +++ b/ycmd/tests/typescript/diagnostics_test.py @@ -70,9 +70,9 @@ def test_Diagnostics_FileReadyToParse( self, app ): 'kind': 'ERROR', 'text': 'Expected 1-2 arguments, but got 0.', 'location': LocationMatcher( filepath, 37, 5 ), - 'location_extent': RangeMatcher( filepath, ( 37, 5 ), ( 37, 12 ) ), + 'location_extent': RangeMatcher( filepath, ( 37, 5 ), ( 37, 10 ) ), 'ranges': contains_exactly( - RangeMatcher( filepath, ( 37, 5 ), ( 37, 12 ) ) ), + RangeMatcher( filepath, ( 37, 5 ), ( 37, 10 ) ) ), 'fixit_available': False } ), has_entries( {