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

release-1.9: Backports for 1.9.3 #50507

Merged
merged 22 commits into from Aug 18, 2023
Merged

Conversation

KristofferC
Copy link
Sponsor Member

@KristofferC KristofferC commented Jul 11, 2023

Backported PRs:

Need manual backport:

Non-merged PRs with backport label:

quinnj and others added 5 commits July 11, 2023 14:42
* Generalize Bool parse method to AbstractString

Fixes JuliaStrings/InlineStrings.jl#57.

We currently have a specialization for `parse(Bool, ::Union{String, SubString{String})`
where `true` and `false` are parsed appropriately. The restriction to
`Union{String, SubString{String}}`, however, means we don't get this behavior
for other `AbstractString`s. In the linked issue above, for InlineStrings, we end up
going through the generic integer parsing codepath which results in an `InexactError`
when we try to do `Bool(10)`.

The proposal in this PR takes advantage of the fact that there is only the 2 comparisons
where we do `_memcmp` that require the input string to be "dense" (in memory), and otherwise,
we just do a comparison against a `SubString` of the input string.

Relatedly, I've wanted to introduce the concept of an abstrac type like:

```julia
abstract type MemoryAddressableString <: AbstractString
```

where the additional required interface would be being able to call
`pointer(::MemoryAddressableString)`, since a lot of our string algorithms depend on doing
these kind of pointer operations and hence makes it quite a pain to implement your own
custom string type.

* Apply suggestions from code review

Co-authored-by: Stefan Karpinski <stefan@karpinski.org>
Co-authored-by: Nick Robinson <npr251@gmail.com>

Co-authored-by: Stefan Karpinski <stefan@karpinski.org>
Co-authored-by: Nick Robinson <npr251@gmail.com>
(cherry picked from commit 63830a6)
vchuravy and others added 15 commits August 10, 2023 11:10
fixes #50780 caused by #47013.

(cherry picked from commit 3e04129)
Update URLs to JuliaHub blog

(cherry picked from commit abae35c)
Fixes the case from #50518, but we actually have two test cases in
the tests that also hit this (e.g. this one:
```
f40964(xs::Int...=1; k = 2) = (xs, k)
```), but just happened not to hit the bad codegen path. #50556,
once merged would have complained on those definitions as well,
without this fix.

(cherry picked from commit c272236)
…=false

only check that values are finite in `generic_lufact`  when `check=true`

(cherry picked from commit 824cdf1)
The documentation of `Pkg.jl` is instructing
developers to rely on the existence of this function, and there doesn't
seem to be any alternative which is a part of the API that developers
can use instead on to guarantee forward compatibility for the same
behavior.

`Base.get_extension` is [referred to
explicitly](https://pkgdocs.julialang.org/v1.9/creating-packages/#Backwards-compatibility)
in the `Pkg.jl` docs to conditionally use package extensions vs
`Requires.jl`.

The `Pkg.jl` docs suggest
```julia
if !isdefined(Base, :get_extension)
  include("../ext/PlottingContourExt.jl")
end
```
to transition from "normal dependency to extension," which will break
and automatically load the extension in future versions should
`Base.get_extension` go away.

`Base.get_extension` is the only way (that I know of) to directly access
the module associated with a package extension, which can be a useful
utility as well.

(cherry picked from commit d1759bc)
Currently, `Array(r::AbstractRange)` falls back to `vcat(r)`, but
certain ranges may choose to specialize `vcat(r::AbstractRange)` to not
return an `Array`. This PR ensures that `Array(r)` always returns an
`Array`.

At present, there's some code overlap with `vcat` (just above the
`Array` method added in this PR). Perhaps some of these may be replaced
by `unsafe_copyto!`, but the tests for ranges include some special cases
that don't support `getindex`, which complicates things a bit. I've not
done this for now. In any case, the common bit of code is pretty simple,
so perhaps the duplication is harmless.

(cherry picked from commit 3cc0590)
@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runtests(ALL, vs = ":release-1.9")

@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runbenchmarks(ALL, vs = ":release-1.9")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

Otherwise we may end up with the state of a dead thread, as the system
IDs can alias. This can lead to an early return from the exception
handler, resulting in e.g. safepoint exceptions being actually delivered
to user code.

---------

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Co-authored-by: Cody Tapscott <topolarity@tapscott.me>
@imciner2
Copy link
Contributor

Is it possible to also backport #48909 to 1.9? The docs for 1.9.2 also show the issue with the admonition not appearing properly.

@nanosoldier
Copy link
Collaborator

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

@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runtests(["PALEOocean", "HarmonicBalance", "FunctionOperators", "PiecewiseDeterministicMarkovProcesses", "SubSIt", "MixtureDensityNetworks", "MCMCDiagnosticTools", "ONNXNaiveNASflux", "ONNX", "BiochemNetABC", "QuantumAnnealing", "RetentionParameterEstimator", "Plots", "EarlyStopping", "BilevelJuMP", "GasChem", "TriplotRecipes", "QuantumCumulants", "SpinDoctor", "MimiRFFSPs", "TuringGLM", "CryoGrid", "Anatta", "Trixi", "BondGraphs", "ParameterEstimation", "NeuralArithmetic", "ITensorTDVP", "NLPModelsTest", "PowerSimulationsDynamics", "StaticArrays"], vs = ":release-1.9")

@nanosoldier
Copy link
Collaborator

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

This change simplifies the boundscheck in loop as LLVM would lift the const subtraction.
Simd block would be generated in more cases.

Co-authored-by: N5N3 <2642243996@qq.com>
(cherry picked from commit 1543cdd)
@KristofferC KristofferC merged commit a773c8b into release-1.9 Aug 18, 2023
5 checks passed
@KristofferC KristofferC deleted the backports-release-1.9 branch August 18, 2023 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:release Release management and versioning.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet