Skip to content

Commit

Permalink
rust_builder: more reliable recovery from build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
generalmimon committed Sep 2, 2024
1 parent 42ed477 commit 5789f07
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion builder/rust_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ def create_project(mand_files, disp_files)

def build_project(log_file)
Dir.chdir(@base_spec_dir) do
cli = %w[cargo check --test spec --message-format json]
# We don't use `cargo check` here (which would seem like a more logical
# choice) because unfortunately it doesn't report all build errors, see
# https://doc.rust-lang.org/cargo/commands/cargo-check.html#description:
#
# > Some diagnostics and errors are only emitted during code generation,
# > so they inherently won't be reported with `cargo check`.
cli = %w[cargo test --no-run --test spec --message-format json]
run_cargo_build({}, cli, log_file).exitstatus
end
end
Expand Down

0 comments on commit 5789f07

Please sign in to comment.