-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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.10.0-rc2 #52045
Backports for 1.10.0-rc2 #52045
Conversation
`jl_errorexception_type` is undefined at the point we (fail to) load a sysimg. (cherry picked from commit 20a5fa7)
This is required now once Distributed is not in the sysimage. Fixes https://github.com/JuliaLang/julia/issues/51756 (cherry picked from commit 795d8d7)
This aligns their behavior with manual calls to `finalize(o)`, and prepares for a future time in which these functions are always run on a separate thread. This means that they can wait to acquire locks in this context, which otherwise would have been denied to them. (cherry picked from commit c54a3f2)
Can cause spurious warnings about not closing these properly and unexpected events to appear after `close` returns. (cherry picked from commit d0c4284)
This bumps Statistics to the latest commit of the release-1.10 branch in order to backport JuliaStats/Statistics.jl#153. See JuliaData/DataFrames.jl#3383. Cc: @bkamins @George9000
This avoids a crashes where we run the destructors because C++ is fun and runs destructors before thread exit. (cherry picked from commit 3d88550)
(cherry picked from commit f99e6bf)
Two chagnes wrapped into one `Base.copymutable` => `Base.copymutable` & `collect` and `Base.copymutable` => `similar` & words. Followup for #52086 and #46104; also fixes #51932 (though we still may want to make `copymutable` public at some point) --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> (cherry picked from commit 42c088b)
This fixes a whole bunch of small but annoying bugs, as described in the JuliaSyntax-0.4.7 release notes https://github.com/JuliaLang/JuliaSyntax.jl/releases/tag/v0.4.7 I've been careful about cutting the JuliaSyntax-0.4.7 release from nonbreaking changes, so we should be able to backport this to 1.10. --- Extended notes about compatibility * The public keyword in JuliaLang/JuliaSyntax.jl#320 is released in JuliaSyntax-0.4.7 but JuliaSyntax is multi-version aware so this is disabled when used as the default parser in Julia 1.10, but is enabled in 1.11-DEV. So should be backportable. * We aim for parsing to `Expr` to always be stable in JuliaSyntax and independent of the host Julia `VERSION`, but we're not fully there yet for 1.11 / 1.10 due to JuliaLang/JuliaSyntax.jl#377. Thus some careful management of the JuliaSyntax-0.4.x branch for now. (cherry picked from commit 85d7cca)
We need #51725 here (Basically everything in that PR except for the SparseArrays version bump) |
…sion. (#52140) Explanation for the `GetFullPathName` behavior https://developercommunity.visualstudio.com/t/GetFullPath-fails-if-given-empty-string/483359#T-N486167 (cherry picked from commit eaef647)
Fixes #51985 Ensure that the REPL completions escape and unescape text correctly, using the correct functions, and accounting for exactly what the user has currently typed. The old broken method is left around for Pkg, since it has an over-reliance on it returning incorrect answers. Once Pkg is fixed, we can delete that code. Co-authored-by: Jameson Nash <vtjnash@gmail.com> (cherry picked from commit 5edcdc5)
(cherry picked from commit f26947b)
Currently the interpreter always returns false. Which isn't very good. Make it follow whatever the JIT will do. (cherry picked from commit a6c656e)
#49559 by @JeffBezanson updated `src/flisp/julia_charmap.h` but missed [the comment](https://github.com/JuliaLang/julia/blob/164969f3d06919b073f3aa9ee608e40974ca82d9/src/flisp/julia_charmap.h#L5-L6) noting that `base/strings/unicode.jl` has to be updated accordingly. (cherry picked from commit 05f4b05)
…#51371) ~This is just me proposing a suggestion from @KristofferC in https://discourse.julialang.org/t/debug-has-massive-performance-impact/103974/22, it's all his code / idea, not mine.~ This PR makes it so that on windows, we pre-allocate an `IdDict` and every time someone looks up environment variables (motivating example here is `@debug` statements), we store the result of `cwstring(::String)` in that `IdDict` so that it doesn't need to be re-computed for future uses. The idea behind this is that people have observed that [using `@debug` is significantly more costly on Windows than other platforms](https://discourse.julialang.org/t/debug-has-massive-performance-impact/103974), even though we have documented in that manual that it should be a really cheap operation. @KristofferC suggests this is due to the fact that [checking environment variables in Windows is more costly](https://discourse.julialang.org/t/debug-has-massive-performance-impact/103974/18). ~The idea here is that we preallocate a `Cwstring` on Windows that just holds the text `"JULIA_DEBUG"`, so that if `access_env(f, "JULIA_DEBUG")` gets called, we don't need to create a new `Cwstring` and then throw it away each time.~ --------- Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com> Co-authored-by: Jameson Nash <vtjnash@gmail.com> (cherry picked from commit 9dcedaa)
…aching (#52214) Fixes #52213 Overwritting methods during cache creation is currently not something that the system can support and can lead to surprising, counter-intuitive and fatal errors. In 1.10 we turned it from a warning to a strong error, with this PR it remains a strong error, but the precompilation system recognizes it and essentially sets `__precompile__(false)` for this module and all modules that depend on it. Before: ``` julia> using OverwriteMethodError [ Info: Precompiling OverwriteMethodError [top-level] WARNING: Method definition +(Bool, Bool) in module Base at bool.jl:166 overwritten in module OverwriteMethodError at /home/vchuravy/src/julia2/OverwriteMethodError.jl:2. ERROR: LoadError: Method overwriting is not permitted during Module precompile. Stacktrace: [1] top-level scope @ ~/src/julia2/OverwriteMethodError.jl:2 [2] include @ Base ./Base.jl:489 [inlined] [3] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing) @ Base ./loading.jl:2216 [4] top-level scope @ stdin:3 in expression starting at /home/vchuravy/src/julia2/OverwriteMethodError.jl:1 in expression starting at stdin:3 ERROR: Failed to precompile OverwriteMethodError [top-level] to "/home/vchuravy/.julia/compiled/v1.10/jl_guiuCQ". Stacktrace: [1] error(s::String) @ Base ./error.jl:35 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool) @ Base ./loading.jl:2462 [3] compilecache @ Base ./loading.jl:2334 [inlined] [4] (::Base.var"#968#969"{Base.PkgId})() @ Base ./loading.jl:1968 [5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@kwargs{stale_age::Int64, wait::Bool}) @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93 [6] #mkpidlock#6 @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined] [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@kwargs{stale_age::Int64}) @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111 [8] #invokelatest#2 @ Base ./essentials.jl:889 [inlined] [9] invokelatest @ Base ./essentials.jl:884 [inlined] [10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64) @ Base ./loading.jl:2977 [11] maybe_cachefile_lock @ Base ./loading.jl:2974 [inlined] [12] _require(pkg::Base.PkgId, env::String) @ Base ./loading.jl:1964 [13] __require_prelocked(uuidkey::Base.PkgId, env::String) @ Base ./loading.jl:1806 [14] #invoke_in_world#3 @ Base ./essentials.jl:921 [inlined] [15] invoke_in_world @ Base ./essentials.jl:918 [inlined] [16] _require_prelocked(uuidkey::Base.PkgId, env::String) @ Base ./loading.jl:1797 [17] macro expansion @ Base ./loading.jl:1784 [inlined] [18] macro expansion @ Base ./lock.jl:267 [inlined] [19] __require(into::Module, mod::Symbol) @ Base ./loading.jl:1747 [20] #invoke_in_world#3 @ Base ./essentials.jl:921 [inlined] [21] invoke_in_world @ Base ./essentials.jl:918 [inlined] [22] require(into::Module, mod::Symbol) @ Base ./loading.jl:1740 ``` After: ``` julia> using OverwriteMethodError ┌ Info: Precompiling OverwriteMethodError [top-level] └ @ Base loading.jl:2486 WARNING: Method definition +(Bool, Bool) in module Base at bool.jl:166 overwritten in module OverwriteMethodError at /home/vchuravy/src/julia2/OverwriteMethodError.jl:2. ERROR: Method overwriting is not permitted during Module precompile. ┌ Info: Skipping precompilation since __precompile__(false). Importing OverwriteMethodError [top-level]. └ @ Base loading.jl:2084 ``` --------- Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com> (cherry picked from commit 9e8fe68)
Co-authored-by: Prem Chintalapudi <prem.chintalapudi@gmail.com> (cherry picked from commit 341e9d0)
I think this was already done for rc1? Anyway, it would be better for the SparseArrays.jl maintainers to push updates to that package to this branch because it has gotten a bit confusing to me what should be included and not etc. |
dce3bce
to
d295d7c
Compare
(cherry picked from commit e5c6340)
Teach value_to_pointer to convert primitive types to their stored representation first, to avoid exposing undef bits later (via memcpy). Take this opportunity to also generalizes the support for zext Bool to anywhere inside any struct for changing any bitwidth to a multiple of 8 bytes. This would change a vector like <2 x i4> from occupying i8 to i16 (c.f. LLVM's LangRef), if such an operation were expressible in Julia today. And take this opportunity to do a bit of code cleanup, now that codegen is better and using helpers from LLVM. Fixes #52127 (cherry picked from commit 9aa7980)
So after struggling with this for a long while it seems there were two different issues. The first one we lacked coverage over, but the other was a very subtle issue when we sorted the fptrs. ~I still need to add test that does multiversioning where we call between multiversioned functions~ Fixes #52079 (cherry picked from commit a386cd1)
@dkarrasch Would it be possible for you to pull in SparseArrays? My understanding is that we should be pulling in whatever is the top of the 1.10 release branch on SparseArrays.jl. |
d295d7c
to
46617e5
Compare
Yes, that was done in 5ded9ab. I updated it now to include JuliaSparse/SparseArrays.jl#477 |
@nanosoldier |
The package evaluation job you requested has completed - possible new issues were detected. |
@nanosoldier |
) (cherry picked from commit eab8d6b)
The package evaluation job you requested has completed - possible new issues were detected. |
…gnment (#52182) The llvm optimizations may increase alignment beyond the initial MAX_ALIGN. This pool's alignment was previously only `sizeof(struct { atomic<int> RefCount; size_t Length; char Data[]; })` however, potentially resulting in segfaults at runtime. Fixes #52118. Should make CI much happier. (cherry picked from commit a65bc9a)
There are a few new ambiguities related to |
Backported PRs:
ensure_artifact_installed
dispatch #51995sort
docstring #52098abspath
consistent on Windows. Fix tracking path conversion. #52140cpu_target
inBase.julia_cmd
#52217cwstring
when used for env lookup / modification on Windows #51371Type
unwrapping ininstanceof_tfunc
#52228Need manual backport:
Contains multiple commits, manual intervention needed:
Non-merged PRs with backport label:
@create_log_macro
for making custom styled logging macros #52196ismutable
#52170