Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__ ) )
Expand Down
2 changes: 1 addition & 1 deletion plugin/youcompleteme.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/docker/ci/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
6 changes: 4 additions & 2 deletions test/fixit.test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ function! Test_Ranged_Fixit_Works()
call test_feedinput( "4\<CR>" )
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

Expand All @@ -45,11 +46,12 @@ function! Test_Unresolved_Fixit_Works()
redraw
call test_feedinput( "2\<CR>" )
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
21 changes: 11 additions & 10 deletions test/hierarchies.test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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( "\<Down>\<Down>\<Down>\<Down>\<S-Tab>", "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( "\<Down>\<Down>\<Down>\<Down>\<S-Tab>", "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( "\<S-Tab>\<Tab>", "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( "\<C-c>", "xt" )
" Make sure it is closed.
Expand Down