Skip to content
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

x.py fmt counts untracked files as formatted? #114245

Closed
matthiaskrgr opened this issue Jul 30, 2023 · 4 comments · Fixed by #114347
Closed

x.py fmt counts untracked files as formatted? #114245

matthiaskrgr opened this issue Jul 30, 2023 · 4 comments · Fixed by #114347
Assignees
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@matthiaskrgr
Copy link
Member

x.py fmt

Building bootstrap
    Finished dev [unoptimized] target(s) in 0.03s
skip untracked path CFI/ during rustfmt invocations
skip untracked path builtin-if-attr during rustfmt invocations
skip untracked path empty_loop_no_std.empty_loop_no_std.55ad194a3f0b8c5c-cgu.0.rcgu.o during rustfmt invocations
skip untracked path extern-pass-empty.31bnas3moprck8a2.rcgu.o during rustfmt invocations
skip untracked path extern-pass-empty.extern_pass_empty.2ec280413e876a6-cgu.0.rcgu.o during rustfmt invocations
skip untracked path g.rs during rustfmt invocations
skip untracked path i128-ffi.i128_ffi.d477614a46ba15bc-cgu.0.rcgu.o during rustfmt invocations
skip untracked path i128-ffi.t7gts03wicdfebn.rcgu.o during rustfmt invocations
skip untracked path issue-19404 during rustfmt invocations
skip untracked path issue-20413.long-type-10638220638324922248.txt during rustfmt invocations
skip untracked path issue-20413.long-type-11228194758701975253.txt during rustfmt invocations
skip untracked path issue-20413.long-type-12441605058349472596.txt during rustfmt invocations
skip untracked path issue-20413.long-type-13451798998862434544.txt during rustfmt invocations
skip untracked path issue-20413.long-type-14449495816477765806.txt during rustfmt invocations
skip untracked path issue-20413.long-type-14505929310773279803.txt during rustfmt invocations
skip untracked path issue-20413.long-type-14852489453141733921.txt during rustfmt invocations
skip untracked path issue-20413.long-type-14888562162413868840.txt during rustfmt invocations
skip untracked path issue-20413.long-type-15093432779245722597.txt during rustfmt invocations
skip untracked path issue-20413.long-type-15274469213592336197.txt during rustfmt invocations
skip untracked path issue-20413.long-type-15523334564825316665.txt during rustfmt invocations
skip untracked path issue-20413.long-type-15695678616872461822.txt during rustfmt invocations
skip untracked path issue-20413.long-type-15720003520161168908.txt during rustfmt invocations
skip untracked path issue-20413.long-type-16005543650893221049.txt during rustfmt invocations
skip untracked path issue-20413.long-type-16140680409752953463.txt during rustfmt invocations
skip untracked path issue-20413.long-type-16686898925255479268.txt during rustfmt invocations
skip untracked path issue-20413.long-type-17063615432857654969.txt during rustfmt invocations
skip untracked path issue-20413.long-type-17068662173100362435.txt during rustfmt invocations
skip untracked path issue-20413.long-type-17303538030973117523.txt during rustfmt invocations
skip untracked path issue-20413.long-type-17312692751579885431.txt during rustfmt invocations
skip untracked path issue-20413.long-type-17605671593911897879.txt during rustfmt invocations
skip untracked path issue-20413.long-type-17650919756409060229.txt during rustfmt invocations
skip untracked path issue-20413.long-type-17791541038031539933.txt during rustfmt invocations
skip untracked path issue-20413.long-type-17997845345089616783.txt during rustfmt invocations
skip untracked path issue-20413.long-type-18346418554812647513.txt during rustfmt invocations
skip untracked path issue-20413.long-type-194041651388418507.txt during rustfmt invocations
skip untracked path issue-20413.long-type-248785072400335088.txt during rustfmt invocations
skip untracked path issue-20413.long-type-2554290728674121708.txt during rustfmt invocations
skip untracked path issue-20413.long-type-2883359234157588988.txt during rustfmt invocations
skip untracked path issue-20413.long-type-3493293700387274760.txt during rustfmt invocations
skip untracked path issue-20413.long-type-4881330493956353089.txt during rustfmt invocations
skip untracked path issue-20413.long-type-4973826905441724252.txt during rustfmt invocations
skip untracked path issue-20413.long-type-5276912186728766415.txt during rustfmt invocations
skip untracked path issue-20413.long-type-574261962865754922.txt during rustfmt invocations
skip untracked path issue-20413.long-type-6504647325420314102.txt during rustfmt invocations
skip untracked path issue-20413.long-type-6576709350834386091.txt during rustfmt invocations
skip untracked path issue-20413.long-type-6596592717041070711.txt during rustfmt invocations
skip untracked path issue-20413.long-type-7620950825918746040.txt during rustfmt invocations
skip untracked path issue-20413.long-type-7955578633764940934.txt during rustfmt invocations
skip untracked path issue-20413.long-type-9340496498932290372.txt during rustfmt invocations
skip untracked path issue-36278-prefix-nesting during rustfmt invocations
skip untracked path issue-49685 during rustfmt invocations
skip untracked path issue-53448 during rustfmt invocations
skip untracked path kindck-owned-contains-1 during rustfmt invocations
skip untracked path libextern_fake_libc.rlib during rustfmt invocations
skip untracked path libfoo.rlib during rustfmt invocations
skip untracked path libissue_3302.rlib during rustfmt invocations
skip untracked path libissue_36278_prefix_nesting.rlib during rustfmt invocations
skip untracked path libissue_96572_unconstrained.rlib during rustfmt invocations
skip untracked path liblib.rlib during rustfmt invocations
skip untracked path liboffset_from.rlib during rustfmt invocations
skip untracked path libparam_env_normalize_cycle.rlib during rustfmt invocations
skip untracked path libprecise_drop_with_promoted.rlib during rustfmt invocations
skip untracked path librust_out.rlib during rustfmt invocations
skip untracked path libslice_iter_len_eq_zero.rlib during rustfmt invocations
skip untracked path libtry_identity.rlib during rustfmt invocations
skip untracked path libwindows_init_once.rlib during rustfmt invocations
skip untracked path mir_dump/ during rustfmt invocations
skip untracked path out1 during rustfmt invocations
skip untracked path out2 during rustfmt invocations
skip untracked path regions-reassign-let-bound-pointer during rustfmt invocations
skip untracked path regions-scope-chain-example during rustfmt invocations
skip untracked path rustc-ice-2023-07-27T16:13:49.620524059Z-644092.txt during rustfmt invocations
skip untracked path rustc-ice-2023-07-28T17:23:47.036524856Z-3658405.txt during rustfmt invocations
skip untracked path rustc-ice-2023-07-28T17:24:51.673713381Z-3672316.txt during rustfmt invocations
skip untracked path send-bound-async-closure during rustfmt invocations
skip untracked path tests/ui/associated-types/errors.json during rustfmt invocations
skip untracked path tests/ui/associated-types/errors_tmp.json during rustfmt invocations
skip untracked path tests/ui/errors_tmp.json during rustfmt invocations
skip untracked path tests/ui/icemaker/ during rustfmt invocations
skip untracked path type-alias-bounds during rustfmt invocations
skip untracked path unsupported_foreign_function.2odg28v9p9yf1yd1.rcgu.o during rustfmt invocations
skip untracked path unsupported_foreign_function.unsupported_foreign_function.330a639339860b6f-cgu.0.rcgu.o during rustfmt invocations
skip untracked path with during rustfmt invocations
skip untracked path without during rustfmt invocations
skip untracked path wrong_self_convention.mir during rustfmt invocations
skip untracked path zero_ptr_no_std.zero_ptr_no_std.2f4525ad60188a12-cgu.0.rcgu.o during rustfmt invocations
formatting 73 modified files
Build completed successfully in 0:00:01

The skipped files are files in the repo that are not tracked by git.
It looks like they might still get added to the "formatted modified file" counter?

I have no other changed files in the repo, so I wonder what rustfmt is saying to have formatted here 😅

at 13:04:33 ❯ git status
On branch fmt_args_rustc_2
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	CFI/
	builtin-if-attr
	empty_loop_no_std.empty_loop_no_std.55ad194a3f0b8c5c-cgu.0.rcgu.o
	extern-pass-empty.31bnas3moprck8a2.rcgu.o
	extern-pass-empty.extern_pass_empty.2ec280413e876a6-cgu.0.rcgu.o
	g.rs
	i128-ffi.i128_ffi.d477614a46ba15bc-cgu.0.rcgu.o
	i128-ffi.t7gts03wicdfebn.rcgu.o
	issue-19404
	issue-20413.long-type-10638220638324922248.txt
	issue-20413.long-type-11228194758701975253.txt
	issue-20413.long-type-12441605058349472596.txt
	issue-20413.long-type-13451798998862434544.txt
	issue-20413.long-type-14449495816477765806.txt
	issue-20413.long-type-14505929310773279803.txt
	issue-20413.long-type-14852489453141733921.txt
	issue-20413.long-type-14888562162413868840.txt
	issue-20413.long-type-15093432779245722597.txt
	issue-20413.long-type-15274469213592336197.txt
	issue-20413.long-type-15523334564825316665.txt
	issue-20413.long-type-15695678616872461822.txt
	issue-20413.long-type-15720003520161168908.txt
	issue-20413.long-type-16005543650893221049.txt
	issue-20413.long-type-16140680409752953463.txt
	issue-20413.long-type-16686898925255479268.txt
	issue-20413.long-type-17063615432857654969.txt
	issue-20413.long-type-17068662173100362435.txt
	issue-20413.long-type-17303538030973117523.txt
	issue-20413.long-type-17312692751579885431.txt
	issue-20413.long-type-17605671593911897879.txt
	issue-20413.long-type-17650919756409060229.txt
	issue-20413.long-type-17791541038031539933.txt
	issue-20413.long-type-17997845345089616783.txt
	issue-20413.long-type-18346418554812647513.txt
	issue-20413.long-type-194041651388418507.txt
	issue-20413.long-type-248785072400335088.txt
	issue-20413.long-type-2554290728674121708.txt
	issue-20413.long-type-2883359234157588988.txt
	issue-20413.long-type-3493293700387274760.txt
	issue-20413.long-type-4881330493956353089.txt
	issue-20413.long-type-4973826905441724252.txt
	issue-20413.long-type-5276912186728766415.txt
	issue-20413.long-type-574261962865754922.txt
	issue-20413.long-type-6504647325420314102.txt
	issue-20413.long-type-6576709350834386091.txt
	issue-20413.long-type-6596592717041070711.txt
	issue-20413.long-type-7620950825918746040.txt
	issue-20413.long-type-7955578633764940934.txt
	issue-20413.long-type-9340496498932290372.txt
	issue-36278-prefix-nesting
	issue-49685
	issue-53448
	kindck-owned-contains-1
	libextern_fake_libc.rlib
	libfoo.rlib
	libissue_3302.rlib
	libissue_36278_prefix_nesting.rlib
	libissue_96572_unconstrained.rlib
	liblib.rlib
	liboffset_from.rlib
	libparam_env_normalize_cycle.rlib
	libprecise_drop_with_promoted.rlib
	librust_out.rlib
	libslice_iter_len_eq_zero.rlib
	libtry_identity.rlib
	libwindows_init_once.rlib
	mir_dump/
	out1
	out2
	regions-reassign-let-bound-pointer
	regions-scope-chain-example
	rustc-ice-2023-07-27T16:13:49.620524059Z-644092.txt
	rustc-ice-2023-07-28T17:23:47.036524856Z-3658405.txt
	rustc-ice-2023-07-28T17:24:51.673713381Z-3672316.txt
	send-bound-async-closure
	tests/ui/associated-types/errors.json
	tests/ui/associated-types/errors_tmp.json
	tests/ui/errors_tmp.json
	tests/ui/icemaker/
	type-alias-bounds
	unsupported_foreign_function.2odg28v9p9yf1yd1.rcgu.o
	unsupported_foreign_function.unsupported_foreign_function.330a639339860b6f-cgu.0.rcgu.o
	with
	without
	wrong_self_convention.mir
	zero_ptr_no_std.zero_ptr_no_std.2f4525ad60188a12-cgu.0.rcgu.o
@matthiaskrgr matthiaskrgr added the C-bug Category: This is a bug. label Jul 30, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 30, 2023
@albertlarsan68
Copy link
Member

It detects X files modified, but the fact that they are not tracked means that their rustfmt invocation will be skipped.

@albertlarsan68 albertlarsan68 added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jul 30, 2023
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 30, 2023
@chenyukang
Copy link
Member

It's better to give different counts for skipped and formatted files?

@chenyukang chenyukang self-assigned this Jul 31, 2023
@matthiaskrgr
Copy link
Member Author

Maybe soemthing like "formatted x files, skipped y untracked files" would make more sense.

@chenyukang
Copy link
Member

chenyukang commented Jul 31, 2023

The number 73 is actually right, but it's the number of the files that have been modified in the current branch compared to the master branch:

pub fn get_git_modified_files(

you have 86 untracked path in this case.
Anywa, we can make it more explicit here.

Noratrieb added a commit to Noratrieb/rust that referenced this issue Aug 2, 2023
…ount, r=albertlarsan68

x.py print more detailed format files and untracked files count

Fixes rust-lang#114245
Noratrieb added a commit to Noratrieb/rust that referenced this issue Aug 2, 2023
…ount, r=albertlarsan68

x.py print more detailed format files and untracked files count

Fixes rust-lang#114245
@bors bors closed this as completed in da2b237 Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants