-
Notifications
You must be signed in to change notification settings - Fork 850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is cargo fmt no longer working properly in parquet crate #6179
Comments
Fascinatingly, I am seeing the same thing For example I deliberately introduced a formatting issue:
And then when I ran fmt it didn't seem to fix it andrewlamb@Andrews-MacBook-Pro-2:~/Software/arrow-rs$ cargo fmt
andrewlamb@Andrews-MacBook-Pro-2:~/Software/arrow-rs$ git diff
diff --git a/parquet/src/compression.rs b/parquet/src/compression.rs
index 10560210e4e..119af7e156f 100644
--- a/parquet/src/compression.rs
+++ b/parquet/src/compression.rs
@@ -15,6 +15,10 @@
// specific language governing permissions and limitations
// under the License.
+
+
+
+
//! Contains codec interface and supported codec implementations.
//!
//! See [`Compression`](crate::basic::Compression) enum for all available compression andrewlamb@Andrews-MacBook-Pro-2:~/Software/arrow-rs$ cargo --version
cargo 1.80.0 (376290515 2024-07-16)
andrewlamb@Andrews-MacBook-Pro-2:~/Software/arrow-rs$ rustfmt --version
rustfmt 1.7.0-stable (05147895 2024-07-21)
andrewlamb@Andrews-MacBook-Pro-2:~/Software/arrow-rs$ |
It's the first time for me to know |
I tried reverting #5727 and still no output :( |
Still tracking this. Here's a list of non-compliant files in the parquet source (
|
Ah, so apparently rustfmt will not format modules that are declared in macros, such as those in the Lines 132 to 137 in a937869
There is an open issue for this rust-lang/rustfmt#3253 One workaround is to tack a list of files to format to the end of the commandline
Perhaps something like this could be added to Edit: this has also been a problem in DataFusion apache/datafusion#9367. I don't know if a similar solution would work here. |
Which part is this question about
Code formatter.
Describe your question
I've noticed recently that running
cargo fmt
while I'm editing files doesn't always seem to catch problems. Running rustfmt directly will work. For instance, runningcargo fmt
on the parquet crate yields no output.But there are files that when run manually do (running the rustfmt command line above with the addition of
parquet/src/compression.rs
):Additional context
There are many reports of fmt silently failing, one such is rust-lang/rustfmt#3008.
Has anyone else noticed this or is it something to do with my setup.
The text was updated successfully, but these errors were encountered: