Skip to content

Commit 123350f

Browse files
Merge pull request #472 from github/upgrade-tree-sitter
Upgrade tree sitter to version 0.24
2 parents 8b814b4 + 6223c06 commit 123350f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+382
-345
lines changed

.github/workflows/ci.yml

+18-12
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929
- name: Install cargo-hack
3030
run: cargo install cargo-hack
3131
- name: Checkout code
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3333
- name: Check formatting
3434
run: cargo fmt --all -- --check
3535
- name: Cache dependencies
36-
uses: actions/cache@v3
36+
uses: actions/cache@v4
3737
with:
3838
path: |
3939
~/.cargo
@@ -47,14 +47,20 @@ jobs:
4747
run: ${{ env.CARGO_HACK }} test
4848
- name: Run test suite with all optimizations (default features)
4949
run: cargo test --release
50-
- name: Install cargo-valgrind
50+
- name: Install valgrind
5151
run: |
5252
sudo apt-get update
5353
sudo apt-get install -y valgrind
54-
cargo install cargo-valgrind
5554
- name: Run test suite under valgrind (default features)
55+
id: valgrind
5656
# We only need to use valgrind to test the crates that have C bindings.
57-
run: cargo valgrind test -p stack-graphs
57+
run: script/ci-test-valgrind -p stack-graphs
58+
- name: Upload valgrind log
59+
if: ${{ failure() && steps.valgrind.outcome == 'failure' }}
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: valgrind logs
63+
path: ${{ runner.temp }}/valgrind.log
5864
- name: Ensure C headers are up to date
5965
run: |
6066
script/cbindgen
@@ -73,9 +79,9 @@ jobs:
7379
with:
7480
rust-version: ${{ matrix.rust }}
7581
- name: Checkout code
76-
uses: actions/checkout@v3
82+
uses: actions/checkout@v4
7783
- name: Cache dependencies
78-
uses: actions/cache@v3
84+
uses: actions/cache@v4
7985
with:
8086
path: |
8187
~/.cargo
@@ -93,7 +99,7 @@ jobs:
9399
working-directory: languages
94100
steps:
95101
- name: Checkout code
96-
uses: actions/checkout@v3
102+
uses: actions/checkout@v4
97103
- name: List languages
98104
id: language-list
99105
run: echo "languages=$(find -mindepth 1 -maxdepth 1 -type d -printf '%P\n' | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
@@ -116,7 +122,7 @@ jobs:
116122
- name: Install cargo-hack
117123
run: cargo install cargo-hack
118124
- name: Cache dependencies
119-
uses: actions/cache@v3
125+
uses: actions/cache@v4
120126
with:
121127
path: |
122128
~/.cargo
@@ -125,7 +131,7 @@ jobs:
125131
restore-keys: |
126132
${{ runner.OS }}-cargo-
127133
- name: Checkout code
128-
uses: actions/checkout@v3
134+
uses: actions/checkout@v4
129135
- name: Build (all feature combinations)
130136
run: cargo hack -p ${{ matrix.language }} --feature-powerset build
131137
- name: Test (all features)
@@ -146,7 +152,7 @@ jobs:
146152
with:
147153
rust-version: ${{ matrix.rust }}
148154
- name: Cache dependencies
149-
uses: actions/cache@v3
155+
uses: actions/cache@v4
150156
with:
151157
path: |
152158
~/.cargo
@@ -155,7 +161,7 @@ jobs:
155161
restore-keys: |
156162
${{ runner.OS }}-cargo-
157163
- name: Checkout code
158-
uses: actions/checkout@v3
164+
uses: actions/checkout@v4
159165
with:
160166
lfs: true
161167
- name: Build

.github/workflows/perf.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
done: ${{ steps.done.outputs.cache-hit }}
3838
steps:
3939
- name: "Checkout base code"
40-
uses: actions/checkout@v3
40+
uses: actions/checkout@v4
4141
with:
4242
repository: ${{ env.BASE_REPO }}
4343
ref: ${{ env.BASE_SHA }}
@@ -49,7 +49,7 @@ jobs:
4949
printf 'BASE_SHA=%s\n' "$(git rev-list -1 ${{ env.BASE_SHA }} -- stack-graphs)" >> $GITHUB_ENV
5050
working-directory: ${{ env.BASE_DIR }}
5151
- name: "Checkout head code"
52-
uses: actions/checkout@v3
52+
uses: actions/checkout@v4
5353
with:
5454
repository: ${{ env.HEAD_REPO }}
5555
ref: ${{ env.HEAD_SHA }}
@@ -62,7 +62,7 @@ jobs:
6262
working-directory: ${{ env.HEAD_DIR }}
6363
- name: "Check cached status"
6464
id: done
65-
uses: actions/cache/restore@v3
65+
uses: actions/cache/restore@v4
6666
with:
6767
path: done
6868
key: ${{ runner.os }}-perf-tested-${{ env.BASE_REPO }}@${{ env.BASE_SHA }}-${{ env.HEAD_REPO }}@${{ env.HEAD_SHA }}-${{ env.TEST_NAME }}
@@ -83,7 +83,7 @@ jobs:
8383
with:
8484
rust-version: stable
8585
- name: Cache Rust dependencies
86-
uses: actions/cache@v3
86+
uses: actions/cache@v4
8787
with:
8888
path: |
8989
~/.cargo
@@ -94,15 +94,15 @@ jobs:
9494
sudo apt-get install -y valgrind
9595
- name: "Cache base result"
9696
id: cache-base-result
97-
uses: actions/cache@v3
97+
uses: actions/cache@v4
9898
with:
9999
path: |
100100
${{ env.MASSIF_OUT }}
101101
${{ env.MASSIF_REPORT }}
102102
key: ${{ runner.os }}-perf-result-${{ env.BASE_REPO }}@${{ env.BASE_SHA }}-${{ env.TEST_NAME }}
103103
- name: "Checkout base code"
104104
if: steps.cache-base-result.outputs.cache-hit != 'true'
105-
uses: actions/checkout@v3
105+
uses: actions/checkout@v4
106106
with:
107107
repository: ${{ env.BASE_REPO }}
108108
ref: ${{ env.BASE_SHA }}
@@ -130,7 +130,7 @@ jobs:
130130
${{ env.BASE_DIR }}/data/${{ env.TEST_NAME }}
131131
ms_print ${{ env.MASSIF_OUT }} > ${{ env.MASSIF_REPORT }}
132132
- name: Upload results
133-
uses: actions/upload-artifact@v3
133+
uses: actions/upload-artifact@v4
134134
with:
135135
name: ${{ env.BASE_ARTIFACT }}
136136
path: |
@@ -152,7 +152,7 @@ jobs:
152152
with:
153153
rust-version: stable
154154
- name: Cache Rust dependencies
155-
uses: actions/cache@v3
155+
uses: actions/cache@v4
156156
with:
157157
path: |
158158
~/.cargo
@@ -163,15 +163,15 @@ jobs:
163163
sudo apt-get install -y valgrind
164164
- name: "Cache head result"
165165
id: cache-head-result
166-
uses: actions/cache@v3
166+
uses: actions/cache@v4
167167
with:
168168
path: |
169169
${{ env.MASSIF_OUT }}
170170
${{ env.MASSIF_REPORT }}
171171
key: ${{ runner.os }}-perf-result-${{ env.HEAD_REPO }}@${{ env.HEAD_SHA }}-${{ env.TEST_NAME }}
172172
- name: "Checkout head code"
173173
if: steps.cache-head-result.outputs.cache-hit != 'true'
174-
uses: actions/checkout@v3
174+
uses: actions/checkout@v4
175175
with:
176176
repository: ${{ env.HEAD_REPO }}
177177
ref: ${{ env.HEAD_SHA }}
@@ -199,7 +199,7 @@ jobs:
199199
${{ env.HEAD_DIR }}/data/${{ env.TEST_NAME }}
200200
ms_print ${{ env.MASSIF_OUT }} > ${{ env.MASSIF_REPORT }}
201201
- name: Upload results
202-
uses: actions/upload-artifact@v3
202+
uses: actions/upload-artifact@v4
203203
with:
204204
name: ${{ env.HEAD_ARTIFACT }}
205205
path: |
@@ -233,20 +233,20 @@ jobs:
233233
# Download results
234234
#
235235
- name: Download base results
236-
uses: actions/download-artifact@v4.1.7
236+
uses: actions/download-artifact@v4
237237
with:
238238
name: ${{ env.BASE_ARTIFACT }}
239239
path: ${{ env.BASE_ARTIFACT }}
240240
- name: Download head results
241-
uses: actions/download-artifact@v4.1.7
241+
uses: actions/download-artifact@v4
242242
with:
243243
name: ${{ env.HEAD_ARTIFACT }}
244244
path: ${{ env.HEAD_ARTIFACT }}
245245
#
246246
# Create report
247247
#
248248
- name: "Checkout code"
249-
uses: actions/checkout@v3
249+
uses: actions/checkout@v4
250250
with:
251251
path: ${{ env.SRC_DIR }}
252252
- name: Generate summary
@@ -268,7 +268,7 @@ jobs:
268268
- name: Create status marker
269269
run: touch done
270270
- name: "Cache status"
271-
uses: actions/cache/save@v3
271+
uses: actions/cache/save@v4
272272
with:
273273
path: done
274274
key: ${{ runner.os }}-perf-tested-${{ env.BASE_REPO }}@${{ env.BASE_SHA }}-${{ env.HEAD_REPO }}@${{ env.HEAD_SHA }}-${{ env.TEST_NAME }}

