From eff87d24fa3dfa9a57752c1ec34f816fbb8349c9 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Tue, 25 Feb 2025 13:15:19 +0100 Subject: [PATCH] Rust/Ruby/Python: update rustc and edition --- MODULE.bazel | 4 ++-- python/extractor/tsg-python/Cargo.toml | 2 +- python/extractor/tsg-python/rust-toolchain.toml | 7 ------- python/extractor/tsg-python/tsp/Cargo.toml | 2 +- ruby/extractor/Cargo.toml | 2 +- ruby/extractor/rust-toolchain.toml | 7 ------- rust-toolchain.toml | 8 ++++++++ rust/ast-generator/Cargo.toml | 2 +- rust/autobuild/Cargo.toml | 2 +- rust/extractor/Cargo.toml | 2 +- rust/extractor/macros/Cargo.toml | 2 +- shared/tree-sitter-extractor/Cargo.toml | 2 +- shared/tree-sitter-extractor/rust-toolchain.toml | 7 ------- 13 files changed, 18 insertions(+), 31 deletions(-) delete mode 100644 python/extractor/tsg-python/rust-toolchain.toml delete mode 100644 ruby/extractor/rust-toolchain.toml create mode 100644 rust-toolchain.toml delete mode 100644 shared/tree-sitter-extractor/rust-toolchain.toml diff --git a/MODULE.bazel b/MODULE.bazel index 427f450e7fc..c4a2526479a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -35,9 +35,9 @@ bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True # Keep edition and version approximately in sync with internal repo. # the versions there are canonical, the versions here are used for CI in github/codeql, as well as for the vendoring of dependencies. -RUST_EDITION = "2021" +RUST_EDITION = "2024" -RUST_VERSION = "1.82.0" +RUST_VERSION = "1.85.0" rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") rust.toolchain( diff --git a/python/extractor/tsg-python/Cargo.toml b/python/extractor/tsg-python/Cargo.toml index 259d2a7d353..7ad2c1c949e 100644 --- a/python/extractor/tsg-python/Cargo.toml +++ b/python/extractor/tsg-python/Cargo.toml @@ -4,7 +4,7 @@ name = "tsg-python" version = "0.1.0" authors = ["Taus Brock-Nannestad "] -edition = "2021" +edition = "2024" # When updating these dependencies, run `misc/bazel/3rdparty/update_cargo_deps.sh` [dependencies] diff --git a/python/extractor/tsg-python/rust-toolchain.toml b/python/extractor/tsg-python/rust-toolchain.toml deleted file mode 100644 index 5e0bcd3a476..00000000000 --- a/python/extractor/tsg-python/rust-toolchain.toml +++ /dev/null @@ -1,7 +0,0 @@ -# This file specifies the Rust version used to develop and test the Python -# extractor. It is set to the lowest version of Rust we want to support. - -[toolchain] -channel = "1.74" -profile = "minimal" -components = [ "rustfmt" ] diff --git a/python/extractor/tsg-python/tsp/Cargo.toml b/python/extractor/tsg-python/tsp/Cargo.toml index 29fec37f442..e3614456662 100644 --- a/python/extractor/tsg-python/tsp/Cargo.toml +++ b/python/extractor/tsg-python/tsp/Cargo.toml @@ -11,7 +11,7 @@ readme = "bindings/rust/README.md" keywords = ["incremental", "parsing", "python"] categories = ["parsing", "text-editors"] repository = "https://github.com/tree-sitter/tree-sitter-python" -edition = "2018" +edition = "2024" build = "bindings/rust/build.rs" include = [ diff --git a/ruby/extractor/Cargo.toml b/ruby/extractor/Cargo.toml index 89daac1d27e..8d3a94113fa 100644 --- a/ruby/extractor/Cargo.toml +++ b/ruby/extractor/Cargo.toml @@ -3,7 +3,7 @@ name = "codeql-extractor-ruby" description = "CodeQL Ruby extractor" version = "0.1.0" authors = ["GitHub"] -edition = "2021" +edition = "2024" # When updating these dependencies, run `misc/bazel/3rdparty/update_cargo_deps.sh` [dependencies] diff --git a/ruby/extractor/rust-toolchain.toml b/ruby/extractor/rust-toolchain.toml deleted file mode 100644 index aa02ff3d0bd..00000000000 --- a/ruby/extractor/rust-toolchain.toml +++ /dev/null @@ -1,7 +0,0 @@ -# This file specifies the Rust version used to develop and test the Ruby -# extractor. It is set to the lowest version of Rust we want to support. - -[toolchain] -channel = "1.74" -profile = "minimal" -components = [ "rustfmt" ] diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 00000000000..60e431ae883 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,8 @@ +# This file specifies the Rust version used to develop and test the +# extractors written in rust. It is set to the lowest version of Rust +# we want to support. + +[toolchain] +channel = "1.85" +profile = "minimal" +components = [ "clippy", "rustfmt" ] diff --git a/rust/ast-generator/Cargo.toml b/rust/ast-generator/Cargo.toml index 6a2db2b0da8..d239ed3de08 100644 --- a/rust/ast-generator/Cargo.toml +++ b/rust/ast-generator/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ast-generator" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT" # When updating these dependencies, run `rust/update_cargo_deps.sh` diff --git a/rust/autobuild/Cargo.toml b/rust/autobuild/Cargo.toml index 758ce92df29..240c1a89d48 100644 --- a/rust/autobuild/Cargo.toml +++ b/rust/autobuild/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "codeql-autobuilder-rust" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] codeql-extractor = { path = "../../shared/tree-sitter-extractor" } diff --git a/rust/extractor/Cargo.toml b/rust/extractor/Cargo.toml index dc58faa1ce2..3edcbc744db 100644 --- a/rust/extractor/Cargo.toml +++ b/rust/extractor/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "codeql-rust" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT" # When updating these dependencies, run `rust/update_cargo_deps.sh` diff --git a/rust/extractor/macros/Cargo.toml b/rust/extractor/macros/Cargo.toml index 24c5ff5171f..1f1c44b7d15 100644 --- a/rust/extractor/macros/Cargo.toml +++ b/rust/extractor/macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rust-extractor-macros" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT" [lib] diff --git a/shared/tree-sitter-extractor/Cargo.toml b/shared/tree-sitter-extractor/Cargo.toml index fba911e590f..a24523e7afb 100644 --- a/shared/tree-sitter-extractor/Cargo.toml +++ b/shared/tree-sitter-extractor/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "codeql-extractor" version = "0.2.0" -edition = "2021" +edition = "2024" authors = ["GitHub"] # When updating these dependencies, run `misc/bazel/3rdparty/update_cargo_deps.sh` diff --git a/shared/tree-sitter-extractor/rust-toolchain.toml b/shared/tree-sitter-extractor/rust-toolchain.toml deleted file mode 100644 index fc7eb0871cd..00000000000 --- a/shared/tree-sitter-extractor/rust-toolchain.toml +++ /dev/null @@ -1,7 +0,0 @@ -# This file specifies the Rust version used to develop and test the shared -# extractor. It is set to the lowest version of Rust we want to support. - -[toolchain] -channel = "1.74" -profile = "minimal" -components = [ "clippy", "rustfmt" ] \ No newline at end of file