From 06f7a4669d5496cf75fdb3694442feabf0e57105 Mon Sep 17 00:00:00 2001 From: Regen Date: Mon, 23 Dec 2019 01:04:16 +0900 Subject: [PATCH 1/2] Fix _parse_commands() --- src/cmake_language_server/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmake_language_server/api.py b/src/cmake_language_server/api.py index 488b6e8..dcfb7d7 100644 --- a/src/cmake_language_server/api.py +++ b/src/cmake_language_server/api.py @@ -186,9 +186,9 @@ endforeach() matches = re.finditer( r''' (?P.+)\n --+\n\n +-+\n+? [\s\S]*? -(?P\ (?P=command)\s*\([^)]*\)) +(?P(?P=command)\s*\([^)]*\)) ''', p.stdout, re.VERBOSE) self._builtin_commands.clear() for match in matches: From e73b0bab0f040288f2901622fef0c1a3ffd6eac2 Mon Sep 17 00:00:00 2001 From: Regen Date: Mon, 23 Dec 2019 01:47:07 +0900 Subject: [PATCH 2/2] Fix windows build --- .github/workflows/tests.yml | 2 +- tests/conftest.py | 7 ++++--- tox.ini | 4 +--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 503c82e..6478e0c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: python: [3.6, 3.7, 3.8] - os: [ubuntu-18.04, windows-latest] + os: [ubuntu-18.04, windows-2016] steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python }} diff --git a/tests/conftest.py b/tests/conftest.py index 89fbfb1..236ced0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,8 +15,9 @@ def cmake_build(shared_datadir): if p.returncode != 0: import logging import os - logging.error(os.environ) - logging.error(p.stdout) - logging.error(p.stderr) + import pprint + logging.error('env:\n' + pprint.pformat(os.environ)) + logging.error('stdout:\n' + p.stdout) + logging.error('stderr:\n' + p.stderr) raise RuntimeError("CMake failed") yield build diff --git a/tox.ini b/tox.ini index bbfb4a7..31e1a1e 100644 --- a/tox.ini +++ b/tox.ini @@ -12,15 +12,13 @@ python = [testenv] whitelist_externals = poetry skip_install = true -passenv = INCLUDE LIB LIBPATH +passenv = INCLUDE LIB LIBPATH Platform VCTools* VSCMD_* WindowsSDK* commands_pre = poetry install commands = poetry run pytest -sv tests [testenv:lint] -whitelist_externals = poetry -skip_install = true commands = poetry run isort -c -rc src tests poetry run yapf -d -r src tests