-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Backports for julia 1.11.6 #58224
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 julia 1.11.6 #58224
Conversation
…lls (#58200) `op` should not be `inbounds`-ed here the test case I added might technically be an illegal (or at least bad) use of `@propagate_inbounds` in case anyone has a suggestion for a more natural test case, but nonetheless it demonstrates getting a `BoundsError` instead of a segfault (worse) or incorrect / junk data (more worse), both of which happen on master (cherry picked from commit bdab032)
(Fix removal of globals with addrspaces in removeAddrspaces (#58322))
(cherry picked from commit 58ed793)
Closes #57376 Closes #34037 - Adds a lock in `SimpleLogger` and `ConsoleLogger` for use on maxlog tracking and stream writes to improve threadsafety. Closely similar to #54497 - Turns the internal `_min_enabled_level` into a `Threads.Atomic`. There are [some direct interactions](https://juliahub.com/ui/Search?type=code&q=_min_enabled_level&w=true) to this internal in the ecosystem, but they should still work ``` julia> Base.CoreLogging._min_enabled_level[] = Logging.Info+1 LogLevel(1) ``` - Brings tests over from #57448 Performance seems highly similar: ### Master ``` julia> @time for i in 1:10000 @info "foo" maxlog=10000000 end [ Info: foo ... 0.481446 seconds (1.33 M allocations: 89.226 MiB, 0.49% gc time) ``` ### This PR ``` 0.477235 seconds (1.31 M allocations: 79.002 MiB, 1.77% gc time) ``` (cherry picked from commit 9af9650)
Fix the subtyping hang found in #58115 (comment) (cherry picked from commit c9ad04d)
(cherry picked from commit d4f2e8a)
This does not fix the underlying issue that can occur here which is a collision of build_ids.lo between modules in IR decompression. Fixing that requires a somewhat significant overhaul to the serialization of IR (probably using the module identity as a key). This does mean we use a lot more of the bits available here so it makes collisions a lot less likely( they were already extremely rare) but hrtime does tend to only use the lower bits of a 64 bit integer and this will hopefully add some more randomness and make this even less likely (cherry picked from commit 7157407)
(cherry picked from commit 088bb90)
(cherry picked from commit a87b056)
(cherry picked from commit 9da6455)
(cherry picked from commit 48c0e7f)
(cherry picked from commit f5e983e)
This dodges the issue on my machine, let's see if it works for everyone. (cherry picked from commit dda37f9)
It turns out that there are two path types in applescript, and I had mixed two of them in my previous patch. Annoyingly, things seemed to work when editing locally, unsure why. (cherry picked from commit c759aa9)
When this API was added, this function inlined, which is important, because the API relies on the allocation of the `Ref` being elided. At some point (I went back to 1.8) this regressed. For example, it is currently responsible for substantially all non-Expr allocations in JuliaParser. Before (parsing all of Base with JuliaParser): ``` │ Memory estimate: 76.93 MiB, allocs estimate: 719922. ``` After: ``` │ Memory estimate: 53.31 MiB, allocs estimate: 156. ``` Also add a test to make sure this doesn't regress again. (cherry picked from commit d6294ba)
(cherry picked from commit 8567a3a)
Fixes #53430 ```julia julia> a = rand(100,100); b = similar(a); av = view(a, axes(a)...); bv = view(b, axes(b)...); bv2 = view(b, UnitRange.(axes(b))...); julia> @Btime copyto!($bv2, $av); # slow, indices are UnitRanges 12.352 μs (0 allocations: 0 bytes) # master, v"1.13.0-DEV.745" 1.662 μs (0 allocations: 0 bytes) # this PR julia> @Btime copyto!($bv, $av); # reference 1.733 μs (0 allocations: 0 bytes) ``` The performances become comparable after this PR. I've also renamed the second `I` to `Itail`, as the two variables represent different quantities. (cherry picked from commit 36a4616)
(cherry picked from commit 7b6065e)
) (cherry picked from commit da00451)
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 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)
#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 <[email protected]> Co-authored-by: Sukera <[email protected]> (cherry picked from commit 1b0b028)
(cherry picked from commit b9a0497)
Update command line option formatting. (cherry picked from commit 8c28ac6)
(cherry picked from commit d9764d6)
I've created an [Install](https://julialang.org/install/) page separate from the [Downloads](https://julialang.org/downloads/) page on the website. This updates various references to point to the correct pages. (cherry picked from commit 48660a6)
(cherry picked from commit 4766133)
`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)
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)
👀 |
@nanosoldier |
The package evaluation job you requested has completed - possible new issues were detected. Report summary❗ Packages that crashed18 packages crashed on the previous version too. ✖ Packages that failed47 packages failed only on the current version.
2961 packages failed on the previous version too. ✔ Packages that passed tests34 packages passed tests only on the current version.
6350 packages passed tests on the previous version too. ➖ Packages that were skipped altogether1300 packages were skipped on the previous version too. |
@nanosoldier |
The package evaluation job you requested has completed - possible new issues were detected. Report summary✖ Packages that failed7 packages failed only on the current version.
5 packages failed on the previous version too. ✔ Packages that passed tests3 packages passed tests only on the current version.
31 packages passed tests on the previous version too. |
Backported PRs:
reverse!
#58086@inbounds
annotations inaccumulate.jl
to only indexing calls #58200bind
inChannel
method doc string #58113hasmethod
with kwargs to exclude positional arg names #58410Lockable
doc strings #58603CartesianIndices
iteration #58742Need manual backport:
@time_imports
@trace_compile
@trace_dispatch
#58011exp_impl
topow
#58062one
for theSizedArray
test helper #58209Core
methods from newly-inferred list #58510Ptr
values static-show w/ type-information #58584IteratorSize
method forGenerator
#58110Contains multiple commits, manual intervention needed:
using Foo: Foo, ...
in package code (was: "using considered harmful") #42080struct
to hard #56755--project=@script
when outside script directory #56351jl_type_hash
is concrete evaluated) #58401Non-merged PRs with backport label:
--trace-compile
#58535transcode
: prevent Windows sysimage invalidation #58038@nospecialize
forstring_index_err
#57604displaysize
to theIOContext
used by the REPL #55499isfile_casesensitive
fixes on Windows #55220@inbounds
andBase.@propagate_inbounds
#50157