Julia 1.12.3 stopped outputting top-level println strings

I have a repo on two computers, one of which I just upgraded to Julia 1.12.3. There are some println statements not in any function. I start Julia on both computers and load the project with using. This is output:

phma@puma:~/src/MumzelCode$ julia --project -t auto
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.12.3 (2025-12-15)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org release
|__/                   |

julia> using MumzelCode

julia>
phma@kodkod:~/crypt/src/MumzelCode$ julia --project -t auto
        Info The latest version of Julia in the `release` channel is 1.12.2+0.x64.linux.gnu. You currently have `1.12.1+0.x64.linux.gnu` installed. Run:

  juliaup update

in your terminal shell to install Julia 1.12.2+0.x64.linux.gnu and update the `release` channel to that version.
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.12.1 (2025-10-17)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org release
|__/                   |

julia> using MumzelCode
Info Given MumzelCode was explicitly requested, output will be shown live 
Mumzel Code © 2025 Pierre Abbat
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3 or later.
Tables output by this program are in the public domain.
Precompiling MumzelCode finished.
  1 dependency successfully precompiled in 1 seconds. 9 already precompiled.
  1 dependency had output during precompilation:
┌ MumzelCode
│  [Output was shown above]
└  

julia>

Why does 1.12.1, but not 1.12.3, run the println statements?

Code is

Top-level statements are only executed during precompilation, not every time the package is loaded (otherwise you’d be redefining all functions all the time), this behaviour has been the same for a very long time. In the first example you shared, it looks like your package was already precompiled.

1 Like

It stopped outputting this on puma when I upgraded it. It also stopped outputting this when I run ]test; it used to output this every time I tested.

Possible but unverified explanations, i.e. speculation:

  • Some bugfix in 1.12.3 has removed some cases of re-precompilation that weren’t needed.
  • Some bug in 1.12.3 makes it not re-precompile despite being necessary.

If you want things to run when the package is loaded, put it in the __init__() function.

8 Likes