Closed coolcatcoder closed 1 month ago
Huh, it somehow fixed itself, while I carred on coding, something made it start working again, I don't know what. I committed when the fmt was broken though, luckily. (I can try figure out a min code replication of the issue if you want me to?)
@coolcatcoder thanks for the report. it would be helpful to know what version of rustfmt you're using.
Also, without a code snippet that reproduces the problem there's very little anyone can do to help.
(Sorry for the late reply!) I was using rustfmt 1.8.0-nightly (fa724e5d8c 2024-09-27). I've attempted and failed to come up with a way to reproduce the problem. I can give you the 800 line file if you want? (The 800 line file does fail to fmt in the playground, so it is consistent!) I'll leave it here, incase you want it.
Thanks for the link, though 800 lines is a lot to go through. We can reopen this if you're able to get this down to a smaller reproducible example. rustfmt works on code that doesn't compile as long as it parses, so if you don't need certain struct, enum, trait, or function definitions to reproduce the issue you can consider removing them to narrow this down.
I think I broke rustfmt as in my project it doesn't format:
In the playground, it removes all the whitespace. What I've tried:
[proc-macro (2021)] "/home/coolcatcoder/Documents/GitHub/ransacked_and_recycled/procedural_macros/src/lib.rs" [bin (2021)] "/home/coolcatcoder/Documents/GitHub/ransacked_and_recycled/src/main.rs" rustfmt --edition 2021 /home/coolcatcoder/Documents/GitHub/ransacked_and_recycled/procedural_macros/src/lib.rs /home/coolcatcoder/Documents/GitHub/ransacked_and_recycled/src/main.rs
What further troubleshooting steps can I try? (My project is using nightly, in case that is of relevance.)