publicis a new keyword. Symbols marked withpublicare considered public API. Symbols marked withexportare now also treated as public API. The difference betweenpublicandexportis thatpublicnames do not become available whenusinga package/module ([#50105]).ScopedValueimplements dynamic scope with inheritance across tasks ([#50958]).- The new macro
Base.Cartesian.@ncallkwis analogous toBase.Cartesian.@ncall, but allows to add keyword arguments to the function call ([#51501]). - Support for Unicode 15.1 ([#51799]).
- Three new types around the idea of text with "annotations" (
Pair{Symbol, Any}entries, e.g.:lang => "en"or:face => :magenta). These annotations are preserved across operations (e.g. string concatenation with*) when possible.AnnotatedStringis a newAbstractStringtype. It wraps an underlying string and allows for annotations to be attached to regions of the string. This type is used extensively in the newStyledStringsstandard library to hold styling information.AnnotatedCharis a newAbstractChartype. It wraps another char and holds a list of annotations that apply to it.AnnotatedIOBufferis a newIOtype that mimics anIOBuffer, but has specialisedread/writemethods for annotated content. This can be thought of both as a "string builder" of sorts and also as glue between annotated and unannotated content.
Manifest.tomlfiles can now be renamed in the formatManifest-v{major}.{minor}.tomlto be preferentially picked up by the given julia version. i.e. in the same folder, aManifest-v1.11.tomlwould be used by v1.11 andManifest.tomlby every other julia version. This makes managing environments for multiple julia versions at the same time easier ([#43845]).@timenow reports a count of any lock conflicts where aReentrantLockhad to wait, plus a new macro@lock_conflictswhich returns that count ([#52883]).
-
During precompilation, the
atexithooks now run before saving the output file. This allows users to safely tear down background state (such as closing Timers and sending disconnect notifications to heartbeat tasks) and cleanup other resources when the program wants to begin exiting. -
Code coverage and malloc tracking is no longer generated during the package precompilation stage. Further, during these modes pkgimage caches are now used for packages that are not being tracked. This means that coverage testing (the default for
julia-actions/julia-runtest) will by default use pkgimage caches for all other packages than the package being tested, likely meaning faster test execution. ([#52123]) -
Specifying a path in
JULIA_DEPOT_PATHnow results in the expansion of empty strings to omit the default user depot ([#51448]).
- Updated GC heuristics to count allocated pages instead of individual objects ([#50144]).
- A new
LazyLibrarytype is exported fromLibdlfor use in building chained lazy library loads, primarily to be used within JLLs ([#50074]). - Added support for annotating
Base.@assume_effectson code blocks ([#52400]).
- The entry point for Julia has been standardized to
Main.main(ARGS). This must be explicitly opted into using the@mainmacro (see the docstring for further details). When opted-in, and julia is invoked to run a script or expression (i.e. usingjulia script.jlorjulia -e expr), julia will subsequently run theMain.mainfunction automatically. This is intended to unify script and compilation workflows, where code loading may happen in the compiler and execution ofMain.mainmay happen in the resulting executable. For interactive use, there is no semantic difference between defining amainfunction and executing the code directly at the end of the script ([50974]). - The
--compiled-modulesand--pkgimagesflags can now be set toexisting, which will cause Julia to consider loading existing cache files, but not to create new ones ([#50586] and [#52573]).
in!(x, s::AbstractSet)will return whetherxis ins, and insertxinsif not.- The new
Libc.mkfifofunction wraps themkfifoC function on Unix platforms ([#34587]). copyuntil(out, io, delim)andcopyline(out, io)copy data into anout::IOstream ([#48273]).eachrsplit(string, pattern)iterates split substrings right to left.Sys.username()can be used to return the current user's username ([#51897]).wrap(Array, m::Union{MemoryRef{T}, Memory{T}}, dims)is the safe counterpart tounsafe_wrap([#52049]).GC.logging_enabled()can be used to test whether GC logging has been enabled viaGC.enable_logging([#51647]).
invmod(n, T)whereTis a native integer type now computes the modular inverse ofnin the modular integer ring thatTdefines ([#52180]).invmod(n)is an abbreviation forinvmod(n, typeof(n))for native integer types ([#52180]).replace(string, pattern...)now supports an optionalIOargument to write the output to a stream rather than returning a string ([#48625]).sizehint!(s, n)now supports an optionalshrinkargument to disable shrinking ([#51929]).- New function
Docs.hasdoc(module, symbol)tells whether a name has a docstring ([#52139]). - New function
Docs.undocumented_names(module)returns a module's undocumented public names ([#52413]). - Passing an
IOBufferas a stdout argument forProcessspawn now works as expected, synchronized withwaitorsuccess, so aBase.BufferStreamis no longer required there for correctness to avoid data races ([#52461]). - After a process exits,
closewritewill no longer be automatically called on the stream passed to it. Callwaiton the process instead to ensure the content is fully written, then callclosewritemanually to avoid data-races. Or use the callback form ofopento have all that handled automatically. @timednow additionally returns the elapsed compilation and recompilation time ([#52889])filtercan now act on aNamedTuple([#50795]).
- A new standard library for handling styling in a more comprehensive and structured way ([#49586]).
- The new
Facesstruct serves as a container for text styling information (think typeface, as well as color and decoration), and comes with a framework to provide a convenient, extensible (viaaddface!), and customisable (with a user'sFaces.tomlandloadfaces!) approach to styled content ([#49586]). - The new
@styled_strstring macro provides a convenient way of creating aAnnotatedStringwith various faces or other attributes applied ([#49586]).
- A new standard library for applying syntax highlighting to Julia code, this
uses
JuliaSyntaxandStyledStringsto implement ahighlightfunction that creates anAnnotatedStringwith syntax highlighting applied.
cbrt(::AbstractMatrix{<:Real})is now defined and returns real-valued matrix cube roots of real-valued matrices ([#50661]).eigvals/eigen(A, bunchkaufman(B))andeigvals/eigen(A, lu(B)), which utilize the Bunchkaufman (LDL) and LU decomposition ofB, respectively, now efficiently compute the generalized eigenvalues (eigen: and eigenvectors) ofAandB. Note: The second argument is the output ofbunchkaufmanorlu([#50471]).- There is now a specialized dispatch for
eigvals/eigen(::Hermitian{<:Tridiagonal})which performs a similarity transformation to create a real symmetrix triagonal matrix, and solve that using the LAPACK routines ([#49546]). - Structured matrices now retain either the axes of the parent (for
Symmetric/Hermitian/AbstractTriangular/UpperHessenberg), or that of the principal diagonal (for banded matrices) ([#52480]). bunchkaufmanandbunchkaufman!now work for anyAbstractFloat,Rationaland their complex variants.bunchkaufmannow supportsIntegertypes, by making an internal conversion toRational{BigInt}. Added new functioninertiathat computes the inertia of the diagonal factor given by theBunchKaufmanfactorization object of a real symmetric or Hermitian matrix. For complex symmetric matrices,inertiaonly computes the number of zero eigenvalues of the diagonal factor ([#51487]).- Packages that specialize matrix-matrix
mul!with a method signature of the formmul!(::AbstractMatrix, ::MyMatrix, ::AbstractMatrix, ::Number, ::Number)no longer encounter method ambiguities when interacting withLinearAlgebra. Previously, ambiguities used to arise when multiplying aMyMatrixwith a structured matrix type provided by LinearAlgebra, such asAbstractTriangular, which used to necessitate additional methods to resolve such ambiguities. Similar sources of ambiguities have also been removed for matrix-vectormul!operations ([#52837]).
- New
@create_log_macromacro for creating new log macros like@info,@warnetc. For instance@create_log_macro MyLog 1500 :magentawill create@mylogto be used like@mylog "hello"which will show as┌ MyLog: helloetc. ([#52196])
randnow supports sampling overTupletypes ([#35856], [#50251]).randnow supports sampling overPairtypes ([#28705]).- When seeding RNGs provided by
Random, negative integer seeds can now be used ([#51416]). - Seedable random number generators from
Randomcan now be seeded by a string, e.g.seed!(rng, "a random seed")([#51527]).
- Tab complete hints now show in lighter text while typing in the repl. To disable
set
Base.active_repl.options.hint_tab_completes = falseinteractively, or in startup.jl:if VERSION >= v"1.11.0-0" atreplinit() do repl repl.options.hint_tab_completes = false end end ``` ([#51229]). - Meta-M with an empty prompt now toggles the contextual module between the previous non-Main contextual module and Main so that switching back and forth is simple. ([#51616], [#52670])
The undocumented function adjust is no longer exported but is now documented
- Statistics is now an upgradeable standard library ([#46501]).
pmapnow defaults to using aCachingPool([#33892]).
Base.map,Iterators.map, andforeachlost their single-argument methods ([#52631]).
tputis no longer called to check terminal capabilities, it has been replaced with a pure-Julia terminfo parser ([#50797]).
- CI now performs limited automatic typo detection on all PRs. If you merge a PR with a failing typo CI check, then the reported typos will be automatically ignored in future CI runs on PRs that edit those same files ([#51704]).