Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit 6b6b9da

Browse files
committed
Remove tree-sitter and associated build infrastructure
The static-analysis command previously depended on tree-sitter, which required building some C-based extensions coming from submodules. Now that static-analysis is gone, we can also remove `tree-sitter` and all associated build complexity.
1 parent 18f9d42 commit 6b6b9da

File tree

10 files changed

+8
-72
lines changed

10 files changed

+8
-72
lines changed

.github/workflows/build_assets.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ jobs:
2525
rm $(ls | grep wrapt) && pip download wrapt --platform=universal2 --only-binary=:all: && pip install $(ls | grep wrapt) --force-reinstall && cd .. &&
2626
pip install --no-deps --no-index --find-links=pip-packages pip-packages/*
2727
CMD_BUILD: >
28-
STATICCODECOV_LIB_PATH=$(find build/ -maxdepth 1 -type d -name 'lib.*' -print -quit | xargs -I {} sh -c "find {} -type f -name 'staticcodecov*' -print -quit | sed 's|^./||'") &&
29-
pyinstaller --add-binary ${STATICCODECOV_LIB_PATH}:. --copy-metadata codecov-cli --hidden-import staticcodecov_languages --target-arch universal2 -F codecov_cli/main.py &&
28+
pyinstaller --copy-metadata codecov-cli --target-arch universal2 -F codecov_cli/main.py &&
3029
mv dist/main dist/codecovcli_macos &&
3130
lipo -archs dist/codecovcli_macos | grep 'x86_64 arm64'
3231
OUT_FILE_NAME: codecovcli_macos
@@ -36,8 +35,7 @@ jobs:
3635
CMD_REQS: >
3736
pip install -r requirements.txt && pip install .
3837
CMD_BUILD: >
39-
STATICCODECOV_LIB_PATH=$(find build/ -maxdepth 1 -type d -name 'lib.*' -print -quit | xargs -I {} sh -c "find {} -type f -name 'staticcodecov*' -print -quit | sed 's|^./||'") &&
40-
pyinstaller --add-binary ${STATICCODECOV_LIB_PATH}:. --copy-metadata codecov-cli --hidden-import staticcodecov_languages -F codecov_cli/main.py &&
38+
pyinstaller --copy-metadata codecov-cli -F codecov_cli/main.py &&
4139
cp ./dist/main ./dist/codecovcli_linux
4240
OUT_FILE_NAME: codecovcli_linux
4341
ASSET_MIME: application/octet-stream
@@ -46,7 +44,7 @@ jobs:
4644
CMD_REQS: >
4745
pip install -r requirements.txt && pip install .
4846
CMD_BUILD: >
49-
pyinstaller --add-binary "build\lib.win-amd64-cpython-311\staticcodecov_languages.cp311-win_amd64.pyd;." --copy-metadata codecov-cli --hidden-import staticcodecov_languages -F codecov_cli\main.py &&
47+
pyinstaller --copy-metadata codecov-cli -F codecov_cli\main.py &&
5048
Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe"
5149
OUT_FILE_NAME: codecovcli_windows.exe
5250
ASSET_MIME: application/vnd.microsoft.portable-executable

.gitmodules

Lines changed: 0 additions & 6 deletions
This file was deleted.

languages/languages.c

Lines changed: 0 additions & 21 deletions
This file was deleted.

languages/treesitterjavascript

Lines changed: 0 additions & 1 deletion
This file was deleted.

languages/treesitterpython

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ dependencies = [
1919
"responses==0.21.*",
2020
"sentry-sdk>=2.20.0",
2121
"test-results-parser==0.5.4",
22-
"tree-sitter==0.20.*",
2322
"wrapt>=1.17.2",
2423
]
2524
license = {file = "LICENSE"}

requirements.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.11
2+
# This file is autogenerated by pip-compile with Python 3.12
33
# by the following command:
44
#
55
# pip-compile --all-build-deps --all-extras pyproject.toml
@@ -29,8 +29,6 @@ idna==3.10
2929
# requests
3030
ijson==3.3.0
3131
# via codecov-cli (pyproject.toml)
32-
packaging==24.2
33-
# via setuptools-scm
3432
pyyaml==6.0.2
3533
# via codecov-cli (pyproject.toml)
3634
regex==2024.11.6
@@ -41,16 +39,12 @@ responses==0.21.0
4139
# via codecov-cli (pyproject.toml)
4240
sentry-sdk==2.20.0
4341
# via codecov-cli (pyproject.toml)
44-
setuptools-scm==8.1.0
45-
# via codecov-cli (pyproject.toml::build-system.requires)
4642
sniffio==1.3.1
4743
# via
4844
# anyio
4945
# httpx
5046
test-results-parser==0.5.4
5147
# via codecov-cli (pyproject.toml)
52-
tree-sitter==0.20.4
53-
# via codecov-cli (pyproject.toml)
5448
typing-extensions==4.12.2
5549
# via anyio
5650
urllib3==2.3.0

scripts/build_alpine_arm.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ apk add musl-dev build-base
33
pip install -r requirements.txt
44
pip install .
55
python setup.py build
6-
STATICCODECOV_LIB_PATH=$(find build/ -maxdepth 1 -type d -name 'lib.*' -print -quit | xargs -I {} sh -c "find {} -type f -name 'staticcodecov*' -print -quit | sed 's|^./||'")
76
pip install pyinstaller
8-
pyinstaller --add-binary ${STATICCODECOV_LIB_PATH}:. --copy-metadata codecov-cli --hidden-import staticcodecov_languages -F codecov_cli/main.py
7+
pyinstaller --copy-metadata codecov-cli -F codecov_cli/main.py
98
cp ./dist/main ./dist/codecovcli_$1

scripts/build_linux_arm.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ apt install build-essential
33
pip install -r requirements.txt
44
pip install .
55
python setup.py build
6-
STATICCODECOV_LIB_PATH=$(find build/ -maxdepth 1 -type d -name 'lib.*' -print -quit | xargs -I {} sh -c "find {} -type f -name 'staticcodecov*' -print -quit | sed 's|^./||'")
76
pip install pyinstaller
8-
pyinstaller --add-binary ${STATICCODECOV_LIB_PATH}:. --copy-metadata codecov-cli --hidden-import staticcodecov_languages -F codecov_cli/main.py
7+
pyinstaller --copy-metadata codecov-cli -F codecov_cli/main.py
98
cp ./dist/main ./dist/codecovcli_$1

setup.py

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
from platform import system
1+
from setuptools import setup
22

3-
from setuptools import Extension, setup
4-
5-
setup(
6-
ext_modules=[
7-
Extension(
8-
"staticcodecov_languages",
9-
[
10-
"languages/languages.c",
11-
"languages/treesitterpython/src/parser.c",
12-
"languages/treesitterjavascript/src/parser.c",
13-
"languages/treesitterpython/src/scanner.cc",
14-
"languages/treesitterjavascript/src/scanner.c",
15-
],
16-
include_dirs=[
17-
"languages/treesitterpython/src",
18-
"languages/treesitterjavascript/src",
19-
"languages/treesitterjavascript/src/tree_sitter",
20-
"languages/treesitterpython/src/tree_sitter",
21-
],
22-
extra_compile_args=(
23-
["-Wno-unused-variable"] if system() != "Windows" else None
24-
),
25-
)
26-
],
27-
)
3+
setup()

0 commit comments

Comments
 (0)