Skip to content

Commit

Permalink
Rust: add rust-specific deps updater script
Browse files Browse the repository at this point in the history
  • Loading branch information
Paolo Tranquilli committed Nov 18, 2024
1 parent e077bf0 commit 0943389
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust/ast-generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "ast-generator"
version = "0.1.0"
edition = "2021"

# When updating these dependencies, run `misc/bazel/3rdparty/update_cargo_deps.sh`
# When updating these dependencies, run `rust/update_cargo_deps.sh`
[dependencies]
ungrammar = "1.16.1"
proc-macro2 = "1.0.33"
Expand Down
2 changes: 1 addition & 1 deletion rust/extractor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "codeql-rust"
version = "0.1.0"
edition = "2021"

# When updating these dependencies, run `misc/bazel/3rdparty/update_cargo_deps.sh`
# When updating these dependencies, run `rust/update_cargo_deps.sh`
[dependencies]
anyhow = "1.0.86"
clap = { version = "4.5.16", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion rust/extractor/macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[lib]
proc-macro = true

# When updating these dependencies, run `misc/bazel/3rdparty/update_cargo_deps.sh`
# When updating these dependencies, run `rust/update_cargo_deps.sh`
[dependencies]
quote = "1.0.37"
syn = { version = "2.0.77", features = ["full"] }
9 changes: 9 additions & 0 deletions rust/update_cargo_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -eu

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

cd "$SCRIPT_DIR/.."
time bazel run //misc/bazel/3rdparty:vendor_tree_sitter_extractors
bazel mod tidy

0 comments on commit 0943389

Please sign in to comment.