Julia v1.15 Release Notes
New language features
Language changes
- On Windows, code loading now requires the names of project, manifest and source files to have
the same case as the name that is looked up, also when the name does not fit the 8.3 format
(more than 8 characters before the extension, or more than 3 in it). A file
project.tomlis no longer found asProject.toml, and a filemylongpackage.jlno longer as the entry point ofMyLongPackage. Shorter names were already checked this way, as are all names on macOS. Slicesexposesdataidsof its parent array to properly identify aliasing in broadcasting (#49182).
Compiler/Runtime improvements
- After a sweep, Julia's default garbage collector now lets any thread reuse the free cells of pages that still hold live objects, instead of only the thread that allocated the page. This reduces the memory footprint of workloads that allocate many small objects on many threads and keep few of them, such as a language server that runs type inference repeatedly (#63512).
Command-line option changes
--code-coverage=-<paths>records no coverage for files under the given paths, and optimizes their code as if coverage were off, so that instrumenting a test suite does not change how its own functions are compiled.--code-coverage=@<paths>and--track-allocation=@<paths>accept a list of paths (#54698).
Multi-threading changes
--threads=auto,--procs=auto,JULIA_NUM_THREADS=autoand the default number of GC threads now honourJULIA_CPU_THREADS, matchingSys.EFFECTIVE_CPU_THREADS(#64613).- With
JULIA_EXCLUSIVE=1, default-pool threads are pinned to the CPUs of the inherited affinity mask, in order, instead of to CPUs0toN-1. Their number is limited by that mask rather than bySys.EFFECTIVE_CPU_THREADS(#64613). - The floating-point control state (the rounding mode set by
setrounding, together with the exception masks and flush-to-zero bits) is now saved and restored on every task switch, so it behaves as task-local state: a new task inherits the state of the task that created it, and a task resumes with the state it had when it last yielded, regardless of which thread runs it. Type inference, code generation, generated-function generators and finalizers always run under the default control state, so for example unmasking floating-point exceptions withfeenableexceptno longer makes compilation fail. The sticky exception status flags are not preserved across task switches, nor across any of those runtime entries (#51277, #63570).
Build system changes
make installnow makes standard library files read-only, like the sources ofBaseand the files of installed packages.base/userimg.jlis no longer supported, and the build now fails if it exists. To build a system image with additional code, use PackageCompiler.jl, or run a script on top of an existing system image withjulia --sysimage <image> --output-o <file> <script>.
New library functions
bitsizeof(x)returns the declared width in bits of a primitive type, or of the primitive type ofx, excluding the padding thatsizeofincludes. It throws for any other type or value (#61359).filterfirst(f, itr)returns the first element ofitrfor whichfreturnstrue(#60913).growat!(a::Vector, i, delta)growsabydeltauninitialized elements inserted at indexi(#63573).
New library features
An unquoted
*,?or[in a command literal makes a glob, which expands to the matching paths when the command is created. Julia calls aglobfunction provided by a package, such as Glob.jl, to match the pattern, so globbing works afterusing Glob(#20401).unescape_stringaccepts ahex_as_charkeyword argument that decodes a\xescape sequence as the Unicode code point U+0000 to U+00FF instead of as a raw byte (#65023).A command literal can copy one of a command's standard streams to another with
N>&M, as in a shell, so that, for example,`cmd >log 2>&1`sends both streams ofcmdtolog. The redirections of a command are applied in the order they are written (#20401).pipeline(cmd; stdout=x, stderr=x), with the same object or path string for both, now opensxonce and shares it between both streams, as in`cmd >x 2>&1`. Before, the streams could overwrite each other's output, and a not-yet-openPipeEndpointreceived only one of them.Base.enumerate(itr; from=1)now accepts an optional starting pointfromfor the enumeration.In a command literal, a redirection to
/dev/nullnow meansdevnullon every system, including Windows, so that, for example,`cmd 2>/dev/null`is portable.
Standard library changes
Dates
InteractiveUtils
JuliaSyntaxHighlighting
Libdl
LinearAlgebra
Markdown
Mmap
Profile
Random
REPL
- In shell mode, commands can be joined with
&&,||and;, which run them as in a shell, so that, for example,cd build && makeworks. In command literals these operators still have to be quoted. Shell mode now also requires the characters that command literals reject unquoted to be quoted, such as(,),#and a single&. - Shell mode now runs every command directly, as Julia's command literals do, instead of running
commands without pipes or redirections through
$SHELL -con systems other than Windows. It no longer reads theJULIA_SHELLenvironment variable. The newexport NAME=valueandunset NAMEcommands in shell mode set and remove environment variables for later commands (#20401).
SharedArrays
Sockets
Test
TOML
UUIDs
uuid5now hashes the bytes ofnameas specified by RFC 4122, instead of first processing backslash escape sequences in it withunescape_string. This changes the result for names containing a backslash, which previously could also throw anArgumentError.