* Re: [PATCH] .gitignore: ignore rustc long type txt files
2026-05-21 10:21 [PATCH] .gitignore: ignore rustc long type txt files Manos Pitsidianakis
@ 2026-05-28 11:53 ` Miguel Ojeda
2026-05-28 20:36 ` Nathan Chancellor
2026-05-28 21:11 ` Danilo Krummrich
2026-05-28 21:28 ` Miguel Ojeda
2 siblings, 1 reply; 6+ messages in thread
From: Miguel Ojeda @ 2026-05-28 11:53 UTC (permalink / raw)
To: Manos Pitsidianakis, Nathan Chancellor, Nicolas Schier,
Linux Kbuild mailing list
Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, linux-kernel, rust-for-linux
On Thu, May 21, 2026 at 12:29 PM Manos Pitsidianakis
<manos@pitsidianak.is> wrote:
>
> When rustc prints an error containing a long type that doesn't fit in a
> line, it will write the whole thing in a .txt file and print messages
> like:
>
> note: the full type name has been written to
> 'path/to/subsystem/module_name.long-type-11621316855315349594.txt
>
> Long types like core::result::Result<core::pin::Pin<Box<_, Kmalloc,
> kernel::error::Error>: pin_init::PinInit<Box<_, Kmalloc>, _> are common
> during development, so add a gitignore entry.
>
> Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Cc'ing Nathan, Nicolas and Kbuild -- I considered whether deleting
these in e.g. `distclean`. They are only error artifacts, i.e. the
build system doesn't create these intentionally -- they come from the
Rust compiler in a minority of error cases (where type names are
long).
So end users shouldn't see them anyway, so I am not sure what the policy is.
In any case, putting these in `.gitignore` shouldn't hurt, and they
are definitely not intended to be committed, so it makes sense
regardless of the cleaning. Thus I will commit it with these notes
unless someone shouts:
[ Depending on the compiler version and the kind of error, there are
two possible spellings -- copying them here for reference:
= note: the full name for the type has been written to
'...long-type-...txt'
= note: the full type name has been written to '...long-type-...txt'
- Miguel ]
[ Moved the lines closer to the existing rust-analyzer one. - Miguel ]
I also wondered about `--verbose` (which probably we don't want to
enable unconditionally) and `-Zwrite-long-types-to-disk=no` (which
could be possible as a nice middle ground if kernel developers prefer
to avoid the files unconditionally -- I asked upstream out of
curiosity if that or something similar is intended to be stable at
some point).
Thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] .gitignore: ignore rustc long type txt files
2026-05-28 11:53 ` Miguel Ojeda
@ 2026-05-28 20:36 ` Nathan Chancellor
2026-05-28 21:08 ` Miguel Ojeda
0 siblings, 1 reply; 6+ messages in thread
From: Nathan Chancellor @ 2026-05-28 20:36 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Manos Pitsidianakis, Nicolas Schier, Linux Kbuild mailing list,
Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, linux-kernel, rust-for-linux
On Thu, May 28, 2026 at 01:53:46PM +0200, Miguel Ojeda wrote:
> On Thu, May 21, 2026 at 12:29 PM Manos Pitsidianakis
> <manos@pitsidianak.is> wrote:
> >
> > When rustc prints an error containing a long type that doesn't fit in a
> > line, it will write the whole thing in a .txt file and print messages
> > like:
> >
> > note: the full type name has been written to
> > 'path/to/subsystem/module_name.long-type-11621316855315349594.txt
> >
> > Long types like core::result::Result<core::pin::Pin<Box<_, Kmalloc,
> > kernel::error::Error>: pin_init::PinInit<Box<_, Kmalloc>, _> are common
> > during development, so add a gitignore entry.
> >
> > Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
>
> Cc'ing Nathan, Nicolas and Kbuild -- I considered whether deleting
> these in e.g. `distclean`. They are only error artifacts, i.e. the
> build system doesn't create these intentionally -- they come from the
> Rust compiler in a minority of error cases (where type names are
> long).
>
> So end users shouldn't see them anyway, so I am not sure what the policy is.
I view these more like build artifacts since the messages in them are
really only relevant to a specific build instance, so I would probably
clean them up with 'clean' over 'mrproper' / 'distclean'. But if they are in
.gitignore, I don't think it matters too much though, but it does feel
like they should be cleaned up with at least 'distclean'.
--
Cheers,
Nathan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] .gitignore: ignore rustc long type txt files
2026-05-28 20:36 ` Nathan Chancellor
@ 2026-05-28 21:08 ` Miguel Ojeda
0 siblings, 0 replies; 6+ messages in thread
From: Miguel Ojeda @ 2026-05-28 21:08 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Manos Pitsidianakis, Nicolas Schier, Linux Kbuild mailing list,
Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, linux-kernel, rust-for-linux
On Thu, May 28, 2026 at 10:36 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> I view these more like build artifacts since the messages in them are
> really only relevant to a specific build instance, so I would probably
> clean them up with 'clean' over 'mrproper' / 'distclean'. But if they are in
> .gitignore, I don't think it matters too much though, but it does feel
> like they should be cleaned up with at least 'distclean'.
Sounds good, thanks Nathan!
Then let's land this one and we can discuss that on top. I have
created a "good first issue" for that:
https://github.com/Rust-for-Linux/linux/issues/1236
Cheers,
Miguel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] .gitignore: ignore rustc long type txt files
2026-05-21 10:21 [PATCH] .gitignore: ignore rustc long type txt files Manos Pitsidianakis
2026-05-28 11:53 ` Miguel Ojeda
@ 2026-05-28 21:11 ` Danilo Krummrich
2026-05-28 21:28 ` Miguel Ojeda
2 siblings, 0 replies; 6+ messages in thread
From: Danilo Krummrich @ 2026-05-28 21:11 UTC (permalink / raw)
To: Manos Pitsidianakis
Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
linux-kernel, rust-for-linux
On 5/21/26 12:21 PM, Manos Pitsidianakis wrote:
> When rustc prints an error containing a long type that doesn't fit in a
> line, it will write the whole thing in a .txt file and print messages
> like:
>
> note: the full type name has been written to
> 'path/to/subsystem/module_name.long-type-11621316855315349594.txt
>
> Long types like core::result::Result<core::pin::Pin<Box<_, Kmalloc,
> kernel::error::Error>: pin_init::PinInit<Box<_, Kmalloc>, _> are common
> during development, so add a gitignore entry.
>
> Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Yes, please. :)
Acked-by: Danilo Krummrich <dakr@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] .gitignore: ignore rustc long type txt files
2026-05-21 10:21 [PATCH] .gitignore: ignore rustc long type txt files Manos Pitsidianakis
2026-05-28 11:53 ` Miguel Ojeda
2026-05-28 21:11 ` Danilo Krummrich
@ 2026-05-28 21:28 ` Miguel Ojeda
2 siblings, 0 replies; 6+ messages in thread
From: Miguel Ojeda @ 2026-05-28 21:28 UTC (permalink / raw)
To: Manos Pitsidianakis
Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, linux-kernel, rust-for-linux
On Thu, May 21, 2026 at 12:29 PM Manos Pitsidianakis
<manos@pitsidianak.is> wrote:
>
> When rustc prints an error containing a long type that doesn't fit in a
> line, it will write the whole thing in a .txt file and print messages
> like:
>
> note: the full type name has been written to
> 'path/to/subsystem/module_name.long-type-11621316855315349594.txt
>
> Long types like core::result::Result<core::pin::Pin<Box<_, Kmalloc,
> kernel::error::Error>: pin_init::PinInit<Box<_, Kmalloc>, _> are common
> during development, so add a gitignore entry.
>
> Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Applied to `rust-next` -- thanks everyone!
[ Depending on the compiler version and the kind of error, there are
two possible spellings -- copying them here for reference:
= note: the full name for the type has been written to
'...long-type-...txt'
= note: the full type name has been written to '...long-type-...txt'
In addition, we could clean the files as well in one of our
cleaning Make targets [1][2].
Another option would be `--verbose` (but it implies more things
that we probably don't want) or `-Zwrite-long-types-to-disk=no`
(unstable so far, but a possible alternative if we prefer to
avoid the files and simply see the long types in the output
-- I asked upstream Rust about it [3]).
Link: https://lore.kernel.org/rust-for-linux/CANiq72=cKXdmxEacuGET8fuz_v5eFGB50vnOnKZZJd6iEeAAFA@mail.gmail.com/
[1]
Link: https://github.com/Rust-for-Linux/linux/issues/1236 [2]
Link: https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/.60-Zwrite-long-types-to-disk.3Dno.60/near/598310194
[3]
- Miguel ]
[ Moved the lines closer to the existing rust-analyzer one. - Miguel ]
Cheers,
Miguel
^ permalink raw reply [flat|nested] 6+ messages in thread