Skip to content

Commit

Permalink
Merge remote-tracking branch 'valloric/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
puremourning committed Oct 21, 2023
2 parents 65e1861 + adce5d8 commit 08c9f9e
Show file tree
Hide file tree
Showing 228 changed files with 10,363 additions and 2,323 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
submodules: recursive
fetch-depth: 0

- uses: actions/cache@v2
- uses: actions/cache@v3
if: matrix.libclang == true && matrix.benchmark == false
with:
key: v3-libclang-${{ runner.os }}-${{ hashFiles( 'cpp/ycm/CMakeLists.txt' ) }}
Expand All @@ -51,7 +51,7 @@ jobs:
clang_archives
name: Cache libclang

- uses: actions/cache@v2
- uses: actions/cache@v3
if: matrix.benchmark == false
with:
key: v2-deps-${{ runner.os }}-${{ hashFiles( 'build.py' ) }}
Expand All @@ -65,7 +65,7 @@ jobs:
third_party/omnisharp-roslyn/v[0-9]*
name: Cache dependencies

- uses: actions/cache@v2
- uses: actions/cache@v3
if: matrix.benchmark == false
with:
key: v2-testdeps-${{ runner.os }}-${{ hashFiles( 'run_tests.py' ) }}
Expand All @@ -79,21 +79,22 @@ jobs:

- name: Install Java
if: matrix.benchmark == false
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'adopt'

- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install Go
if: matrix.benchmark == false
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
stable: true
go-version: stable
cache: false
- name: Install GCC
if: runner.os == 'Linux' && matrix.compiler != 'clang'
run: |
Expand Down Expand Up @@ -127,6 +128,7 @@ jobs:
if: matrix.benchmark == false
with:
name: "${{ matrix.runs-on }}-${{ matrix.name_suffix }}-tests"
token: ${{ secrets.CODECOV_TOKEN }}
gcov: true

linux_lint:
Expand Down Expand Up @@ -196,7 +198,7 @@ jobs:
submodules: recursive
fetch-depth: 0

- uses: actions/cache@v2
- uses: actions/cache@v3
if: matrix.libclang == true && matrix.benchmark == false
with:
key: v3-libclang-${{ runner.os }}-${{ hashFiles( 'cpp/ycm/CMakeLists.txt' ) }}
Expand All @@ -209,7 +211,7 @@ jobs:
clang_archives
name: Cache libclang

- uses: actions/cache@v2
- uses: actions/cache@v3
if: matrix.benchmark == false
with:
key: v2-deps-${{ runner.os }}-${{ hashFiles( 'build.py' ) }}
Expand All @@ -223,7 +225,7 @@ jobs:
third_party/omnisharp-roslyn/v[0-9]*
name: Cache dependencies

- uses: actions/cache@v2
- uses: actions/cache@v3
if: matrix.benchmark == false
with:
key: v2-testdeps-${{ runner.os }}-${{ hashFiles( 'run_tests.py' ) }}
Expand All @@ -237,20 +239,21 @@ jobs:

- name: Install Java
if: matrix.benchmark == false
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
architecture: ${{ matrix.python-arch }}
- name: Install Go
if: matrix.benchmark == false
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
stable: true
go-version: stable
cache: false
- name: Run pip and prepare coverage
if: matrix.benchmark == false
run: |
Expand All @@ -271,4 +274,4 @@ jobs:
if: matrix.benchmark == false
with:
name: "${{ matrix.runs-on }}-${{ matrix.name_suffix }}-tests"
gcov: true
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .ycm_extra_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#
# For more information, please refer to <http://unlicense.org/>

from distutils.sysconfig import get_python_inc
from sysconfig import get_path
import platform
import os.path as p
import subprocess
Expand Down Expand Up @@ -71,7 +71,7 @@
'-isystem',
'cpp/BoostParts',
'-isystem',
get_python_inc(),
get_path( 'include' ),
'-isystem',
'cpp/llvm/include',
'-isystem',
Expand Down
38 changes: 19 additions & 19 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def Exit( self ):
'ba5fe5ee3b2a8395287e24aef20ce6e17834cf8e877117e6caacac6a688a6c53'
)

DEFAULT_RUST_TOOLCHAIN = 'nightly-2023-05-11'
DEFAULT_RUST_TOOLCHAIN = 'nightly-2023-08-18'
RUST_ANALYZER_DIR = p.join( DIR_OF_THIRD_PARTY, 'rust-analyzer' )

BUILD_ERROR_MESSAGE = (
Expand All @@ -107,7 +107,7 @@ def Exit( self ):
'issue tracker, including the entire output of this script (with --verbose) '
'and the invocation line used to run it.' )

CLANGD_VERSION = '16.0.1'
CLANGD_VERSION = '17.0.1'
CLANGD_BINARIES_ERROR_MESSAGE = (
'No prebuilt Clang {version} binaries for {platform}. '
'You\'ll have to compile Clangd {version} from source '
Expand All @@ -132,23 +132,23 @@ def FindLatestMSVC( quiet ):
try:
latest_v = int( latest_full_v.split( '.' )[ 0 ] )
except ValueError:
raise ValueError( f"{latest_full_v} is not a version number." )
raise ValueError( f"{ latest_full_v } is not a version number." )

if not quiet:
print( f'vswhere -latest returned version {latest_full_v}' )
print( f'vswhere -latest returned version { latest_full_v }' )

if latest_v not in ACCEPTABLE_VERSIONS:
if latest_v > 17:
if not quiet:
print( f'MSVC Version {latest_full_v} is newer than expected.' )
print( f'MSVC Version { latest_full_v } is newer than expected.' )
else:
raise ValueError(
f'vswhere returned {latest_full_v} which is unexpected.'
f'vswhere returned { latest_full_v } which is unexpected.'
'Pass --msvc <version> argument.' )
return latest_v
else:
if not quiet:
print( f'vswhere returned nothing usable, {latest_full_v}' )
print( f'vswhere returned nothing usable, { latest_full_v }' )

# Fall back to registry parsing, which works at least until MSVC 2019 (16)
# but is likely failing on MSVC 2022 (17)
Expand All @@ -161,11 +161,11 @@ def FindLatestMSVC( quiet ):
for i in ACCEPTABLE_VERSIONS:
if not quiet:
print( 'Trying to find '
rf'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\{i}.0' )
rf'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\{ i }.0' )
try:
winreg.OpenKey( handle, rf'SOFTWARE\Microsoft\VisualStudio\{i}.0' )
winreg.OpenKey( handle, rf'SOFTWARE\Microsoft\VisualStudio\{ i }.0' )
if not quiet:
print( f"Found MSVC version {i}" )
print( f"Found MSVC version { i }" )
msvc = i
break
except FileNotFoundError:
Expand Down Expand Up @@ -939,7 +939,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.9.4'
gopls = 'golang.org/x/tools/gopls@v0.13.2'
CheckCall( [ go, 'install', gopls ],
env = new_env,
quiet = args.quiet,
Expand Down Expand Up @@ -978,7 +978,7 @@ def EnableRustCompleter( switches ):
req_toolchain_version = switches.rust_toolchain_version

if switches.quiet:
sys.stdout.write( f'Installing rust-analyzer "{req_toolchain_version}" '
sys.stdout.write( f'Installing rust-analyzer "{ req_toolchain_version }" '
'for Rust support...' )
sys.stdout.flush()

Expand Down Expand Up @@ -1145,30 +1145,30 @@ def GetClangdTarget():
if OnWindows():
return [
( 'clangd-{version}-win64',
'a0a7b16f6f92d545c84baff5e4bdb56897e955689ffc7407c915cc9d3c69a945' ),
'66a1e4d527b451d1e9f21183416fd53ef7f395266bbf7fd74b470ec326d19c98' ),
( 'clangd-{version}-win32',
'870de4d2a45380eba7c6b6640e2cb870219dd2025ed3bcb58101fd1d17f51d75' ) ]
'c4c351da9f528a2cfacbc669cfb656ef34791ed637aeed051274adf611f3ba5a' ) ]
if OnMac():
if OnArm():
return [
( 'clangd-{version}-arm64-apple-darwin',
'c5b0a314c00e4ce839ce1f4ee1ed46116f839949b7874affa759e10589340948' ) ]
'38b0335306193cfe7978af9b2bb9dffc48406739b23f19158e7f000f910df5b0' ) ]
return [
( 'clangd-{version}-x86_64-apple-darwin',
'826c85889a1c288418e2c05b91e40158cde06f2e79f1e951d4983de2652a6d2c' ) ]
'e3dcbefda4a10d7e1e2f8ce8db820219d78ac48ade247048fc0c6a821105ca26' ) ]
if OnAArch64():
return [
( 'clangd-{version}-aarch64-linux-gnu',
'79f4a0a20342479c0e29573cf58810e0daabbf00178cf042edf6e1acb20a8602' ) ]
'a3074a5d3c955b3326881617d36438e2cf36140d8de4b5f7d98e73eda92797a8' ) ]
if OnArm():
return [
None, # First list index is for 64bit archives. ARMv7 is 32bit only.
( 'clangd-{version}-armv7a-linux-gnueabihf',
'e521f21021885aaeb94e631949db6c0a65cc9c5c9c708afe4a42a058eb91ebca' ) ]
'f167c13d3741ad7869a6ee57621af2cb9c2477bb300ab2fac91ea64c19f8df43' ) ]
if OnX86_64():
return [
( 'clangd-{version}-x86_64-unknown-linux-gnu',
'51e69f6f5394ed6990cd7d938c53135ef2b5f8d2da1026eb291ffb3c81968847' ) ]
'70a9cf4c9e288941f0193dbfe0ab164e1805b622c2df522ea7319dabdeae3b4c' ) ]
raise InstallationFailed(
CLANGD_BINARIES_ERROR_MESSAGE.format( version = CLANGD_VERSION,
platform = 'this system' ) )
Expand Down
Loading

0 comments on commit 08c9f9e

Please sign in to comment.