Skip to content

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

Merged
merged 46 commits into from
Jun 4, 2025
Merged

Backports for 1.12.0-beta4 #58369

merged 46 commits into from
Jun 4, 2025

Conversation

KristofferC
Copy link
Member

@KristofferC KristofferC commented May 9, 2025

Backported PRs:

Need manual backport:

Contains multiple commits, manual intervention needed:

Non-merged PRs with backport label:

@KristofferC KristofferC added the release Release management and versioning. label May 9, 2025
@KristofferC KristofferC changed the title set VERSION to 1.12.0-beta3 Backports for 1.12.0-beta4 May 10, 2025
gbaraldi and others added 8 commits May 12, 2025 09:44
…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)
…#58335)

This extends the use of the optimization in #58291 to also apply to some
uses of ml_matches also.

(cherry picked from commit d1ec7d5)
`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)
@KristofferC KristofferC force-pushed the backports-release-1.12 branch from a89d73c to aa0e223 Compare May 12, 2025 07:44
maleadt and others added 11 commits May 14, 2025 12:11
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)
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)
#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)
DilumAluthgeBot and others added 5 commits May 27, 2025 14:21
… 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>
JeffBezanson and others added 17 commits May 28, 2025 11:14
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)
Add missing compatibility annotation for `isdefinedglobal`. Fixes
#58528.

(cherry picked from commit 953903b)
…ad (#58585)

This overload was necessary in the past, but in the current compiler
implementation, all `getglobal` calls that were aggressively concretized
by this overload are already concretized by `concrete_eval_call`. So
this overload is no longer necessary.

- closes #58537
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)
Fixes #50985

(cherry picked from commit aa06976)
Small follow-up to #58512

(cherry picked from commit 36bd3ad)
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)
@KristofferC KristofferC force-pushed the backports-release-1.12 branch from 4167322 to 6ab22e4 Compare June 2, 2025 11:44
@KristofferC
Copy link
Member Author

@nanosoldier runtests(["SIMDTypes", "LazyBroadcast", "MistyClosures", "SyntaxTree", "Fuzzy", "ModuleDocstrings", "Syslogs", "TraceFuns", "CatViews", "Bits", "FindDefinition", "FuzzyCompletions", "ExprTools", "MultiThreadedCaches", "CoverageTools", "SingleFloats", "StringAlgorithms", "CountFlops", "CellLists", "OverflowContexts", "RNGPool", "EnzymeCore", "InterProcessCommunication", "MappedArrays", "InternedStrings", "CompTime", "BracedErrors", "ReferenceImplementations", "Recyclers", "ThreadLocalCounters", "Infinities", "OperatorScaling", "TypeStability", "Spec", "FunctionFusion", "NarrativeTest", "Abaco", "RoundingEmulator", "Baobzi", "LMDB", "StarAlgebras", "YaoHIR", "Match", "Umlaut", "FieldFlags", "TestEnv", "GAFramework", "Interfaces", "BSON", "ScikitSpatial", "StaticArraysBlasInterfaces", "OpenQASM", "CommonRLInterface", "Cliffords", "SimJulia", "RBNF", "MixedStructTypes", "TypedSyntax", "NL2sol", "NormalHermiteSplines", "Tracy", "LambertW", "PlutoMonacoEditor", "SimpleI18n", "Mueller", "CellularAutomata", "TrixiBase", "Divergences", "Colors", "StaticLint", "SHTns", "SimpleExpressions", "GraphQLGen", "GitCommand", "JuliaWorkspaces", "DiffieHellman", "MCP2221Driver", "FixedPointDecimals", "GridMaps", "DRIPs", "PolarizedTypes", "XDiag", "FCSFiles", "DocSeeker", "RustFFT", "HypertextTemplates", "ODEInterface", "CayleyMengerDeterminant", "SigmaProofs", "AStarGridSearch", "DimensionfulAngles", "CircularArrayBuffers", "Cosmology", "RollingWindowArrays", "BoundedDegreeGraphs", "Accessors", "DynamicQuantumCircuits", "SquashFS", "PlayingCards", "SMCExamples", "NearestNeighborDescent", "DispatchDoctor", "RNGTest", "ShuffleProofs", "InteratomicPotentials", "FiniteDifferences", "NiLang", "ADOLC", "LatinHypercubeSampling", "InPartS", "GridWorlds", "UCX", "StructArrays", "OpticalPropagation", "TerminalGat", "InteractiveErrors", "Polyester", "OpenSSLGroups", "LinkedInAPI", "AllocCheck", "DifferentiableFlatten", "NestedGraphs", "UnitfulAssets", "WannierIO", "Proj", "DuckDB", "MolecularMinimumDistances", "GenericSchur", "AtomicSymmetries", "Toolips", "QEDcore", "Presentation", "PkgJogger", "OpenDSSDirect", "QEDprocesses", "LinearElasticityBase", "QXZoo", "AdmittanceModels", "CallableExpressions", "QuasiArrays", "MultiBroadcastFusion", "BurrowsWheelerAligner", "QEDfields", "DictArrays", "TypedMatrices", "UnitfulLinearAlgebra", "Norg", "YAAD", "XmlStructWriter", "PyCallJLD2", "NLSolvers", "FastCholesky", "AtiyahBott", "EnergyExpressions", "Term", "AccessorsExtra", "ScHoLP", "FiberNlse", "LinearAlgebraForCAP", "DataToolkit", "Air", "SparseMatricesCOO", "AbstractNeuralNetworks", "AngularMomentumAlgebra", "NomnomlJS", "Seaborn", "SparseIR", "SymPyCore", "FrechetDist", "Quante", "SymFEL", "MathematicalSystems", "Experimenter", "QEDevents", "QuantumElectrodynamics", "RationalPolygons", "ConstrainedControl", "NeutralLandscapes", "BlackBoxOptim", "SLEEFMath", "Ephemerides", "TrustRegionMethods", "JuDGE", "SymPyPythonCall", "SimilaritySearch", "TemporalGPs", "HopTB", "ConstrainedDynamics", "AbstractLogic", "IntervalLinearAlgebra", "PlutoTeachingTools", "StaticWebPages", "ShiftedProximalOperators", "MonteCarloSummary", "PRASCapacityCredits", "Tensors", "MultiScaleTreeGraph", "ParaReal", "AbsSmoothFrankWolfe", "BitSAD", "NeptuneAILogger", "AutomotiveSimulator", "QuantumAlgebra", "SpatialEcology", "TensorCrossInterpolation", "SlidingDistancesBase", "StrategicGames", "ReinforcementLearningTrajectories", "UMAP", "MatrixFactorizations", "PyPlotUtils", "SoleBase", "DataToolkitCommon", "InventoryManagement", "Ipaper", "SymbolicWedderburn", "Octavian", "GEMPIC", "SparseMatrixColorings", "VlasiatorPyPlot", "EnergyModelsRenewableProducers", "Santiago", "BayesianQuadrature", "LaserTypes", "PowerModelsAnnex", "RangeEnclosures", "DocstringAsImage", "WaterModels", "DifferentiableFrankWolfe", "Gaugefields", "PlutoPlotly", "PolynomialAmoebas", "MTH229", "Mango", "GEOTRACES", "FinancialToolbox", "Mice", "ConstitutiveModels", "DACE", "InfiniteOpt", "SymbolicIndexingInterface", "FastTransforms", "MarkovChainHammer", "Maxnet", "RegNets", "SignalTemporalLogic", "Sensemakr", "ProfileView", "ArDCA", "FeynmanDiagram", "EtherSPH", "Jadex", "TransmuteDims", "Galley", "TensorKitSectors", "AbstractCosmologicalEmulators", "XCALibre", "EmpiricalPotentials", "PoincareInvariants", "SimSpread", "TensorCast", "CSDP", "InfrastructureSystems", "FinEtools", "OSQP", "KomaMRICore", "ElementaryFluxModes", "TransitionsInTimeseries", "TensorOperationsTBLIS", "ExplainableAI", "EwaldSummations", "PsychometricsBazaarBase", "FiniteElementContainers", "SimulationLogs", "LinearRegressionKit", "SparseKmeansFeatureRanking", "SUNRepresentations", "MCMCDebugging", "SymbolicUtils", "ImageSegmentation", "DynACof", "DecisionMakingPolicies", "MPIMeasurements", "ACTRSimulators", "ConstraintExplorer", "PALEOboxes", "OrdinaryDiffEqExtrapolation", "TaylorInversion", "Jabalizer", "ParallelAnalysis", "Wflow", "JOLI", "TimeSeriesClassification", "PassiveTracerFlows", "Qaintmodels", "WordCloud", "RecurrentLayers", "IESopt", "Gadfly", "ReferenceFiniteElements", "CategoryData", "PyBraket", "IterativeLQR", "PowerSystemCaseBuilder", "ConstrainedDynamicsVis", "UnROOT", "LatticeModels", "EvoDynamics", "Tasmanian", "JUDI", "ComputerAdaptiveTesting", "NDTensors", "Spehulak", "RingStarProblems", "RHEOS", "ProbabilisticCircuits", "FusibleBroadcasts", "GeometricalOptics", "ElectronLiquid", "GMT", "PALEOsediment", "GtkUtilities", "GeoEstimation", "GeoStatsFunctions", "StartUpDG", "ExpressionTreeForge", "MarginalLogDensities", "DeconvOptim", "SwitchOnSafety", "FastBEAST", "GridapTopOpt", "PALEOmodel", "EnergySamplers", "PartiallySeparableNLPModels", "MGVI", "DynamicMovementPrimitives", "FluxTraining", "SolverBenchmark", "TropicalNN", "DistributedStwdLDA", "SymbolicAnalysis", "GenericCharacterTables", "LogicCircuits", "NonconvexJuniper", "PortfolioAnalytics", "MultiStateSystems", "WaveOpticsPropagation", "Swalbe", "ReinforcementLearningFarm", "ChargeTransport", "ReinforcementLearningZoo", "RvLineList", "HetaSimulator", "DiffusionGarnet", "Bactos", "MNPDynamics", "NuclearToolkit", "GNNGraphs", "FractionalSystems", "WGPUgfx", "FSimPlots", "CDGRNs", "OpenQuantumSystems", "GeneticsMakie", "Fable", "CellMLToolkit", "MRINavigator", "vSmartMOM", "SwissVAMyKnife", "Biofilm", "DiskArrayEngine", "MAGEMinApp", "Microstructure", "CropRootBox"], vs = ":release-1.11")

@nanosoldier
Copy link
Collaborator

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

Report summary

❗ Packages that crashed

14 packages crashed only on the current version.

  • The process was aborted: 1 packages
  • Invalid LLVM IR was generated: 1 packages
  • An internal error was encountered: 10 packages
  • GC corruption was detected: 1 packages
  • A segmentation fault happened: 1 packages

✖ Packages that failed

333 packages failed only on the current version.

  • Package has syntax issues: 5 packages
  • Package fails to precompile: 84 packages
  • Illegal method overwrites during precompilation: 11 packages
  • Package has test failures: 62 packages
  • Package tests unexpectedly errored: 132 packages
  • Networking-related issues were detected: 1 packages
  • There were unidentified errors: 2 packages
  • Tests became inactive: 2 packages
  • Test duration exceeded the time limit: 32 packages
  • Test log exceeded the size limit: 2 packages

14 packages failed on the previous version too.

✔ Packages that passed tests

13 packages passed tests on the previous version too.

fredrikekre and others added 4 commits June 3, 2025 11:00
while testing to ensure that ~~absurdly large method tables~~ tab
completing over an abstract function call doesn't tank the performance
of the REPL

Fixes #57836

(cherry picked from commit 6f12957)
…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)
@KristofferC KristofferC merged commit 6f7331c into release-1.12 Jun 4, 2025
7 checks passed
@KristofferC KristofferC deleted the backports-release-1.12 branch June 4, 2025 11:48
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.