Skip to content

Commit a8e4fa0

Browse files
Merge pull request #411 from github/dependency-version-cleanup
2 parents 90f5ec5 + a7f9d9c commit a8e4fa0

File tree

11 files changed

+61
-42
lines changed

11 files changed

+61
-42
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ jobs:
1717
strategy:
1818
matrix:
1919
rust: [stable]
20+
env:
21+
# cargo hack does not use the default-members in Cargo.toml, so we restrict to those explicitly
22+
CARGO_HACK: cargo hack -p lsp-positions -p stack-graphs -p tree-sitter-stack-graphs --feature-powerset --exclude-features copious-debugging
2023

2124
steps:
2225
- name: Install Rust environment
2326
uses: hecrj/setup-rust-action@v1
2427
with:
2528
rust-version: ${{ matrix.rust }}
29+
- name: Install cargo-hack
30+
run: cargo install cargo-hack
2631
- name: Checkout code
2732
uses: actions/checkout@v3
2833
- name: Check formatting
@@ -36,28 +41,24 @@ jobs:
3641
key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }}
3742
restore-keys: |
3843
${{ runner.OS }}-cargo-
44+
- name: Build library (all feature combinations)
45+
run: ${{ env.CARGO_HACK }} --no-dev-deps build
46+
- name: Run test suite (all feature combinations)
47+
run: ${{ env.CARGO_HACK }} test
48+
- name: Run test suite with all optimizations (default features)
49+
run: cargo test --release
3950
- name: Install cargo-valgrind
4051
run: |
4152
sudo apt-get update
4253
sudo apt-get install -y valgrind
4354
cargo install cargo-valgrind
44-
- name: Build library
45-
run: cargo build
55+
- name: Run test suite under valgrind (default features)
56+
# We only need to use valgrind to test the crates that have C bindings.
57+
run: cargo valgrind test -p stack-graphs
4658
- name: Ensure C headers are up to date
4759
run: |
4860
script/cbindgen
4961
test -z "$(git status --porcelain)"
50-
- name: Run test suite
51-
run: cargo test
52-
- name: Run test suite under valgrind
53-
# We only need to use valgrind to test the crates that have C bindings.
54-
run: cargo valgrind test -p stack-graphs
55-
- name: Run lsp-positions tests without tree-sitter
56-
run: cargo test -p lsp-positions --no-default-features
57-
- name: Run test suite with all features enabled
58-
run: cargo test --all-features
59-
- name: Run test suite with all optimizations
60-
run: cargo test --release
6162
6263
test-init:
6364
needs: [test-rust]
@@ -112,6 +113,8 @@ jobs:
112113
uses: hecrj/setup-rust-action@v1
113114
with:
114115
rust-version: ${{ matrix.rust }}
116+
- name: Install cargo-hack
117+
run: cargo install cargo-hack
115118
- name: Cache dependencies
116119
uses: actions/cache@v3
117120
with:
@@ -123,10 +126,10 @@ jobs:
123126
${{ runner.OS }}-cargo-
124127
- name: Checkout code
125128
uses: actions/checkout@v3
126-
- name: Build
127-
run: cargo build -p ${{ matrix.language }}
128-
- name: Test
129-
run: cargo test -p ${{ matrix.language }}
129+
- name: Build (all feature combinations)
130+
run: cargo hack -p ${{ matrix.language }} --feature-powerset build
131+
- name: Test (all features)
132+
run: cargo test -p ${{ matrix.language }} --all-features
130133

131134
test-cli:
132135
runs-on: ubuntu-latest

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ keywords = ["tree-sitter", "stack-graphs", "java"]
2323
[[bin]]
2424
name = "tree-sitter-stack-graphs-java"
2525
path = "rust/bin.rs"
26+
required-features = ["cli"]
2627

2728
[lib]
2829
path = "rust/lib.rs"
@@ -33,8 +34,15 @@ name = "test"
3334
path = "rust/test.rs"
3435
harness = false # need to provide own main function to handle running tests
3536

