* [PATCH v3] kbuild: rust: make `*.long-type-*.txt` a target for cleanup
@ 2026-05-30 18:49 Joel Kamminga
2026-05-31 6:45 ` Miguel Ojeda
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Joel Kamminga @ 2026-05-30 18:49 UTC (permalink / raw)
To: Nathan Chancellor, Nicolas Schier, Miguel Ojeda, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Alice Ryhl, Trevor Gross, Danilo Krummrich
Cc: rust-for-linux, Joel Kamminga, linux-kbuild, linux-kernel
This cleans up files generated by rustc compiler in the case of an
error containing an excessively long type name that doesn't fit in
a single line. Such types appear relatively frequently so the risk
of generating these files certainly exists. These files are purely
compiler artifacts and are not created intentionally by the build
system. They should be added to the `clean` target to stop from
cluttering up the source tree.
Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1236
Signed-off-by: Joel Kamminga <contact@jkam.dev>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 9f59598d3a08..3a265e7e3347 100644
--- a/Makefile
+++ b/Makefile
@@ -2164,6 +2164,7 @@ clean: $(clean-dirs)
-o -name '*.c.[012]*.*' \
-o -name '*.ll' \
-o -name '*.gcno' \
+ -o -name '*.long-type-*.txt' \
\) -type f -print \
-o -name '.tmp_*' -print \
| xargs rm -rf
--
2.54.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v3] kbuild: rust: make `*.long-type-*.txt` a target for cleanup 2026-05-30 18:49 [PATCH v3] kbuild: rust: make `*.long-type-*.txt` a target for cleanup Joel Kamminga @ 2026-05-31 6:45 ` Miguel Ojeda 2026-06-01 4:23 ` Joel Kamminga 2026-06-01 16:50 ` Joel Kamminga 2026-06-02 8:15 ` Miguel Ojeda 2 siblings, 1 reply; 8+ messages in thread From: Miguel Ojeda @ 2026-05-31 6:45 UTC (permalink / raw) To: Joel Kamminga Cc: Nathan Chancellor, Nicolas Schier, Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich, rust-for-linux, linux-kbuild, linux-kernel On Sat, May 30, 2026 at 8:51 PM Joel Kamminga <contact@jkam.dev> wrote: > > This cleans up files generated by rustc compiler in the case of an > error containing an excessively long type name that doesn't fit in > a single line. Such types appear relatively frequently so the risk > of generating these files certainly exists. These files are purely > compiler artifacts and are not created intentionally by the build > system. They should be added to the `clean` target to stop from > cluttering up the source tree. > > Suggested-by: Miguel Ojeda <ojeda@kernel.org> > Link: https://github.com/Rust-for-Linux/linux/issues/1236 > Signed-off-by: Joel Kamminga <contact@jkam.dev> > --- In general, please add a changelog after the `---` line. Otherwise, reviewers need to manually inspect the patch to see what has changed, if anything. For instance, I see you changed the title, but the commit message seems identical. Was there a reason to not change it? Thanks! Cheers, Miguel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3] kbuild: rust: make `*.long-type-*.txt` a target for cleanup 2026-05-31 6:45 ` Miguel Ojeda @ 2026-06-01 4:23 ` Joel Kamminga 2026-06-01 5:08 ` Miguel Ojeda 0 siblings, 1 reply; 8+ messages in thread From: Joel Kamminga @ 2026-06-01 4:23 UTC (permalink / raw) To: miguel.ojeda.sandonis Cc: a.hindborg, aliceryhl, bjorn3_gh, boqun, contact, dakr, gary, linux-kbuild, linux-kernel, lossin, nathan, nsc, ojeda, rust-for-linux, tmgross On 2026-05-31 00:45, Miguel Ojeda wrote: > In general, please add a changelog after the `---` line. Otherwise, > reviewers need to manually inspect the patch to see what has changed, > if anything. > > For instance, I see you changed the title, but the commit message > seems identical. Was there a reason to not change it? Hi! Thanks for the comments and tips. Just for future reference for myself, in regards to applying changes strictly to the metadata of the patch (i.e. adding a changelog but leaving the actual code unchanged), is it preferred to just resend the same version of the patch with the changelog added instead of creating a whole new version? That was the impression I got reading through some earlier patches, but seeing as I've been creating new patch versions and haven't been told to do otherwise, I figured I'd double check. Thanks, Joel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3] kbuild: rust: make `*.long-type-*.txt` a target for cleanup 2026-06-01 4:23 ` Joel Kamminga @ 2026-06-01 5:08 ` Miguel Ojeda 0 siblings, 0 replies; 8+ messages in thread From: Miguel Ojeda @ 2026-06-01 5:08 UTC (permalink / raw) To: Joel Kamminga Cc: a.hindborg, aliceryhl, bjorn3_gh, boqun, dakr, gary, linux-kbuild, linux-kernel, lossin, nathan, nsc, ojeda, rust-for-linux, tmgross On Mon, Jun 1, 2026 at 6:23 AM Joel Kamminga <contact@jkam.dev> wrote: > > Thanks for the comments and tips. Just for future reference for myself, > in regards to applying changes strictly to the metadata of the patch > (i.e. adding a changelog but leaving the actual code unchanged), is it > preferred to just resend the same version of the patch with the > changelog added instead of creating a whole new version? That was the > impression I got reading through some earlier patches, but seeing as > I've been creating new patch versions and haven't been told to do > otherwise, I figured I'd double check. Good question! If you forgot something small in the patch, especially if it is something like a typo or a missed changelog or similar, it is usually simpler to just reply to your patch and mention/quote the place to be fixed. That avoids a whole new version for very small changes, while making everyone aware of the correction. So if a maintainer applies the patch earlier than the next version is sent, they can fix it on the fly. Now, of course, sending a new version can make life simpler for maintainers, because they can just apply the new version without having to manually handle those bits (which can introduce mistakes on their own). This applies to things that end up in the commit, so it doesn't matter for e.g. the changelog. However, sending too many versions also has overhead for everyone (the emails on their own, the tracking of each version, possible parallel discussions in different versions, possible feedback on the previous version...), which is why it is all a balance, and it is usually recommended to wait about a week or two before resends. I hope that helps! Cheers, Miguel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3] kbuild: rust: make `*.long-type-*.txt` a target for cleanup 2026-05-30 18:49 [PATCH v3] kbuild: rust: make `*.long-type-*.txt` a target for cleanup Joel Kamminga 2026-05-31 6:45 ` Miguel Ojeda @ 2026-06-01 16:50 ` Joel Kamminga 2026-06-01 19:23 ` Nathan Chancellor 2026-06-02 8:15 ` Miguel Ojeda 2 siblings, 1 reply; 8+ messages in thread From: Joel Kamminga @ 2026-06-01 16:50 UTC (permalink / raw) To: contact Cc: a.hindborg, aliceryhl, bjorn3_gh, boqun, dakr, gary, linux-kbuild, linux-kernel, lossin, nathan, nsc, ojeda, rust-for-linux, tmgross On 2026-05-30 12:49, Joel Kamminga wrote: > This cleans up files generated by rustc compiler in the case of an > error containing an excessively long type name that doesn't fit in > a single line. Such types appear relatively frequently so the risk > of generating these files certainly exists. These files are purely > compiler artifacts and are not created intentionally by the build > system. They should be added to the `clean` target to stop from > cluttering up the source tree. > > Suggested-by: Miguel Ojeda <ojeda@kernel.org> > Link: https://github.com/Rust-for-Linux/linux/issues/1236 > Signed-off-by: Joel Kamminga <contact@jkam.dev> > --- CHANGELOG: Changes since v2 (https://lore.kernel.org/linux-kbuild/20260529205529.75586-1-contact@jkam.dev/): - Change commit title to be more imperative and more heavily scoped 'kbuild: clean `*.long-type-*.txt` files' -> 'kbuild: rust: make `*.long-type-*.txt` a target for cleanup' Changes since v1 (https://lore.kernel.org/linux-kbuild/20260529203426.65189-1-contact@jkam.dev/): - Replace `Reported-by` tag with a `Suggested-by` and `Link` tag to reference back to the related GitHub issue ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3] kbuild: rust: make `*.long-type-*.txt` a target for cleanup 2026-06-01 16:50 ` Joel Kamminga @ 2026-06-01 19:23 ` Nathan Chancellor 2026-06-02 7:36 ` Miguel Ojeda 0 siblings, 1 reply; 8+ messages in thread From: Nathan Chancellor @ 2026-06-01 19:23 UTC (permalink / raw) To: Joel Kamminga Cc: a.hindborg, aliceryhl, bjorn3_gh, boqun, dakr, gary, linux-kbuild, linux-kernel, lossin, nsc, ojeda, rust-for-linux, tmgross On Mon, Jun 01, 2026 at 10:50:42AM -0600, Joel Kamminga wrote: > On 2026-05-30 12:49, Joel Kamminga wrote: > > This cleans up files generated by rustc compiler in the case of an > > error containing an excessively long type name that doesn't fit in > > a single line. Such types appear relatively frequently so the risk > > of generating these files certainly exists. These files are purely > > compiler artifacts and are not created intentionally by the build > > system. They should be added to the `clean` target to stop from > > cluttering up the source tree. > > > > Suggested-by: Miguel Ojeda <ojeda@kernel.org> > > Link: https://github.com/Rust-for-Linux/linux/issues/1236 > > Signed-off-by: Joel Kamminga <contact@jkam.dev> > > --- > > CHANGELOG: > > Changes since v2 (https://lore.kernel.org/linux-kbuild/20260529205529.75586-1-contact@jkam.dev/): > - Change commit title to be more imperative and more heavily scoped > 'kbuild: clean `*.long-type-*.txt` files' -> 'kbuild: rust: make > `*.long-type-*.txt` a target for cleanup' Not that I think it is worth resending over but I personally find the "clean '...' files" title easier to understand than the "make '...' a target for cleanup". If Miguel wants to take this via the Rust tree: Acked-by: Nathan Chancellor <nathan@kernel.org> Otherwise, I can take it for Kbuild. I don't have a preference and I doubt there will be a conflict in this area in the next couple of weeks. > Changes since v1 (https://lore.kernel.org/linux-kbuild/20260529203426.65189-1-contact@jkam.dev/): > - Replace `Reported-by` tag with a `Suggested-by` and `Link` tag to reference back to the > related GitHub issue -- Cheers, Nathan ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3] kbuild: rust: make `*.long-type-*.txt` a target for cleanup 2026-06-01 19:23 ` Nathan Chancellor @ 2026-06-02 7:36 ` Miguel Ojeda 0 siblings, 0 replies; 8+ messages in thread From: Miguel Ojeda @ 2026-06-02 7:36 UTC (permalink / raw) To: Nathan Chancellor Cc: Joel Kamminga, a.hindborg, aliceryhl, bjorn3_gh, boqun, dakr, gary, linux-kbuild, linux-kernel, lossin, nsc, ojeda, rust-for-linux, tmgross On Mon, Jun 1, 2026 at 9:23 PM Nathan Chancellor <nathan@kernel.org> wrote: > > Not that I think it is worth resending over but I personally find the > "clean '...' files" title easier to understand than the "make '...' a > target for cleanup". Agreed, I can take it and use that title (with the `kbuild: rust:` prefix mentioned in v2). Thanks for the tag! Cheers, Miguel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3] kbuild: rust: make `*.long-type-*.txt` a target for cleanup 2026-05-30 18:49 [PATCH v3] kbuild: rust: make `*.long-type-*.txt` a target for cleanup Joel Kamminga 2026-05-31 6:45 ` Miguel Ojeda 2026-06-01 16:50 ` Joel Kamminga @ 2026-06-02 8:15 ` Miguel Ojeda 2 siblings, 0 replies; 8+ messages in thread From: Miguel Ojeda @ 2026-06-02 8:15 UTC (permalink / raw) To: Joel Kamminga Cc: Nathan Chancellor, Nicolas Schier, Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich, rust-for-linux, linux-kbuild, linux-kernel On Sat, May 30, 2026 at 8:51 PM Joel Kamminga <contact@jkam.dev> wrote: > > This cleans up files generated by rustc compiler in the case of an > error containing an excessively long type name that doesn't fit in > a single line. Such types appear relatively frequently so the risk > of generating these files certainly exists. These files are purely > compiler artifacts and are not created intentionally by the build > system. They should be added to the `clean` target to stop from > cluttering up the source tree. > > Suggested-by: Miguel Ojeda <ojeda@kernel.org> > Link: https://github.com/Rust-for-Linux/linux/issues/1236 > Signed-off-by: Joel Kamminga <contact@jkam.dev> Applied to `rust-next` -- thanks everyone! [ Reworded and linked to the previous related commit. - Miguel ] Joel: please check the rewording. Cheers, Miguel ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-06-02 8:16 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-05-30 18:49 [PATCH v3] kbuild: rust: make `*.long-type-*.txt` a target for cleanup Joel Kamminga 2026-05-31 6:45 ` Miguel Ojeda 2026-06-01 4:23 ` Joel Kamminga 2026-06-01 5:08 ` Miguel Ojeda 2026-06-01 16:50 ` Joel Kamminga 2026-06-01 19:23 ` Nathan Chancellor 2026-06-02 7:36 ` Miguel Ojeda 2026-06-02 8:15 ` Miguel Ojeda
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox