Fails when a committed notices file (THIRD-PARTY,
THIRD-PARTY-sidecar) differs from what tools/third-party-notices
writes from the crates linked into its binary. Fix with
buck2 run //tools/third-party-notices:update.
6fn check(file: &str, committed: &str, generated: &str) { 7 let read = |var: &str| std::fs::read_to_string(std::env::var(var).unwrap()).unwrap(); 8 let (generated, committed) = (read(generated), read(committed)); 9 assert!( 10 generated == committed, 11 "{file} is out of date; run `buck2 run //tools/third-party-notices:update`.\n\ 12 --- expected ---\n{}", 13 generated.lines().take_while(|l| !l.starts_with("====")).collect::<Vec<_>>().join("\n") 14 ); 15}