SIGN IN SIGN UP

Set max_methods 1 for several IO functions (#60391)

This reduces the number of invalidations of loading BufferIO.jl commit
957f141 from 1026 to 549. The large number of invalidations come from
excessive world splitting on un-inferred IO objects, which, ironically,
are probably intentionally left un-inferred to reduce unnecessary
compilation.

This is a poor bandaid solution: World splitting delenda est and all
that. If that is not feasible, then an option to selectively disable it
e.g. through a future `@max_methods 0` would impove the situation. For
example, about 400 methods are invalidated due to the addition of a new
`write(::T, ::Char)` method, which invalidates the single, world split
`write(::IO, ::Char)` method.

However, deeper fixes of this issue is outside the scope of this PR.

---------

Co-authored-by: Jeff Bezanson <jeff.bezanson@gmail.com>
Co-authored-by: Andy Dienes <51664769+adienes@users.noreply.github.com>
J
Jakob Nybo Andersen committed
dbb9a28a45c29ad47d2ff0231dd03f08a531370e
Parent: 1f75ae7
Committed by GitHub <noreply@github.com> on 5/14/2026, 6:04:32 PM