.github/workflows/publish-lsp-positions.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Rust environment
1717
uses: hecrj/setup-rust-action@v1
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
# TODO Verify the crate version matches the tag
2121
- name: Test crate
2222
run: cargo test --all-features
@@ -36,7 +36,7 @@ jobs:
3636
contents: write
3737
steps:
3838
- name: Checkout repository
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
4040
- name: Create GitHub release
4141
uses: ncipollo/release-action@v1
4242
with:

.github/workflows/publish-stack-graphs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Rust environment
1717
uses: hecrj/setup-rust-action@v1
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
# TODO Verify the crate version matches the tag
2121
- name: Test crate
2222
run: cargo test --all-features
@@ -36,7 +36,7 @@ jobs:
3636
contents: write
3737
steps:
3838
- name: Checkout repository
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
4040
- name: Create GitHub release
4141
uses: ncipollo/release-action@v1
4242
with:

.github/workflows/publish-tree-sitter-stack-graphs-java.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Rust environment
1717
uses: hecrj/setup-rust-action@v1
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
# TODO Verify the crate version matches the tag
2121
- name: Test crate
2222
run: cargo test --all-features
@@ -36,7 +36,7 @@ jobs:
3636
contents: write
3737
steps:
3838
- name: Checkout repository
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
4040
- name: Create GitHub release
4141
uses: ncipollo/release-action@v1
4242
with:

.github/workflows/publish-tree-sitter-stack-graphs-javascript.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Rust environment
1717
uses: hecrj/setup-rust-action@v1
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
# TODO Verify the crate version matches the tag
2121
- name: Test crate
2222
run: cargo test --all-features
@@ -36,7 +36,7 @@ jobs:
3636
contents: write
3737
steps:
3838
- name: Checkout repository
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
4040
- name: Create GitHub release
4141
uses: ncipollo/release-action@v1
4242
with:

.github/workflows/publish-tree-sitter-stack-graphs-python.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Rust environment
1717
uses: hecrj/setup-rust-action@v1
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
# TODO Verify the crate version matches the tag
2121
- name: Test crate
2222
run: cargo test --all-features
@@ -36,7 +36,7 @@ jobs:
3636
contents: write
3737
steps:
3838
- name: Checkout repository
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
4040
- name: Create GitHub release
4141
uses: ncipollo/release-action@v1
4242
with:

.github/workflows/publish-tree-sitter-stack-graphs-typescript.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Rust environment
1717
uses: hecrj/setup-rust-action@v1
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
# TODO Verify the crate version matches the tag
2121
- name: Test crate
2222
run: cargo test --all-features
@@ -36,7 +36,7 @@ jobs:
3636
contents: write
3737
steps:
3838
- name: Checkout repository
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
4040
- name: Create GitHub release
4141
uses: ncipollo/release-action@v1
4242
with:

.github/workflows/publish-tree-sitter-stack-graphs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Rust environment
1717
uses: hecrj/setup-rust-action@v1
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
# TODO Verify the crate version matches the tag
2121
- name: Test crate
2222
run: cargo test --all-features
@@ -36,7 +36,7 @@ jobs:
3636
contents: write
3737
steps:
3838
- name: Checkout repository
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
4040
- name: Create GitHub release
4141
uses: ncipollo/release-action@v1
4242
with:

languages/tree-sitter-stack-graphs-java/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## v0.5.0 -- 2024-12-12
9+
10+
- The `tree-sitter-stack-graphs` dependency is updated to version 0.10.
11+
12+
- The `tree-sitter-java` dependency is updated to version 0.23.4.
13+
814
## v0.4.0 -- 2024-07-09
915

1016
### Added

languages/tree-sitter-stack-graphs-java/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tree-sitter-stack-graphs-java"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
description = "Stack graphs for the Java programming language"
55

66
homepage = "https://github.com/github/stack-graphs/tree/main/languages/tree-sitter-stack-graphs-java"
@@ -40,8 +40,8 @@ cli = ["anyhow", "clap", "tree-sitter-stack-graphs/cli"]
4040
[dependencies]
4141
anyhow = { version = "1.0", optional = true }
4242
clap = { version = "4", features = ["derive"], optional = true }
43-
tree-sitter-java = { version = "=0.20.2" }
44-
tree-sitter-stack-graphs = { version = "0.9", path = "../../tree-sitter-stack-graphs" } # explicit version is required to be able to publish crate
43+
tree-sitter-java = { version = "=0.23.4" }
44+
tree-sitter-stack-graphs = { version = "0.10", path = "../../tree-sitter-stack-graphs" } # explicit version is required to be able to publish crate
4545

4646
[dev-dependencies]
4747
anyhow = { version = "1.0" }

languages/tree-sitter-stack-graphs-java/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ To use this library, add the following to your `Cargo.toml`:
1313

1414
```toml
1515
[dependencies]
16-
tree-sitter-stack-graphs-java = "0.4"
16+
tree-sitter-stack-graphs-java = "0.5"
1717
```
1818

1919
Check out our [documentation](https://docs.rs/tree-sitter-stack-graphs-java/*/) for more details on how to use this library.

0 commit comments

Comments
 (0)