37+
[features]
38+
cli = ["anyhow", "clap", "tree-sitter-stack-graphs/cli"]
39+
3640
[dependencies]
37-
anyhow = "1.0"
38-
clap = { version = "4", features = ["derive"] }
39-
tree-sitter-stack-graphs = { version = "0.7", path = "../../tree-sitter-stack-graphs", features=["cli"] }
41+
anyhow = { version = "1.0", optional = true }
42+
clap = { version = "4", features = ["derive"], optional = true }
4043
tree-sitter-java = { version = "=0.20.0" }
44+
tree-sitter-stack-graphs = { version = "0.8", path = "../../tree-sitter-stack-graphs" }
45+
46+
[dev-dependencies]
47+
anyhow = { version = "1.0" }
48+
tree-sitter-stack-graphs = { version = "0.8", path = "../../tree-sitter-stack-graphs", features = ["cli"] }

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ clap = { version = "4", optional = true }
3131
serde = { version = "1.0", features = ["derive"] }
3232
serde_json = "1.0"
3333
stack-graphs = { version = "0.12", path = "../../stack-graphs" }
34-
tree-sitter-stack-graphs = { version = "0.7", path = "../../tree-sitter-stack-graphs" }
34+
tree-sitter-stack-graphs = { version = "0.8", path = "../../tree-sitter-stack-graphs" }
3535
tree-sitter-javascript = { git = "https://github.com/tree-sitter/tree-sitter-javascript", rev = "5720b249490b3c17245ba772f6be4a43edb4e3b7" }
3636

3737
[dev-dependencies]
3838
anyhow = "1.0"
39-
tree-sitter-stack-graphs = { version = "0.7", path = "../../tree-sitter-stack-graphs", features = ["cli"] }
39+
tree-sitter-stack-graphs = { version = "0.8", path = "../../tree-sitter-stack-graphs", features = ["cli"] }

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ cli = ["anyhow", "clap", "tree-sitter-stack-graphs/cli"]
3030
[dependencies]
3131
anyhow = { version = "1.0", optional = true }
3232
clap = { version = "4", optional = true, features = ["derive"] }
33-
tree-sitter-stack-graphs = { version = "0.7", path = "../../tree-sitter-stack-graphs" }
33+
tree-sitter-stack-graphs = { version = "0.8", path = "../../tree-sitter-stack-graphs" }
3434
tree-sitter-python = "=0.20.4"
3535

3636
[dev-dependencies]
3737
anyhow = "1.0"
38-
tree-sitter-stack-graphs = { version = "0.7", path = "../../tree-sitter-stack-graphs", features = ["cli"] }
38+
tree-sitter-stack-graphs = { version = "0.8", path = "../../tree-sitter-stack-graphs", features = ["cli"] }

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ glob = "0.3"
3333
serde = { version = "1.0", features = ["derive"] }
3434
serde_json = "1.0"
3535
stack-graphs = { version = ">=0.11, <=0.12", path = "../../stack-graphs" }
36-
tree-sitter-stack-graphs = { version = "0.7", path = "../../tree-sitter-stack-graphs" }
36+
tree-sitter-stack-graphs = { version = "0.8", path = "../../tree-sitter-stack-graphs" }
3737
tree-sitter-typescript = "=0.20.2"
3838
tsconfig = "0.1.0"
3939

4040
[dev-dependencies]
4141
anyhow = { version = "1.0" }
42-
tree-sitter-stack-graphs = { version = "0.7", path = "../../tree-sitter-stack-graphs", features = ["cli"] }
42+
tree-sitter-stack-graphs = { version = "0.8", path = "../../tree-sitter-stack-graphs", features = ["cli"] }

lsp-positions/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ 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.3.3 -- 2024-03-05
9+
10+
The `tree-sitter` dependency version was updated to fix install problems.
11+
812
## v0.3.2 -- 2023-06-08
913

1014
### Added

lsp-positions/Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lsp-positions"
3-
version = "0.3.2"
3+
version = "0.3.3"
44
description = "LSP-compatible character positions"
55
homepage = "https://github.com/github/stack-graphs/tree/main/lsp-positions"
66
repository = "https://github.com/github/stack-graphs/"
@@ -22,7 +22,9 @@ tree-sitter = ["dep:tree-sitter"]
2222

2323
[dependencies]
2424
memchr = "2.4"
25-
tree-sitter = { version=">= 0.19", optional=true }
26-
unicode-segmentation = { version="1.8" }
27-
serde = { version="1", optional=true, features=["derive"] }
28-
bincode = { version="2.0.0-rc.3", optional=true }
25+
tree-sitter = { version = "0.20", optional = true } # keep the same minor version as the tree-sitter
26+
# dependency of tree-sitter-stack-graphs to prevent
27+
# install problems
28+
unicode-segmentation = { version = "1.8" }
29+
serde = { version = "1", features = ["derive"], optional = true }
30+
bincode = { version = "2.0.0-rc.3", optional = true }

stack-graphs/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ test = false
2525

2626
[dependencies]
2727
bincode = { version = "2.0.0-rc.3", optional = true }
28-
bitvec = "1.0"
29-
controlled-option = "0.4"
28+
bitvec = "1.0.1"
29+
controlled-option = "0.4.1"
3030
either = "1.6"
3131
enumset = "1.1"
3232
fxhash = "0.2"
33-
itertools = "0.10"
33+
itertools = "0.10.2"
3434
libc = "0.2"
3535
lsp-positions = { version = "0.3", path = "../lsp-positions" }
3636
rusqlite = { version = "0.28", optional = true, features = ["bundled", "functions"] }
@@ -42,7 +42,6 @@ thiserror = { version = "1.0" }
4242

4343
[dev-dependencies]
4444
assert-json-diff = "2"
45-
itertools = "0.10"
4645
maplit = "1.0"
4746
pretty_assertions = "0.7"
4847
serde_json = { version = "1.0" }

tree-sitter-stack-graphs/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ 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-
## Unreleased
8+
## v0.8.0 -- 2024-03-05
9+
10+
The `tree-sitter` dependency version was updated to fix install problems.
911

1012
### Library
1113

tree-sitter-stack-graphs/Cargo.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tree-sitter-stack-graphs"
3-
version = "0.7.1"
3+
version = "0.8.0"
44
description = "Create stack graphs using tree-sitter parsers"
55
homepage = "https://github.com/github/stack-graphs/tree/main/tree-sitter-stack-graphs"
66
repository = "https://github.com/github/stack-graphs/"
@@ -49,12 +49,12 @@ lsp = [
4949
]
5050

5151
[dependencies]
52-
anyhow = "1.0"
52+
anyhow = "1.0.4"
5353
base64 = { version = "0.21", optional = true }
5454
capture-it = { version = "0.3", optional = true }
5555
clap = { version = "4", optional = true, features = ["derive"] }
5656
colored = { version = "2.0", optional = true }
57-
controlled-option = ">=0.4"
57+
controlled-option = "0.4.1"
5858
crossbeam-channel = { version = "0.5", optional = true }
5959
dialoguer = { version = "0.10", optional = true }
6060
dirs = { version = "5", optional = true }
@@ -69,12 +69,13 @@ regex = "1"
6969
rust-ini = "0.18"
7070
serde_json = { version="1.0", optional=true }
7171
sha1 = { version="0.10", optional=true }
72-
stack-graphs = { version=">=0.11, <=0.12", path="../stack-graphs" }
72+
stack-graphs = { version="0.12", path="../stack-graphs" }
7373
thiserror = "1.0"
7474
time = { version = "0.3", optional = true }
7575
tokio = { version = "1.26", optional = true, features = ["io-std", "rt", "rt-multi-thread"] }
7676
tower-lsp = { version = "0.19", optional = true }
77-
tree-sitter = ">= 0.19"
77+
tree-sitter = "0.20" # keep the same minor version as the tree-sitter dependency
78+
# of tree-sitter-graph to prevent install problems
7879
tree-sitter-config = { version = "0.19", optional = true }
7980
tree-sitter-graph = "0.11"
8081
tree-sitter-loader = "0.20"

0 commit comments

Comments
 (0)