Skip to content

Commit

Permalink
Merge pull request #1693 from puremourning/update-jdtls
Browse files Browse the repository at this point in the history
Update to JDTLS 1.23.0
  • Loading branch information
mergify[bot] committed May 9, 2023
2 parents 157e818 + 3fac49e commit e1d867a
Show file tree
Hide file tree
Showing 14 changed files with 148 additions and 31 deletions.
6 changes: 3 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ def Exit( self ):
)$
"""

JDTLS_MILESTONE = '1.14.0'
JDTLS_BUILD_STAMP = '202207211651'
JDTLS_MILESTONE = '1.23.0'
JDTLS_BUILD_STAMP = '202304271346'
JDTLS_SHA256 = (
'4978ee235049ecba9c65b180b69ef982eedd2f79dc4fd1781610f17939ecd159'
'2363d8c01d5a8260a3d55f8fa008828d26a7b0acf9b173fafca4471ee81a701f'
)

RUST_TOOLCHAIN = 'nightly-2022-08-17'
Expand Down
4 changes: 2 additions & 2 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
os.pathsep +
p.join( DIR_OF_THIRD_PARTY, 'jedi_deps', 'numpydoc' ) )

LOMBOK_VERSION = '1.18.16'
LOMBOK_VERSION = '1.18.26'


def DownloadFileTo( download_url, file_path ):
Expand Down Expand Up @@ -355,7 +355,7 @@ def SetUpJavaCompleter():

jar_name = f'lombok-{ LOMBOK_VERSION }.jar'
url = (
f'https://github.com/ycm-core/llvm/releases/download/14.0.5/{ jar_name }'
f'https://github.com/ycm-core/llvm/releases/download/16.0.1/{ jar_name }'
)
file_name = p.join( CACHE, jar_name )

Expand Down
2 changes: 1 addition & 1 deletion third_party/watchdog_deps/watchdog
Submodule watchdog updated 70 files
+29 −16 .github/workflows/build-and-publish.yml
+87 −35 .github/workflows/tests.yml
+2 −0 .gitignore
+5 −0 .isort.cfg
+1 −0 AUTHORS
+3 −0 MANIFEST.in
+5 −32 README.rst
+62 −0 changelog.rst
+0 −102 docs/_fsevents.pyx
+0 −143 docs/echo.py.txt
+24 −22 docs/source/conf.py
+0 −2 docs/source/examples/logger.py
+4 −5 docs/source/examples/patterns.py
+0 −2 docs/source/examples/simple.py
+2 −12 docs/source/global.rst.inc
+3 −8 docs/source/index.rst
+3 −21 docs/source/installation.rst
+17 −0 mypy.ini
+4 −1 requirements-tests.txt
+102 −98 setup.py
+0 −2 src/watchdog/__init__.py
+86 −55 src/watchdog/events.py
+15 −9 src/watchdog/observers/__init__.py
+14 −10 src/watchdog/observers/api.py
+44 −37 src/watchdog/observers/fsevents.py
+70 −54 src/watchdog/observers/fsevents2.py
+28 −15 src/watchdog/observers/inotify.py
+23 −10 src/watchdog/observers/inotify_buffer.py
+109 −72 src/watchdog/observers/inotify_c.py
+48 −55 src/watchdog/observers/kqueue.py
+19 −18 src/watchdog/observers/polling.py
+22 −23 src/watchdog/observers/read_directory_changes.py
+63 −40 src/watchdog/observers/winapi.py
+0 −0 src/watchdog/py.typed
+162 −64 src/watchdog/tricks/__init__.py
+34 −24 src/watchdog/utils/__init__.py
+2 −2 src/watchdog/utils/bricks.py
+10 −8 src/watchdog/utils/delayed_queue.py
+18 −13 src/watchdog/utils/dirsnapshot.py
+34 −28 src/watchdog/utils/echo.py
+56 −0 src/watchdog/utils/event_debouncer.py
+15 −7 src/watchdog/utils/patterns.py
+10 −10 src/watchdog/utils/platform.py
+2 −1 src/watchdog/utils/process_watcher.py
+6 −6 src/watchdog/version.py
+405 −274 src/watchdog/watchmedo.py
+0 −2 tests/__init__.py
+35 −9 tests/conftest.py
+6 −2 tests/markers.py
+15 −16 tests/shell.py
+186 −79 tests/test_0_watchmedo.py
+5 −4 tests/test_delayed_queue.py
+325 −283 tests/test_emitter.py
+40 −26 tests/test_events.py
+98 −101 tests/test_fsevents.py
+48 −42 tests/test_inotify_buffer.py
+55 −70 tests/test_inotify_c.py
+21 −22 tests/test_logging_event_handler.py
+22 −20 tests/test_observer.py
+22 −29 tests/test_observers_api.py
+37 −54 tests/test_observers_polling.py
+47 −51 tests/test_observers_winapi.py
+57 −63 tests/test_pattern_matching_event_handler.py
+64 −27 tests/test_patterns.py
+63 −74 tests/test_regex_matching_event_handler.py
+15 −14 tests/test_skip_repeats_queue.py
+80 −81 tests/test_snapshot_diff.py
+109 −0 tests/utils.py
+5 −6 tools/dump_fsevents_constants.py
+38 −2 tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,7 @@ def ConvertNotificationToMessage( self, request_data, notification ):
try:
filepath = lsp.UriToFilePath( uri )
except lsp.InvalidUriException:
LOGGER.exception( 'Ignoring diagnostics for unrecognized URI' )
LOGGER.debug( 'Ignoring diagnostics for unrecognized URI %s', uri )
return None

with self._server_info_mutex:
Expand Down
5 changes: 5 additions & 0 deletions ycmd/completers/language_server/language_server_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ def Initialize( request_id, project_directory, extra_capabilities, settings ):
'plaintext',
'markdown'
],
# Buggy servers (jdt.ls) now require this to be set even though it's
# the historical default
'resolveSupport': {
'properties': [ 'documentation', 'detail' ]
},
},
},
'documentSymbol': {
Expand Down
1 change: 1 addition & 0 deletions ycmd/tests/java/diagnostics_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def ProjectPath( *args ):
'Test.java' )

DIAG_MATCHERS_PER_FILE = {
PathToTestFile( DEFAULT_PROJECT_DIR ): empty(),
TestFactory: contains_inanyorder(
has_entries( {
'kind': 'WARNING',
Expand Down
107 changes: 87 additions & 20 deletions ycmd/tests/java/subcommands_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ def test_Subcommands_GoToReferences_MultipleProjects( self, app ):
'response': requests.codes.ok,
'data': contains_inanyorder(
LocationMatcher( filepath, 8, 35 ),
LocationMatcher( filepath, 5, 21 ),
LocationMatcher( PathToTestFile( 'multiple_projects',
'src',
'input',
Expand Down Expand Up @@ -662,26 +663,47 @@ def test_Subcommands_GoToReferences( self, app ):

response = app.post_json( '/run_completer_command', event_data ).json

assert_that( response, contains_exactly( has_entries( {
'filepath': PathToTestFile( 'simple_eclipse_project',
'src',
'com',
'test',
'TestFactory.java' ),
'column_num': 9,
'description': " w.doSomethingVaguelyUseful();",
'line_num': 28
} ),
has_entries( {
'filepath': PathToTestFile( 'simple_eclipse_project',
'src',
'com',
'test',
'TestLauncher.java' ),
'column_num': 11,
'description': " w.doSomethingVaguelyUseful();",
'line_num': 32
} ) ) )
assert_that( response, contains_inanyorder(
has_entries( {
'filepath': PathToTestFile( 'simple_eclipse_project',
'src',
'com',
'test',
'AbstractTestWidget.java' ),
'column_num': 15,
'description': " public void doSomethingVaguelyUseful();",
'line_num': 10
} ),
has_entries( {
'filepath': PathToTestFile( 'simple_eclipse_project',
'src',
'com',
'test',
'TestFactory.java' ),
'column_num': 9,
'description': " w.doSomethingVaguelyUseful();",
'line_num': 28
} ),
has_entries( {
'filepath': PathToTestFile( 'simple_eclipse_project',
'src',
'com',
'test',
'TestLauncher.java' ),
'column_num': 11,
'description': " w.doSomethingVaguelyUseful();",
'line_num': 32
} ),
has_entries( {
'filepath': PathToTestFile( 'simple_eclipse_project',
'src',
'com',
'test',
'TestWidgetImpl.java' ),
'column_num': 15,
'description': " public void doSomethingVaguelyUseful() {",
'line_num': 20
} ) ) )


@WithRetry()
Expand Down Expand Up @@ -1093,6 +1115,16 @@ def test_Subcommands_FixIt_SingleDiag_MultipleOption_Insertion( self, app ):
'kind': 'quickassist',
'text': "Add Javadoc for 'Wimble'"
} ),
has_entries( {
'text': "Sort Members for 'TestFactory.java'"
} ),
has_entries( {
'text': "Add all missing imports"
} ),
# NOTE: bug (it seems) in jdt.ls, reports this code action 2x
has_entries( {
'text': "Add all missing imports"
} ),
)
} )

Expand Down Expand Up @@ -1154,6 +1186,12 @@ def test_Subcommands_FixIt_SingleDiag_SingleOption_Modify( self, app ):
has_entries( {
'text': "Add Javadoc for 'getWidget'"
} ),
has_entries( {
'text': "Sort Members for 'TestFactory.java'"
} ),
has_entries( {
'text': "Add all missing imports"
} ),
)
} )

Expand Down Expand Up @@ -1222,6 +1260,12 @@ def test_Subcommands_FixIt_SingleDiag_MultiOption_Delete( self, app ):
'text': "Add Javadoc for 'testString'",
'chunks': instance_of( list )
} ),
has_entries( {
'text': "Sort Members for 'TestFactory.java'"
} ),
has_entries( {
'text': "Add all missing imports"
} ),
)
} )

Expand Down Expand Up @@ -1304,6 +1348,12 @@ def test_Subcommands_FixIt_MultipleDiags( self, app ):
'text': "Add Javadoc for 'getWidget'",
'chunks': instance_of( list ),
} ),
has_entries( {
'text': "Sort Members for 'TestFactory.java'"
} ),
has_entries( {
'text': "Add all missing imports"
} ),
]

FIXITS = {
Expand Down Expand Up @@ -1432,6 +1482,9 @@ def test_Subcommands_FixIt_Range( self, app ):
'text': "Add Javadoc for 'launch'",
'chunks': instance_of( list ),
} ),
has_entries( {
'text': "Sort Members for 'TestLauncher.java'"
} ),
)
} )
}
Expand All @@ -1448,12 +1501,17 @@ def test_Subcommands_FixIt_NoDiagnostics( self, app ):
'test',
'TestFactory.java' )

# No FixIts is no lonber possible due to .. well all this crap
RunFixItTest( app, "no FixIts means you gotta code it yo' self",
filepath, 1, 1, has_entries( {
'fixits': contains_inanyorder(
has_entries( {
'text': 'Change modifiers to final where possible',
'chunks': instance_of( list ) } ),
has_entries( {
'text': "Sort Members for 'TestFactory.java'" } ),
has_entries( {
'text': "Add all missing imports" } ),
has_entries( { 'text': 'Organize imports',
'chunks': instance_of( list ) } ),
has_entries( { 'text': 'Generate toString()',
Expand Down Expand Up @@ -1509,6 +1567,9 @@ def test_Subcommands_FixIt_Unicode( self, app ):
has_entries( {
'text': "Add Javadoc for 'DoWhatever'"
} ),
has_entries( {
'text': "Sort Members for 'Test.java'",
} ),
)
} )

Expand Down Expand Up @@ -1573,6 +1634,12 @@ def test_Subcommands_FixIt_InvalidURI( self, app ):
has_entries( {
'text': "Add Javadoc for 'getWidget'"
} ),
has_entries( {
'text': "Sort Members for 'TestFactory.java'"
} ),
has_entries( {
'text': "Add all missing imports"
} ),
)
} )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1682720979833</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
2 changes: 1 addition & 1 deletion ycmd/tests/java/testdata/lombok_project/.ycm_extra_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) )
DIR_OF_THIRD_PARTY = p.join( DIR_OF_THIS_SCRIPT, '..', '..', '..', '..', '..', 'third_party' )
PATH_TO_LOMBOK = p.join( DIR_OF_THIRD_PARTY, 'lombok', 'cache', 'lombok-1.18.16.jar' )
PATH_TO_LOMBOK = p.join( DIR_OF_THIRD_PARTY, 'lombok', 'cache', 'lombok-1.18.26.jar' )


def Settings( **kwargs ):
Expand Down
4 changes: 2 additions & 2 deletions ycmd/tests/java/testdata/lombok_project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ repositories {
}

dependencies {
compileOnly 'org.projectlombok:lombok:1.18.16'
annotationProcessor 'org.projectlombok:lombok:1.18.16'
compileOnly 'org.projectlombok:lombok:1.18.26'
annotationProcessor 'org.projectlombok:lombok:1.18.26'
}
11 changes: 11 additions & 0 deletions ycmd/tests/java/testdata/multiple_projects/src/core/.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1682721378093</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
11 changes: 11 additions & 0 deletions ycmd/tests/java/testdata/multiple_projects/src/input/.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1682721378094</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
11 changes: 11 additions & 0 deletions ycmd/tests/java/testdata/simple_eclipse_project/.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1682720977901</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip

0 comments on commit e1d867a

Please sign in to comment.