mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
fix(fmt): add the file path to the panic messages when formatting is unstable (#15693)
This commit is contained in:
parent
5f251b283b
commit
79fe8ffff8
1 changed files with 5 additions and 3 deletions
|
@ -454,8 +454,9 @@ fn format_ensure_stable(
|
||||||
"Formatting succeeded initially, but failed when ensuring a ",
|
"Formatting succeeded initially, but failed when ensuring a ",
|
||||||
"stable format. This indicates a bug in the formatter where ",
|
"stable format. This indicates a bug in the formatter where ",
|
||||||
"the text it produces is not syntatically correct. As a temporary ",
|
"the text it produces is not syntatically correct. As a temporary ",
|
||||||
"workfaround you can ignore this file.\n\n{:#}"
|
"workfaround you can ignore this file ({}).\n\n{:#}"
|
||||||
),
|
),
|
||||||
|
file_path.display(),
|
||||||
err,
|
err,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -465,10 +466,11 @@ fn format_ensure_stable(
|
||||||
panic!(
|
panic!(
|
||||||
concat!(
|
concat!(
|
||||||
"Formatting not stable. Bailed after {} tries. This indicates a bug ",
|
"Formatting not stable. Bailed after {} tries. This indicates a bug ",
|
||||||
"in the formatter where it formats the file differently each time. As a ",
|
"in the formatter where it formats the file ({}) differently each time. As a ",
|
||||||
"temporary workaround you can ignore this file."
|
"temporary workaround you can ignore this file."
|
||||||
),
|
),
|
||||||
count
|
count,
|
||||||
|
file_path.display(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue