Skip to content
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.11.0-rc4/1.11.0 #55586

Merged
merged 22 commits into from
Sep 17, 2024
Merged

Conversation

KristofferC
Copy link
Member

@KristofferC KristofferC commented Aug 26, 2024

Backported PRs:

Contains multiple commits, manual intervention needed:

Non-merged PRs with backport label:

staticfloat and others added 4 commits August 26, 2024 10:41
This sets all `.jl` files in `$(prefix)/base` and `$(prefix)/test` to
have `0444` permissions, to better match how `Pkg` installs packages
(and sets them to be read-only).

Fixes JuliaLang/juliaup#865

---------

Co-authored-by: Mosè Giordano <[email protected]>
(cherry picked from commit 62e7705)
Fixes async safety, thread safety, FreeBSD safety.

(cherry picked from commit d4bd540)
The destination array was being indexed incorrectly if it had offset
indices. This led to the following on nightly:
```julia
julia> using OffsetArrays

julia> r = 5:100;

julia> a = OffsetVector(r, 2);

julia> sum(a, dims=1)
1-element OffsetArray(::Vector{Int64}, 3:3) with eltype Int64 with indices 3:3:
 0

julia> sum(a)
5040
```
The indexing was marked `@inbounds`, so this was not throwing an error.
This PR also follows #55329 and only marks the indexing operations as
`@inbounds`, omitting the function calls.

---------

Co-authored-by: Matt Bauman <[email protected]>
(cherry picked from commit 3d20a92)
…55564)

This dict will contain things if we load a package image during
precompilation

(cherry picked from commit 0c8641a)
@KristofferC KristofferC added the release Release management and versioning. label Aug 26, 2024
DilumAluthgeBot and others added 13 commits August 28, 2024 18:16
…1061ecc (#55615)

Stdlib: Downloads
URL: https://github.com/JuliaLang/Downloads.jl.git
Stdlib branch: master
Julia branch: backports-release-1.11
Old commit: a9d274f
New commit: 1061ecc
Julia version: 1.11.0-rc2
Downloads version: 1.6.0(It's okay that it doesn't match)
Bump invoked by: @IanButterworth
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/Downloads.jl@a9d274f...1061ecc

```
$ git log --oneline a9d274f..1061ecc
1061ecc Fix setting atexit. Fixes trailing download tasks during precompilation (#257)
b871386 Add debug information to `setopt` commands (#248)
51e5321 fix: use invokelatest for easy_hook, avoid race (#241)
05f9ec2 make precompile workload relocatable (#236)
2dd891a Hardcode doc edit backlink (#232)
```

Co-authored-by: Dilum Aluthge <[email protected]>
…actVector (#55480)

Per
#55470 (comment),
the `push!(::AbstractArray, ...)` array implementation assumed one-based
indexing and did not account for an `OffsetVector`
scenario.

Here we add tests for `push!(::AbstractArray, ...)` and
`append(::AbstractArray, ...)` including using `@invoke` to test the
effect on `OffsetVector`.

cc: @fredrikekre
(cherry picked from commit 5230d27)
I made a mistake with which threadpool was which.

(cherry picked from commit d5bbcc5)
`StepRangeLen{<:CartesianIndex}` indices have been supported since
v1.11, but bounds-checking for such indices currently falls back to
iterating over the entire range. This PR adds a quick `checkindex` for
such ranges.

The performance improvement as a consequence:
```julia
julia> D = Diagonal(1:10_000);

julia> @Btime checkbounds($D, diagind($D, IndexCartesian()));
  6.697 μs (0 allocations: 0 bytes) # nightly, O(n)
  4.044 ns (0 allocations: 0 bytes) # This PR, O(1)
```

(cherry picked from commit 6440292)
There is not enough stack space remaining after a stack overflow on
Windows to allocate the 4k page used by `write` to call the WriteFile
syscall. This causes it to hard-crash. But we can simply run this on the
altstack implementation, where there is plenty of space.

(cherry picked from commit eebc1e4)
This should fix the `Diagonal`-related issue from
https://github.com/JuliaLang/julia/issues/55590, although the
`SymTridiagonal` one still remains.
```julia
julia> using LinearAlgebra

julia> a = Matrix{BigFloat}(undef, 2,2)
2×2 Matrix{BigFloat}:
 #undef  #undef
 #undef  #undef

julia> a[1] = 1; a[3] = 1; a[4] = 1
1

julia> a = Hermitian(a)
2×2 Hermitian{BigFloat, Matrix{BigFloat}}:
 1.0  1.0
 1.0  1.0

julia> b = Symmetric(a)
2×2 Symmetric{BigFloat, Matrix{BigFloat}}:
 1.0  1.0
 1.0  1.0

julia> c = Diagonal([1,1])
2×2 Diagonal{Int64, Vector{Int64}}:
 1  ⋅
 ⋅  1

julia> a+c
2×2 Hermitian{BigFloat, Matrix{BigFloat}}:
 2.0  1.0
 1.0  2.0

julia> b+c
2×2 Symmetric{BigFloat, Matrix{BigFloat}}:
 2.0  1.0
 1.0  2.0
```

(cherry picked from commit 39f2ad1)
Fixes #55706 that is seemingly a 4472x regression, not just 16x (was my
first guess, based on CondaPkg, also fixes or greatly mitigates
JuliaPy/CondaPkg.jl#145), and large part of 3x
regression for PythonCall.

---------

Co-authored-by: Kristoffer Carlsson <[email protected]>
(cherry picked from commit 1463c99)
Fixes #55719

---------

Co-authored-by: Max Horn <[email protected]>
(cherry picked from commit 99b8868)
@KristofferC
Copy link
Member Author

KristofferC commented Sep 12, 2024

Test Failed at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XC9YQX9HH2.0/build/default-honeycrisp-XC9YQX9HH2-0/julialang/julia-release-1-dot-11/julia-f09de94afb/share/julia/stdlib/v1.11/Pkg/test/new.jl:740
  Expression: Pkg.add(name = "Example")
   Evaluated: LogRecord[LogRecord(Debug, "tiered_resolve: trying PRESERVE_ALL", Pkg.Operations, :Operations, :Pkg_Operations_cbf7a17c, "/Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XC9YQX9HH2.0/build/default-honeycrisp-XC9YQX9HH2-0/julialang/julia-release-1-dot-11/julia-f09de94afb/share/julia/stdlib/v1.11/Pkg/src/Operations.jl", 1355, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}()), LogRecord(Debug, "Easy setopt: 10103 = Ptr{Nothing} 

No idea why Pkg would start failing...

Actually, it must be 598a4de...

jishnub and others added 2 commits September 12, 2024 15:27
This backports the following commits:
commit 9690961c426ce2640d7db6c89952e69f87873a93
Author: Jishnu Bhattacharya <[email protected]>
Date:   Mon Apr 29 21:43:31 2024 +0530

    Add upper/lowertriangular functions and use in applytri (#53573)

    We may use the fact that a `Diagonal` is already triangular to avoid
    adding a wrapper.

    Fixes the specific example in
    https://github.com/JuliaLang/julia/issues/53564, although not the
    broader issue. This is because it changes the operation from a
    `UpperTriangular + UpperTriangular` to a `UpperTriangular + Diagonal`,
    which uses broadcasting. The latter operation may also allow one to
    define more efficient methods.

commit 77821cdddb968eeabf31ccb6b214ccf59a604c68
Author: Jishnu Bhattacharya <[email protected]>
Date:   Wed Aug 28 00:53:31 2024 +0530

    Remove Diagonal-triangular specialization

commit 621fb2e739a04207df63857700aca3562b41b5eb
Author: Jishnu Bhattacharya <[email protected]>
Date:   Wed Aug 28 00:50:49 2024 +0530

    Restrict broadcasting to strided-diag Diagonal

commit 58eb2045ddb5dbbfdb759c06239ca54751e73d71
Author: Jishnu Bhattacharya <[email protected]>
Date:   Wed Aug 28 00:44:47 2024 +0530

    Add tests for partly filled parent

commit 5aa6080a580bfbc9453e94a06f3e379e4517b316
Author: Jishnu Bhattacharya <[email protected]>
Date:   Tue Aug 27 20:42:07 2024 +0530

    Reroute Symmetric/Hermitian + Diagonal through triangular
@jishnub jishnub force-pushed the backports-release-1.11 branch from d40fa57 to 4ab4722 Compare September 12, 2024 09:58
@jishnub
Copy link
Contributor

jishnub commented Sep 12, 2024

I had messed up the cherry-pick, and amended the commit to keep the history clean. Hope this doesn't lead to inconvenience.

…#55729)

Makes functions for the report printing that can be precompiled into the
sysimage.

(cherry picked from commit 255162c)
@KristofferC
Copy link
Member Author

@nanosoldier runtests()

@nanosoldier
Copy link
Collaborator

The package evaluation job you requested has completed - possible new issues were detected.
The full report is available.

KristofferC and others added 2 commits September 16, 2024 15:05
@aviatesk aviatesk force-pushed the backports-release-1.11 branch from 41b225a to 1c516dc Compare September 17, 2024 08:28
@KristofferC KristofferC merged commit 6cb5b1f into release-1.11 Sep 17, 2024
6 checks passed
@KristofferC KristofferC deleted the backports-release-1.11 branch September 17, 2024 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Release management and versioning.
Projects
None yet
Development

Successfully merging this pull request may close these issues.