diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b66ac070b..5e5885e567 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: python-arch: "x64" env: COVERAGE: true - name: "${{ matrix.runs-on }} - Python 3.9 ${{ matrix.python-arch }}" + name: "${{ matrix.runs-on }} - Python 3.12 ${{ matrix.python-arch }}" runs-on: ${{ matrix.runs-on }} steps: - uses: actions/checkout@v4 @@ -32,7 +32,7 @@ jobs: - name: Install Python uses: actions/setup-python@v5 with: - python-version: "3.9" + python-version: "3.12" architecture: ${{ matrix.python-arch }} - name: Run pip run: python3 -m pip install -r python/test_requirements.txt @@ -43,7 +43,7 @@ jobs: - name: Upload coverage data uses: codecov/codecov-action@v4 with: - name: "${{ runner.os }}-3.9-${{ matrix.python-arch }}" + name: "${{ runner.os }}-3.12-${{ matrix.python-arch }}" token: ${{ secrets.CODECOV_TOKEN }} vim-tests: @@ -68,7 +68,7 @@ jobs: - name: Install Java uses: actions/setup-java@v4 with: - java-version: 17 + java-version: 21 distribution: 'temurin' - name: Build ycmd run: python3 ./install.py --force-sudo --ts-completer --clangd-completer --java-completer diff --git a/README.md b/README.md index c561af149a..00bd7e67f6 100644 --- a/README.md +++ b/README.md @@ -211,8 +211,8 @@ Installation | Runtime | Min Version | Recommended Version (full support) | Python | |---------|-------------|------------------------------------|--------| -| Vim | 9.1.0016 | 9.1.0016 | 3.8 | -| Neovim | 0.5 | Vim 9.1.0016 | 3.8 | +| Vim | 9.1.0016 | 9.1.0016 | 3.12 | +| Neovim | 0.5 | Vim 9.1.0016 | 3.12 | #### Supported Vim Versions @@ -227,16 +227,16 @@ available in Neovim, and Neovim is not officially supported. #### Supported Python runtime YCM has two components: A server and a client. Both the server and client -require Python 3.8 or later 3.x release. +require Python 3.12 or later 3.x release. For the Vim client, Vim must be, compiled with `--enable-shared` (or `--enable-framework` on macOS). You can check if this is working with `:py3 -import sys; print( sys.version)`. It should say something like `3.8.2 (...)`. +import sys; print( sys.version)`. It should say something like `3.12.0 (...)`. -For Neovim, you must have a python 3.8 runtime and the Neovim python +For Neovim, you must have a python 3.12 runtime and the Neovim python extensions. See Neovim's `:help provider-python` for how to set that up. -For the server, you must run the `install.py` script with a python 3.8 (or +For the server, you must run the `install.py` script with a python 3.12 (or later) runtime. Anaconda etc. are not supported. YCM will remember the runtime you used to run `install.py` and will use that when launching the server, so if you usually use anaconda, then make sure to use the full path to a real cpython3, diff --git a/install.py b/install.py index cf27b2047d..2483460d39 100755 --- a/install.py +++ b/install.py @@ -12,8 +12,8 @@ import glob version = sys.version_info[ 0 : 3 ] -if version < ( 3, 6, 0 ): - sys.exit( 'YouCompleteMe requires Python >= 3.6.0; ' +if version < ( 3, 12, 0 ): + sys.exit( 'YouCompleteMe requires Python >= 3.12.0; ' 'your version of Python is ' + sys.version ) DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) ) diff --git a/plugin/youcompleteme.vim b/plugin/youcompleteme.vim index 5c0ab1d37b..154e0a12f3 100644 --- a/plugin/youcompleteme.vim +++ b/plugin/youcompleteme.vim @@ -48,7 +48,7 @@ elseif !has( 'timers' ) elseif !has( 'python3_compiled' ) echohl WarningMsg | \ echomsg "YouCompleteMe unavailable: requires Vim compiled with " . - \ "Python (3.8.0+) support." | + \ "Python (3.12.0+) support." | \ echohl None call s:restore_cpo() finish diff --git a/test/docker/ci/image/Dockerfile b/test/docker/ci/image/Dockerfile index 1ccdc2a99a..d727cb5369 100644 --- a/test/docker/ci/image/Dockerfile +++ b/test/docker/ci/image/Dockerfile @@ -23,7 +23,7 @@ RUN apt-get update && \ python3-pip \ python3-setuptools \ python3-wheel \ - openjdk-11-jdk-headless \ + openjdk-21-jdk-headless \ nodejs \ npm \ vim-nox \ diff --git a/test/fixit.test.vim b/test/fixit.test.vim index 430cf466ba..8d7d5c781f 100644 --- a/test/fixit.test.vim +++ b/test/fixit.test.vim @@ -27,13 +27,14 @@ function! Test_Ranged_Fixit_Works() call test_feedinput( "4\" ) endfunction - call timer_start( 5000, funcref( 'SelectEntry' ) ) + let t = timer_start( 5000, funcref( 'SelectEntry' ) ) '<,'>YcmCompleter FixIt redraw call assert_match( ' String \(x\|string\) = "Did something useful: "' . \ ' + w.getWidgetInfo();', getline( 34 ) ) call assert_match( ' System.out.println( \(x\|string\) );', getline( 35 ) ) + silent! call timer_stop( t ) delfunction SelectEntry endfunction @@ -45,11 +46,12 @@ function! Test_Unresolved_Fixit_Works() redraw call test_feedinput( "2\" ) endfunction - call timer_start( 2000, funcref( 'SelectEntry' ) ) + let t = timer_start( 2000, funcref( 'SelectEntry' ) ) YcmCompleter FixIt redraw call assert_equal( ' auto placeholder = 1;', getline( 3 ) ) call assert_equal( ' printf("%s", placeholder);', getline( 4 ) ) %bwipeout! + silent! call timer_stop( t ) delfunction SelectEntry endfunction diff --git a/test/hierarchies.test.vim b/test/hierarchies.test.vim index e9a51a12cf..7da1dd2d36 100644 --- a/test/hierarchies.test.vim +++ b/test/hierarchies.test.vim @@ -68,18 +68,19 @@ function! Test_Call_Hierarchy() call assert_match( '^ -Function: h.*:8', getbufline( winbufnr( popup_list()[ 0 ] ), 4 )[ 0 ] ) call assert_match( '^ -Function: h.*:9', getbufline( winbufnr( popup_list()[ 0 ] ), 5 )[ 0 ] ) - " silent, because clangd does not support outgoing calls. - silent call feedkeys( "\\\\\", "xt" ) - " Re-root at h. - call WaitForAssert( { -> assert_equal( len( getbufline( winbufnr( popup_list()[ 0 ] ), 1, '$' ) ), 1 ) } ) - call assert_match( '^+Function: h', getbufline( winbufnr( popup_list()[ 0 ] ), 1 )[0] ) + " re-root at h; show outgoing calls from h + call feedkeys( "\\\\\", "xt" ) + call WaitForAssert( { -> assert_equal( len( getbufline( winbufnr( popup_list()[ 0 ] ), 1, '$' ) ), 3 ) } ) + call assert_match( '^ +Function: g', getbufline( winbufnr( popup_list()[ 0 ] ), 1 )[0] ) + call assert_match( '^ +Function: f', getbufline( winbufnr( popup_list()[ 0 ] ), 2 )[0] ) + call assert_match( '^+Function: h', getbufline( winbufnr( popup_list()[ 0 ] ), 3 )[0] ) - " silent, because clangd does not support outgoing calls. + " silent, because h() has no incoming calls silent call feedkeys( "\\", "xt" ) - " Expansion after re-rooting works. - " NOTE: Clangd does not support outgoing calls, hence, we are stuck at just h. - call WaitForAssert( { -> assert_equal( len( getbufline( winbufnr( popup_list()[ 0 ] ), 1, '$' ) ), 1 ) } ) - call assert_match( '^-Function: h', getbufline( winbufnr( popup_list()[ 0 ] ), 1 )[ 0 ] ) + call WaitForAssert( { -> assert_equal( len( getbufline( winbufnr( popup_list()[ 0 ] ), 1, '$' ) ), 3 ) } ) + call assert_match( '^ +Function: g', getbufline( winbufnr( popup_list()[ 0 ] ), 1 )[0] ) + call assert_match( '^ +Function: f', getbufline( winbufnr( popup_list()[ 0 ] ), 2 )[0] ) + call assert_match( '^-Function: h', getbufline( winbufnr( popup_list()[ 0 ] ), 3 )[0] ) call feedkeys( "\", "xt" ) " Make sure it is closed. diff --git a/third_party/ycmd b/third_party/ycmd index 7895484ad5..73ec4f6655 160000 --- a/third_party/ycmd +++ b/third_party/ycmd @@ -1 +1 @@ -Subproject commit 7895484ad55e0cbd0686e882891d59661f183476 +Subproject commit 73ec4f6655e1a6f18ded977c0a43add2704a0b12