-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Backports for 1.12.0-beta4 #58369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backports for 1.12.0-beta4 #58369
Conversation
(cherry picked from commit 088bb90)
…ch_status enum (#58291) The original purpose of this field was to manage quickly detecting if a method was replaced, but that stopped being correct after #53415. It was a fairly heavy-weight description of that single bit of information. This bit of information allows quickly bypassing some method lookups from pkgimages, since it can quickly detect that the result is trivially correct (such as single-argument functions). Also fixes #58215 (cherry picked from commit 5eb5155)
`Base.get_extension` and `Dates.format` both appear in the manual and should therefore be `public` symbols according to [51335](#51335 (comment)). They appear in the manual [here](https://docs.julialang.org/en/v1/base/base/#Base.get_extension) and [here](https://docs.julialang.org/en/v1/stdlib/Dates/#Dates.format-Tuple%7BTimeType,%20AbstractString%7D). Please also consider back porting this to version 1.12 (cherry picked from commit 963eaa7)
(cherry picked from commit d53422c)
(cherry picked from commit bbb0582)
a89d73c
to
aa0e223
Compare
(cherry picked from commit f1a87b6)
Bumps `libLLVM` to include llvm/llvm-project#139259, a simple patch to fix the mangling of a C symbol.
This manifested itself as a missing invalidation downstream, but I don't know if this is visible from Base. In general, we don't set the InferenceState's max_world to `typemax(UInt)`, but rather to the maximum world age at start of inference, and then we check at the end of inference if the world age is still the same, and only then raise it to `typemax(UInt)` (which arms the backedges). The downstream setup is a bit more complex, and I don't entirely know where this leaked out, but this change fixed it regardless. (cherry picked from commit f0a8dd8)
The `juliac-buildscript` is quite aggressive in how it modifies type printing, so caching the pre-buildscript world like this allows us to print stacktraces in their usual fidelity. Before: ``` [1] get_size_dict!(ne::StaticNestedEinsum{Char, ?, ?}, xs::Any, size_info::Dict{Char, Int64}) @ OMEinsum ~/.julia/dev/OMEinsum/src/einsequence.jl:269 ... ``` After: ``` [1] get_size_dict!(ne::StaticNestedEinsum{Char, nothing, ('j','k','l')}, xs::Any, size_info::Dict{Char, Int64}) @ OMEinsum ~/.julia/dev/OMEinsum/src/einsequence.jl:269 ... ``` (cherry picked from commit 87ef4b3)
(cherry picked from commit a87b056)
A weird edge case of loading, if REPL is loaded explicitly and does not come from a require_stdlib call, it should not be getting REPLExt from a require_stdlib call either. This is a convoluted bit of hackery specific to work around problems with the way Pkg's REPLExt is designed to mutate the REPL in unsafe ways. No other stdlib should ever want to access an extension, particularly of a different module, as that is a private API violation on multiple counts, so this only needs to be made to work specifically for that REPL-Pkg scenario, even if it looks seemingly more general. Refs #58373 Reproducer: ``` JULIA_DEPOT_PATH=tmpdir/.julia ./julia --hist=no -qie 'using REPL' ] status ``` (cherry picked from commit 94570e1)
(cherry picked from commit 43ead47)
(cherry picked from commit fc456bd)
#58435) This is caused because for LLVMs sake we have to say that the oddly typed field is smaller than it actually is. (I wonder if we could represent it as an iN field in a struct and have it work but the result would be the same for now) Fix #58434, fix #49318, close #49362. --------- Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com> Co-authored-by: Sukera <11753998+Seelengrab@users.noreply.github.com> (cherry picked from commit 1b0b028)
The rd/wr lock distinction here was supposed to help prevent deadlocks by allowing recursion (even over signals), but did not account for crashes causing recursion while holding the wr lock. Make these lock acquires fail-able if they would cause deadlock. (cherry picked from commit 2e2fac5)
… to 7264a49 (#58527) Stdlib: LinearAlgebra URL: https://github.com/JuliaLang/LinearAlgebra.jl.git Stdlib branch: release-1.12 Julia branch: backports-release-1.12 Old commit: 4e7c3f4 New commit: 7264a49 Julia version: 1.12.0-beta3 LinearAlgebra version: 1.12.0 Bump invoked by: @jishnub Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/LinearAlgebra.jl@4e7c3f4...7264a49 ``` $ git log --oneline 4e7c3f4..7264a49 7264a49 Backports release 1.12 (#1353) ``` Co-authored-by: jishnub <10461665+jishnub@users.noreply.github.com>
(cherry picked from commit 4d96cb4)
(cherry picked from commit 053c739)
These are used by `hasmethod`, and in any case including keyword argument symbols is unavoidable so there is no cost to keeping these. (cherry picked from commit c5df018)
This allows constructors like `Tuple{Type{Vector{Foo}}, UndefInitializer, Tuple{Int}}` to precompile as usual Appears to have a minimal effect on the stdlib pkgimages: ```julia --- before.txt 2025-05-23 08:36:20.171870043 -0400 +++ after.txt 2025-05-22 14:48:49.003869097 -0400 @@ -47,7 +47,7 @@ 20K ../julia/usr/share/julia/compiled/v1.13/Logging/pkgimage.so 20K ../julia/usr/share/julia/compiled/v1.13/Logging/pkgimage.so 3.5M ../julia/usr/share/julia/compiled/v1.13/Markdown/pkgimage.so -3.5M ../julia/usr/share/julia/compiled/v1.13/Markdown/pkgimage.so +3.6M ../julia/usr/share/julia/compiled/v1.13/Markdown/pkgimage.so 184K ../julia/usr/share/julia/compiled/v1.13/Mmap/pkgimage.so 184K ../julia/usr/share/julia/compiled/v1.13/Mmap/pkgimage.so 28K ../julia/usr/share/julia/compiled/v1.13/MozillaCACerts_jll/pkgimage.so ``` Resolves #58497. (cherry picked from commit f8ece05)
We only put debuginfo here if we ran the optimizer, so if there isn't debuginfo here, then we either didn't run the optimizer or were the result of const-prop. In the former case, we don't need to invalidate the code for instrumentation (it cannot have code from it). In the later case, we should already have an edge from the non-const-prop result. This only matters for generated functions, since otherwise we have Method's source's accurate debuginfo already and this is just a duplicate reference to it. Fix #58227 (cherry picked from commit d5442db)
(cherry picked from commit 58daba4)
Makes more types survive `jl_static_show` unambiguously: - Symbols - Symbols printed in the `:var"foo"` form use raw string escaping, fixing `:var"a\b"`, `:var"a\\"`, `:var"$a"`, etc. - Symbols that require parens use parens (`:(=)`, ...) - Signed integers: Except for `Int`, signed integers print like `Int8(1)`. - Floats: floats are printed in a naive but reversible (TODO: double check) way. `Inf(16|32|)` and `NaN(16|32|)` are printed, and `Float16`/`Float32` print the type (`Float32(1.5)`). `Float64`s are printed with a trailing `.0` if it is necessary to disambiguate from `Int`. Fixes #52677, #58484 (comment), #58484 (comment), and the specific case mentioned in #58484. Improves the situation for #38902 but does not close it, because a few cases still do not round-trip (inexhaustive list): - Non-canonical NaNs - BFloat16 - User-defined primitive types. This one is tricky, because they can have a size different from any type we have literals for. (cherry picked from commit b03ef6b)
This was originally added as a workaround for the behavior of sh to try to become the terminal process group leader, but no longer relevant since #25006 removed that flag again: ``` julia> run(detach(`bash -i -c "sleep 0"`)) bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell Process(`bash -i -c 'sleep 0'`, ProcessExited(0)) ``` Long explanation: Julia recieves SIGTTOU when a process like "sh -i -c" exits (at least for bash and zsh, but not dash, ksh, or csh), since "sh -i" sometimes takes over the controlling terminal, causing julia to stop once the bash process exits. This can be quite annoying, but julia goes through some pains (in libuv) to ensure it doesn't steal the controlling terminal from the parent, and apparently bash is not so careful about it. However, since PR #25006, julia hasn't needed this workaround for this issue, so we can now follow the intended behavior when the child is in the same session group and steals the controlling terminal from the parent. Even if such behavior seems odd, this seems to be the intended behavior per posix design implementation that it gets SIGTTOU when julia later tries to change mode (from cooked -> raw after printing the prompt): http://curiousthing.org/sigttin-sigttou-deep-dive-linux. For some background on why this is a useful signal and behavior and should not be just blocked, see nodejs/node#35536. According to glibc, there's a half page of code for how to correctly implement a REPL mode change call: https://www.gnu.org/software/libc/manual/html_node/Initializing-the-Shell.html ``` $ ./julia -q shell> bash -i -c "sleep 1" [1]+ Stopped ./julia julia> run(`zsh -i -c "sleep 0"`) Process(`zsh -i -c 'sleep 0'`, ProcessExited(0)) julia> [1]+ Stopped ./julia ``` (cherry picked from commit 0cbe466)
Just happened to notice in passing that `_included_files[1]` did not get fixed when Base_compiler.jl was split from Base.jl so it causes warnings sometimes in Revise.jl CI (cherry picked from commit 488be22)
Similar to the existing world age hint for MethodError, this adds a helpful message when an UndefVarError occurs because a binding was defined in a newer world age than the code trying to access it. The implementation checks if a binding that was undefined at the error's world age is now defined in the current world, and displays: "The binding may be too new: running in world age X, while current world is Y." Additionally, for all binding kinds, the error hint now notes when the binding state has changed between the error's world and the current world. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com> (cherry picked from commit 2e39f64)
(cherry picked from commit 9da6455)
4167322
to
6ab22e4
Compare
@nanosoldier |
The package evaluation job you requested has completed - possible new issues were detected. Report summary❗ Packages that crashed14 packages crashed only on the current version.
✖ Packages that failed333 packages failed only on the current version.
14 packages failed on the previous version too. ✔ Packages that passed tests13 packages passed tests on the previous version too. |
(cherry picked from commit 48c0e7f)
…cursor (#58298) This is a stopgap solution. For now, have `find_prefix_call` tell us whether the cursor is before the `;` (:positional) or after (:kwargs), and set `exact_nargs` only when it is :kwargs. Eventually, we should remove kwargs_flag entirely and have the method completions use our precise position information. Fixes #58296, and the related issue I mention in #58296 (comment). --------- Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com> Co-authored-by: Jameson Nash <jameson@juliacomputing.com> (cherry picked from commit da6356b)
Backported PRs:
Compiler._verify_trim_world_age
for better printing #58407hasmethod
with kwargs to exclude positional arg names #58410code_typed
#58411Core
methods from newly-inferred list #58510isdefinedglobal
#58542builtin_tfunction(::REPLInterpreter)
overload #58585Ptr
values static-show w/ type-information #58584IteratorSize
method forGenerator
#58110Lockable
doc strings #58603Need manual backport:
@main
for juliac executable entry point #57588jl_get_global
#58540Contains multiple commits, manual intervention needed:
CodeInstance
to post-optimization step #58343Non-merged PRs with backport label:
setprecision
method #58586@invokelatest
performance regression #58582--trace-compile
#58535transcode
: prevent Windows sysimage invalidation #58038@nospecialize
forstring_index_err
#57604maxthreadid
fromThreads
#57490