Skip to content

Commit fca8f32

Browse files
authored
Merge pull request #4323 from puremourning/update-ycmd
Update ycmd
2 parents d11e24d + 891fb1c commit fca8f32

File tree

8 files changed

+30
-27
lines changed

8 files changed

+30
-27
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
python-arch: "x64"
2323
env:
2424
COVERAGE: true
25-
name: "${{ matrix.runs-on }} - Python 3.9 ${{ matrix.python-arch }}"
25+
name: "${{ matrix.runs-on }} - Python 3.12 ${{ matrix.python-arch }}"
2626
runs-on: ${{ matrix.runs-on }}
2727
steps:
2828
- uses: actions/checkout@v4
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install Python
3333
uses: actions/setup-python@v5
3434
with:
35-
python-version: "3.9"
35+
python-version: "3.12"
3636
architecture: ${{ matrix.python-arch }}
3737
- name: Run pip
3838
run: python3 -m pip install -r python/test_requirements.txt
@@ -43,7 +43,7 @@ jobs:
4343
- name: Upload coverage data
4444
uses: codecov/codecov-action@v4
4545
with:
46-
name: "${{ runner.os }}-3.9-${{ matrix.python-arch }}"
46+
name: "${{ runner.os }}-3.12-${{ matrix.python-arch }}"
4747
token: ${{ secrets.CODECOV_TOKEN }}
4848

4949
vim-tests:
@@ -68,7 +68,7 @@ jobs:
6868
- name: Install Java
6969
uses: actions/setup-java@v4
7070
with:
71-
java-version: 17
71+
java-version: 21
7272
distribution: 'temurin'
7373
- name: Build ycmd
7474
run: python3 ./install.py --force-sudo --ts-completer --clangd-completer --java-completer

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ Installation
211211

212212
| Runtime | Min Version | Recommended Version (full support) | Python |
213213
|---------|-------------|------------------------------------|--------|
214-
| Vim | 9.1.0016 | 9.1.0016 | 3.8 |
215-
| Neovim | 0.5 | Vim 9.1.0016 | 3.8 |
214+
| Vim | 9.1.0016 | 9.1.0016 | 3.12 |
215+
| Neovim | 0.5 | Vim 9.1.0016 | 3.12 |
216216

217217
#### Supported Vim Versions
218218

@@ -227,16 +227,16 @@ available in Neovim, and Neovim is not officially supported.
227227
#### Supported Python runtime
228228

229229
YCM has two components: A server and a client. Both the server and client
230-
require Python 3.8 or later 3.x release.
230+
require Python 3.12 or later 3.x release.
231231

