Skip to content

Commit 13fd7ac

Browse files
Update build.py
1 parent 70f4cbd commit 13fd7ac

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

lib/build.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,46 @@
1010
os.system(
1111
f'git clone https://github.com/tree-sitter/tree-sitter-c.git {cwd / "vendor/tree-sitter-c"}'
1212
)
13+
# Checkout to specific commit for language version 14 compatibility
14+
os.system(
15+
f'cd {cwd / "vendor/tree-sitter-c"} && git checkout cd44a2b1364d26d80daa208d3caf659a4c4e953d'
16+
)
1317

1418
if not (cwd / "vendor/tree-sitter-cpp/grammar.js").exists():
1519
os.system(
1620
f'git clone https://github.com/tree-sitter/tree-sitter-cpp.git {cwd / "vendor/tree-sitter-cpp"}'
1721
)
22+
# Checkout to specific commit for language version 14 compatibility
23+
os.system(
24+
f'cd {cwd / "vendor/tree-sitter-cpp"} && git checkout 12bd6f7e96080d2e70ec51d4068f2f66120dde35'
25+
)
1826

1927
if not (cwd / "vendor/tree-sitter-java/grammar.js").exists():
2028
os.system(
2129
f'git clone https://github.com/tree-sitter/tree-sitter-java.git {cwd / "vendor/tree-sitter-java"}'
2230
)
31+
# Checkout to specific commit for language version 14 compatibility
32+
os.system(
33+
f'cd {cwd / "vendor/tree-sitter-java"} && git checkout e10607b45ff745f5f876bfa3e94fbcc6b44bdc11'
34+
)
2335

2436
if not (cwd / "vendor/tree-sitter-python/grammar.js").exists():
2537
os.system(
2638
f'git clone https://github.com/tree-sitter/tree-sitter-python.git {cwd / "vendor/tree-sitter-python"}'
2739
)
40+
# Checkout to specific commit for language version 14 compatibility
41+
os.system(
42+
f'cd {cwd / "vendor/tree-sitter-python"} && git checkout 710796b8b877a970297106e5bbc8e2afa47f86ec'
43+
)
2844

2945
if not (cwd / "vendor/tree-sitter-go/grammar.js").exists():
3046
os.system(
3147
f'git clone https://github.com/tree-sitter/tree-sitter-go.git {cwd / "vendor/tree-sitter-go"}'
3248
)
49+
# Checkout to specific commit for language version 14 compatibility
50+
os.system(
51+
f'cd {cwd / "vendor/tree-sitter-go"} && git checkout 12fe553fdaaa7449f764bc876fd777704d4fb752'
52+
)
3353

3454
Language.build_library(
3555
# Store the library in the `build` directory

0 commit comments

Comments
 (0)