rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

rustfmt on linux crashing with `ignore`

Open otiv-emiel-vanseveren opened this issue 1 year ago • 5 comments

command ran: bazel run @rules_rust//:rustfmt --@rules_rust//:rustfmt.toml=//:rustfmt.toml --output_groups=+rustfmt_checks

rustfmt.toml: max_width = 100 imports_granularity = "Module" group_imports = "StdExternalCrate" ignore = ["third_party/"]

output: rustc-ice-2024-06-05T14_37_14-130215.txt

otiv-emiel-vanseveren avatar Jun 05 '24 14:06 otiv-emiel-vanseveren

Managed to pin it down. It is related to the ignore config opt in rustfmt.toml.

otiv-emiel-vanseveren avatar Jun 05 '24 14:06 otiv-emiel-vanseveren

I suppose it should be part of: https://github.com/rust-lang/rustfmt/issues/3395?

otiv-emiel-vanseveren avatar Jun 05 '24 14:06 otiv-emiel-vanseveren

@otiv-emiel-vanseveren thanks for the report. I'm personally not familiar with bazel. Is this issue reproducible without using bazel? Also, Do you have a repo you can link to that can be used to reproduce this problem?

ytmimi avatar Jun 05 '24 15:06 ytmimi

I'll see if I can reproduce it over the weekend.

otiv-emiel-vanseveren avatar Jun 07 '24 08:06 otiv-emiel-vanseveren

@ytmimi,

Sorry for the late response, I've been a bit busy the last couple of weeks. Here is a reproducible using bazel: https://github.com/emielvanseveren/bazel-rustfmt-ignore. I have not tried with cargo. Steps are in readme!

otiv-emiel-vanseveren avatar Jun 19 '24 20:06 otiv-emiel-vanseveren