mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-30 07:07:32 +00:00
Make code generation
just work
Contributors don't need to learn about `cargo xtask codegen` if `cargo test` just does the right thing.
This commit is contained in:
parent
abb6b8f14c
commit
1eb61203b7
8 changed files with 42 additions and 50 deletions
|
@ -18,7 +18,7 @@ use std::{
|
|||
};
|
||||
|
||||
use profile::StopWatch;
|
||||
use stdx::lines_with_ends;
|
||||
use stdx::{is_ci, lines_with_ends};
|
||||
use text_size::{TextRange, TextSize};
|
||||
|
||||
pub use dissimilar::diff as __diff;
|
||||
|
@ -376,6 +376,9 @@ pub fn try_ensure_file_contents(file: &Path, contents: &str) -> Result<(), ()> {
|
|||
"\n\x1b[31;1merror\x1b[0m: {} was not up-to-date, updating\n",
|
||||
display_path.display()
|
||||
);
|
||||
if is_ci() {
|
||||
eprintln!("\n NOTE: run `cargo test` locally and commit the updated files\n");
|
||||
}
|
||||
if let Some(parent) = file.parent() {
|
||||
let _ = std::fs::create_dir_all(parent);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue