From fecbb2fa3f96f1bb484987256bc37bac0a195efb Mon Sep 17 00:00:00 2001 From: Titus Fortner Date: Sat, 24 Jan 2026 01:58:12 -0600 Subject: [PATCH 1/4] [build] Separate rust from all: namespace --- .github/workflows/pre-release.yml | 2 +- .github/workflows/release.yml | 2 +- Rakefile | 29 ++++++++++++++++++----------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index b6466a15e6dd6..d656eeeabba07 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -140,7 +140,7 @@ jobs: uses: ./.github/workflows/bazel.yml with: name: Update Changelogs - run: ./go all:changelogs + run: ./go all:changelogs && ./go rust:changelogs artifact-name: patch-changelogs create-pr: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5873d55b230a0..8e424f8b80c66 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -145,7 +145,7 @@ jobs: uses: ./.github/workflows/bazel.yml with: name: Reset Versions - run: ./go all:version nightly + run: ./go all:version nightly && ./go rust:version nightly artifact-name: version-reset update-version: diff --git a/Rakefile b/Rakefile index e5fcf84f84133..f337b6de31dc6 100644 --- a/Rakefile +++ b/Rakefile @@ -112,11 +112,13 @@ task :prep_release, [:version, :channel] do |_task, arguments| Rake::Task['authors'].invoke Rake::Task['all:version'].invoke(version) Rake::Task['all:changelogs'].invoke + Rake::Task['rust:changelogs'].invoke end -desc 'Run linters for all languages (skip languages with: ./go lint -rb -rust)' +desc 'Run linters for all languages (skip with: ./go lint -rb -rust)' task :lint do |_task, arguments| failures = [] + skip = arguments.to_a.select { |a| a.start_with?('-') }.map { |a| a.delete_prefix('-') } begin Rake::Task['all:lint'].invoke(*arguments.to_a) @@ -124,6 +126,15 @@ task :lint do |_task, arguments| failures << e.message end + unless skip.include?('rust') + puts 'Linting rust...' + begin + Rake::Task['rust:lint'].invoke + rescue StandardError => e + failures << "rust: #{e.message}" + end + end + puts 'Linting Bazel files...' begin Bazel.execute('run', [], '//:buildifier') @@ -162,20 +173,18 @@ end task 'release-java' => 'java:release' namespace :all do - desc 'Pin dependencies for all languages' + desc 'Pin dependencies for all language bindings' task :pin do Rake::Task['java:pin'].invoke Rake::Task['rb:pin'].invoke - Rake::Task['rust:pin'].invoke Rake::Task['node:pin'].invoke Rake::Task['dotnet:pin'].invoke end - desc 'Update dependencies for all languages' + desc 'Update dependencies for all language bindings' task :update do Rake::Task['java:update'].invoke Rake::Task['rb:update'].invoke - Rake::Task['rust:update'].invoke Rake::Task['node:update'].invoke Rake::Task['dotnet:update'].invoke end @@ -238,9 +247,9 @@ namespace :all do Rake::Task['node:release'].invoke(*args) end - desc 'Run linters for all languages (skip with: ./go all:lint -rb -rust)' + desc 'Run linters for all language bindings (skip with: ./go all:lint -rb)' task :lint do |_task, arguments| - all_langs = %w[java py rb node rust] + all_langs = %w[java py rb node] skip = arguments.to_a.select { |a| a.start_with?('-') }.map { |a| a.delete_prefix('-') } invalid = skip - all_langs raise "Unknown languages: #{invalid.join(', ')}. Valid: #{all_langs.join(', ')}" if invalid.any? @@ -256,7 +265,7 @@ namespace :all do raise "Lint failed:\n#{failures.join("\n")}" unless failures.empty? end - desc 'Update all versions' + desc 'Update versions for all language bindings' task :version, [:version] do |_task, arguments| version = arguments[:version] || 'nightly' puts "Updating all versions to #{version}" @@ -266,7 +275,6 @@ namespace :all do Rake::Task['node:version'].invoke(version) Rake::Task['py:version'].invoke(version) Rake::Task['dotnet:version'].invoke(version) - Rake::Task['rust:version'].invoke(version) unless version == 'nightly' major_minor = arguments[:version][/^\d+\.\d+/] @@ -278,7 +286,7 @@ namespace :all do end end - desc 'Update all changelogs' + desc 'Update changelogs for all language bindings' task :changelogs do |_task, _arguments| puts 'Updating all changelogs' Rake::Task['java:changelogs'].invoke @@ -286,6 +294,5 @@ namespace :all do Rake::Task['node:changelogs'].invoke Rake::Task['py:changelogs'].invoke Rake::Task['dotnet:changelogs'].invoke - Rake::Task['rust:changelogs'].invoke end end From 1e5ac1d4f9c6f69e02ed5be256b571dc4531e703 Mon Sep 17 00:00:00 2001 From: Titus Fortner Date: Sat, 24 Jan 2026 08:13:11 -0600 Subject: [PATCH 2/4] [build] Filter -rust arg before passing to all:lint --- Rakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index f337b6de31dc6..a7cedb0bf4ee8 100644 --- a/Rakefile +++ b/Rakefile @@ -119,9 +119,10 @@ desc 'Run linters for all languages (skip with: ./go lint -rb -rust)' task :lint do |_task, arguments| failures = [] skip = arguments.to_a.select { |a| a.start_with?('-') }.map { |a| a.delete_prefix('-') } + binding_args = arguments.to_a.reject { |a| a == '-rust' } begin - Rake::Task['all:lint'].invoke(*arguments.to_a) + Rake::Task['all:lint'].invoke(*binding_args) rescue StandardError => e failures << e.message end From 655245155ec23c67ec71c1c40010217ca0b0bac0 Mon Sep 17 00:00:00 2001 From: Titus Fortner Date: Sat, 24 Jan 2026 08:14:29 -0600 Subject: [PATCH 3/4] [build] Simplify skip_rust variable in lint task --- Rakefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index a7cedb0bf4ee8..b2f3d0a209d15 100644 --- a/Rakefile +++ b/Rakefile @@ -118,16 +118,15 @@ end desc 'Run linters for all languages (skip with: ./go lint -rb -rust)' task :lint do |_task, arguments| failures = [] - skip = arguments.to_a.select { |a| a.start_with?('-') }.map { |a| a.delete_prefix('-') } - binding_args = arguments.to_a.reject { |a| a == '-rust' } + skip_rust = arguments.to_a.include?('-rust') begin - Rake::Task['all:lint'].invoke(*binding_args) + Rake::Task['all:lint'].invoke(*arguments.to_a.reject { |a| a == '-rust' }) rescue StandardError => e failures << e.message end - unless skip.include?('rust') + unless skip_rust puts 'Linting rust...' begin Rake::Task['rust:lint'].invoke From d509b1fc0c29d3ad5327078af43f75cf3a984460 Mon Sep 17 00:00:00 2001 From: Titus Fortner Date: Sat, 24 Jan 2026 08:22:53 -0600 Subject: [PATCH 4/4] [build] Simplify lint task rust handling with delete --- Rakefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Rakefile b/Rakefile index b2f3d0a209d15..e9dea9ded3918 100644 --- a/Rakefile +++ b/Rakefile @@ -118,15 +118,9 @@ end desc 'Run linters for all languages (skip with: ./go lint -rb -rust)' task :lint do |_task, arguments| failures = [] - skip_rust = arguments.to_a.include?('-rust') + values = arguments.to_a - begin - Rake::Task['all:lint'].invoke(*arguments.to_a.reject { |a| a == '-rust' }) - rescue StandardError => e - failures << e.message - end - - unless skip_rust + unless values.delete('-rust') puts 'Linting rust...' begin Rake::Task['rust:lint'].invoke @@ -135,6 +129,12 @@ task :lint do |_task, arguments| end end + begin + Rake::Task['all:lint'].invoke(*values) + rescue StandardError => e + failures << e.message + end + puts 'Linting Bazel files...' begin Bazel.execute('run', [], '//:buildifier')