<commit_before>use std::process::{Command, exit};

fn main() {
  println!("cargo:rerun-if-changed=../../../../../3rdparty/protobuf");
  println!("cargo:rerun-if-changed=generate-grpc.sh");
  let output = Command::new("./generate-grpc.sh").output().unwrap();

  print!("{}", String::from_utf8(output.stdout).unwrap());
  eprint!("{}", String::from_utf8(output.stderr).unwrap());
  exit(output.status.code().unwrap());
}<commit_msg>Re-generate protos if the proto compiler changes (#5138)<commit_after>use std::env::home_dir;
use std::process::{Command, exit};

fn main() {
  println!("cargo:rerun-if-changed=../../../../../3rdparty/protobuf");
  println!("cargo:rerun-if-changed=generate-grpc.sh");

  let cachedir = home_dir().unwrap().join(".cache").join("pants").join("rust").join("cargo").join("bin");
  println!("cargo:rerun-if-changed={}", cachedir.join("grpc_rust_plugin").to_str().unwrap());
  println!("cargo:rerun-if-changed={}", cachedir.join("protoc-gen-rust").to_str().unwrap());

  let output = Command::new("./generate-grpc.sh").output().unwrap();

  print!("{}", String::from_utf8(output.stdout).unwrap());
  eprint!("{}", String::from_utf8(output.stderr).unwrap());
  exit(output.status.code().unwrap());
}
{'fraction_non_alphanumeric': 0.2635024549918167, 'fraction_numerical': 0.008183306055646482, 'mean_word_length': 5.870786516853933, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2648849', 'n_tokens_mistral': 414, 'n_tokens_neox': 428, 'n_words': 46}