232232
For the Vim client, Vim must be, compiled with `--enable-shared` (or
233233
`--enable-framework` on macOS). You can check if this is working with `:py3
234-
import sys; print( sys.version)`. It should say something like `3.8.2 (...)`.
234+
import sys; print( sys.version)`. It should say something like `3.12.0 (...)`.
235235

236-
For Neovim, you must have a python 3.8 runtime and the Neovim python
236+
For Neovim, you must have a python 3.12 runtime and the Neovim python
237237
extensions. See Neovim's `:help provider-python` for how to set that up.
238238

239-
For the server, you must run the `install.py` script with a python 3.8 (or
239+
For the server, you must run the `install.py` script with a python 3.12 (or
240240
later) runtime. Anaconda etc. are not supported. YCM will remember the runtime
241241
you used to run `install.py` and will use that when launching the server, so if
242242
you usually use anaconda, then make sure to use the full path to a real cpython3,

install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import glob
1313

1414
version = sys.version_info[ 0 : 3 ]
15-
if version < ( 3, 6, 0 ):
16-
sys.exit( 'YouCompleteMe requires Python >= 3.6.0; '
15+
if version < ( 3, 12, 0 ):
16+
sys.exit( 'YouCompleteMe requires Python >= 3.12.0; '
1717
'your version of Python is ' + sys.version )
1818

1919
DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) )

plugin/youcompleteme.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ elseif !has( 'timers' )
4848
elseif !has( 'python3_compiled' )
4949
echohl WarningMsg |
5050
\ echomsg "YouCompleteMe unavailable: requires Vim compiled with " .
51-
\ "Python (3.8.0+) support." |
51+
\ "Python (3.12.0+) support." |
5252
\ echohl None
5353
call s:restore_cpo()
5454
finish

test/docker/ci/image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN apt-get update && \
2323
python3-pip \
2424
python3-setuptools \
2525
python3-wheel \
26-
openjdk-11-jdk-headless \
26+
openjdk-21-jdk-headless \
2727
nodejs \
2828
npm \
2929
vim-nox \

test/fixit.test.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ function! Test_Ranged_Fixit_Works()
2727
call test_feedinput( "4\<CR>" )
2828
endfunction
2929

30-
call timer_start( 5000, funcref( 'SelectEntry' ) )
30+
let t = timer_start( 5000, funcref( 'SelectEntry' ) )
3131
'<,'>YcmCompleter FixIt
3232
redraw
3333

3434
call assert_match( ' String \(x\|string\) = "Did something useful: "' .
3535
\ ' + w.getWidgetInfo();', getline( 34 ) )
3636
call assert_match( ' System.out.println( \(x\|string\) );', getline( 35 ) )
37+
silent! call timer_stop( t )
3738
delfunction SelectEntry
3839
endfunction
3940

@@ -45,11 +46,12 @@ function! Test_Unresolved_Fixit_Works()
4546
redraw
4647
call test_feedinput( "2\<CR>" )
4748
endfunction
48-
call timer_start( 2000, funcref( 'SelectEntry' ) )
49+
let t = timer_start( 2000, funcref( 'SelectEntry' ) )
4950
YcmCompleter FixIt
5051
redraw
5152
call assert_equal( ' auto placeholder = 1;', getline( 3 ) )
5253
call assert_equal( ' printf("%s", placeholder);', getline( 4 ) )
5354
%bwipeout!
55+
silent! call timer_stop( t )
5456
delfunction SelectEntry
5557
endfunction

test/hierarchies.test.vim

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,19 @@ function! Test_Call_Hierarchy()
6868
call assert_match( '^ -Function: h.*:8', getbufline( winbufnr( popup_list()[ 0 ] ), 4 )[ 0 ] )
6969
call assert_match( '^ -Function: h.*:9', getbufline( winbufnr( popup_list()[ 0 ] ), 5 )[ 0 ] )
7070

71-
" silent, because clangd does not support outgoing calls.
72-
silent call feedkeys( "\<Down>\<Down>\<Down>\<Down>\<S-Tab>", "xt" )
73-
" Re-root at h.
74-
call WaitForAssert( { -> assert_equal( len( getbufline( winbufnr( popup_list()[ 0 ] ), 1, '$' ) ), 1 ) } )
75-
call assert_match( '^+Function: h', getbufline( winbufnr( popup_list()[ 0 ] ), 1 )[0] )
71+
" re-root at h; show outgoing calls from h
72+
call feedkeys( "\<Down>\<Down>\<Down>\<Down>\<S-Tab>", "xt" )
73+
call WaitForAssert( { -> assert_equal( len( getbufline( winbufnr( popup_list()[ 0 ] ), 1, '$' ) ), 3 ) } )
74+
call assert_match( '^ +Function: g', getbufline( winbufnr( popup_list()[ 0 ] ), 1 )[0] )
75+
call assert_match( '^ +Function: f', getbufline( winbufnr( popup_list()[ 0 ] ), 2 )[0] )
76+
call assert_match( '^+Function: h', getbufline( winbufnr( popup_list()[ 0 ] ), 3 )[0] )
7677

77-
" silent, because clangd does not support outgoing calls.
78+
" silent, because h() has no incoming calls
7879
silent call feedkeys( "\<S-Tab>\<Tab>", "xt" )
79-
" Expansion after re-rooting works.
80-
" NOTE: Clangd does not support outgoing calls, hence, we are stuck at just h.
81-
call WaitForAssert( { -> assert_equal( len( getbufline( winbufnr( popup_list()[ 0 ] ), 1, '$' ) ), 1 ) } )
82-
call assert_match( '^-Function: h', getbufline( winbufnr( popup_list()[ 0 ] ), 1 )[ 0 ] )
80+
call WaitForAssert( { -> assert_equal( len( getbufline( winbufnr( popup_list()[ 0 ] ), 1, '$' ) ), 3 ) } )
81+
call assert_match( '^ +Function: g', getbufline( winbufnr( popup_list()[ 0 ] ), 1 )[0] )
82+
call assert_match( '^ +Function: f', getbufline( winbufnr( popup_list()[ 0 ] ), 2 )[0] )
83+
call assert_match( '^-Function: h', getbufline( winbufnr( popup_list()[ 0 ] ), 3 )[0] )
8384

8485
call feedkeys( "\<C-c>", "xt" )
8586
" Make sure it is closed.

0 commit comments

Comments
 (0)