Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.7k
build: More msys2 fixes#59028
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
build: More msys2 fixes#59028
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
9578e4b intomaster 7 checks passed
Uh oh!
There was an error while loading.Please reload this page.
udesou added a commit to mmtk/julia that referenced this pull requestAug 7, 2025
* Increment state conditionally in `CartesianIndices` iteration (#58742)Fixes https://github.com/JuliaLang/julia/issues/53430```juliajulia> 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 variablesrepresent different quantities.* 🤖 [master] Bump the Distributed stdlib from 51e5297 to 3679026 (#58748)Stdlib: DistributedURL: https://github.com/JuliaLang/Distributed.jlStdlib branch: masterJulia branch: masterOld commit: 51e5297New commit: 3679026Julia version: 1.13.0-DEVDistributed version: 1.11.0(Does not match)Bump invoked by: @DilumAluthgePowered by:[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)Diff:https://github.com/JuliaLang/Distributed.jl/compare/51e52978481835413d15b589919aba80dd85f890...3679026d7b510befdedfa8c6497e3cb032f9cea1```$ git log --oneline 51e5297..36790263679026 Merge pull request #137 from JuliaLang/dpa/dont-use-link-local875cd5a Rewrite the code to be a bit more explicit2a6ee53 Non-link-local IP4 > non-link-local IP6 > link-local IP4 > link-local IP6c0e9eb4 Factor functionality out into separate `choose_bind_addr()` function86cbb8a Add explanation0b7288c Worker: Bind to the first non-link-local IPv4 addressff8689a Merge pull request #131 from JuliaLang/spawnat-docsba3c843 Document that `@spawnat :any` doesn't do load-balancing```Co-authored-by: DilumAluthge <5619885+DilumAluthge@users.noreply.github.com>* devdocs: contributing: fix headings (#58749)In particular, it seems like Documenter takes the level-one heading todefine the page title. So the page titles were missing in the TOC beforethis change.* Work around LLVM JITLink stack overflow issue. (#58579)The JITLinker recurses for every symbol in the list so limit the size ofthe listThis is kind of ugly. Also 1000 might be too large, we don't want to gotoo small because that wastes memory and 1000 was fine locally for thethings I tested.Fixes https://github.com/JuliaLang/julia/issues/58229* bump Compiler.jl version to 0.1.1 (#58744)As the latest version of BaseCompiler.jl will be bumped to v0.1.1 afterJuliaRegistries/General#132990.* REPL: fix typo and potential `UndefVarError` (#58761)Detected by the new LS diagnostics:)* fix fallback code path in `take!(::IOBuffer)` method (#58762)JET told me that the `data` local variable was inparticular is undefinedat this point.After reviewing this code, I think this code path is unreachableactually since `bytesavailable(io::IOBuffer)` returns `0` when `io` hasbeen closed. So it's probably better to make it clear.* Fix multi-threading docs typo (#58770)* help bounds checking to be eliminated for `getindex(::Memory, ::Int)` (#58754)Second try for PR #58741.This moves the `getindex(::Memory, ::Int)` bounds check to Julia, whichis how it's already done for `getindex(::Array, ::Int)`, so I guess it'scorrect.Also deduplicate the bounds checking code while at it.* Define textwidth for overlong chars (#58602)Previously, this would error. There is no guarantee of how terminalsrender overlong encodings. Some terminals does not print them at all,and some print "�". Here, we set a textwidth of 1, conservatively.Refs #58593* Add MethodError hints for functions in other modules (#58715)When a MethodError occurs, check if functions with the same name existin other modules (particularly those of the argument types). This helpsusers discover that they may need to import a function or ensuremultiplefunctions are the same generic function.- For Base functions: suggests importing (e.g., "You may have intendedto import Base.length")- For other modules: suggests they may be intended as the same genericfunction- Shows all matches from relevant modules in sorted order- Uses modulesof! to properly handle all type structures includingunionsFixes #58682* Fix markdown bullet list in variables-and-scoping.md (#58771)* CONTRIBUTING.md: Ask folks to disclose AI-written PRs (#58666)* Convert julia-repl blocks to jldoctest format (#58594)Convert appropriate julia-repl code blocks to jldoctest format to enableautomatic testing. In addition, this introduces a new `nodoctest ="reason"`pattern to annotate code blocks that are deliberate not doctested, sofuturereaders will know not to try.Many code blocks are converted, in particular:- Manual pages: arrays.md, asynchronous-programming.md, functions.md, integers-and-floating-point-numbers.md, metaprogramming.md, multi-threading.md, performance-tips.md, variables.md, variables-and-scoping.md- Base documentation: abstractarray.jl, bitarray.jl, expr.jl, file.jl, float.jl, iddict.jl, path.jl, scopedvalues.md, sort.md- Standard library: Dates/conversions.jl, Random/RNGs.jl, Sockets/addrinfo.jlKey changes:- Add filters for non-deterministic output (timing, paths, memoryaddresses)- Add setup/teardown for filesystem operations- Fix parentmodule(M) usage in expr.jl for doctest compatibility- Document double escaping requirement for regex filters in docstrings- Update AGENTS.md with test running instructionsNote: Some julia-repl blocks were intentionally left unchanged when theydemonstrate language internals subject to change or containnon-deterministic output that cannot be properly filtered.Refs #56921---------Co-authored-by: Keno Fischer <Keno@users.noreply.github.com>Co-authored-by: Claude <noreply@anthropic.com>* adds the `nth` function for iterables (#56580)Hi,I've turned the open ended issue #54454 into an actual PR.Tangentially related to #10092 ?This PR introduces the `nth(itr, n)` function to iterators to give a`getindex` type of behaviour.I've tried my best to optimize as much as possible by specializing ondifferent types of iterators.In the spirit of iterators any OOB access returns `nothing`. (edit:instead of throwing an error, i.e. `first(itr, n)` and `last(itr, n)`)here is the comparison of running the testsuite (~22 differentiterators) using generic `nth` and specialized `nth`:```julia@btime begin for (itr, n, _) in $testset _fallback_nth(itr, n) end end 117.750 μs (366 allocations: 17.88 KiB)@btime begin for (itr, n, _) in $testset nth(itr, n) end end 24.250 μs (341 allocations: 16.70 KiB)```---------Co-authored-by: adienes <51664769+adienes@users.noreply.github.com>Co-authored-by: Steven G. Johnson <stevenj@mit.edu>Co-authored-by: Dilum Aluthge <dilum@aluthge.com>* refine IR model queries (#58661)- `jl_isa_ast_node` was missing `enter`/`leave` nodes. - `Core.IR` exports mistakenly included a function `memoryref`. - `Base.IR`, and `quoted` were not public or documented. - Add julia function `isa_ast_node` to improve accuracy of `quoted`.- Change `==` on AST nodes to check egal equality of any constants inthe IR / AST, and make hashing consistent with that change. Thishelpfully allows determining that `x + 1` and `x + 1.0` are notequivalent, exchangeable operations. If you need to compare any twoobjects for semantic equality, you may need to first wrap them with `x =Base.isa_ast_node(x) ? x : QuoteNode(x)` to resolve the ambiguity ofwhether the comparison is of the semantics or value. - Handle `undef` fields in Phi/PhiC node equality and hashing* fix showing types after removing using Core (#58773)PR #57357 changed the default using list, but only changed some of theplaces where the `show` code handled that. This led to duplicate(confusing) printing, since both Core. and Base. prefixes are dropped.Fix #58772* inform compiler about local variable definedness (#58778)JET's new analysis pass now detects local variables that may beundefined, which has revealed such issues in several functions withinBase (JuliaLang/julia#58762).This commit addresses local variables whose definedness the compilercannot properly determine, primarily in functions reachable from JET'stest suite. No functional changes are made.* better effects for `iterate` for `Memory` and `Array` (#58755)* Test: Hide REPL internals in backtraces (#58732)* Update docs for various type predicates (#58774)Makes the description for `isdispatchtuple` accurate, adds a docstringfor `iskindtype` and `isconcretedispatch`, and adds notes to the docsfor `isconcretetype` and `isabstracttype` explaining why they aren'tantonyms.* Test: show context when a let testset errors (#58727)* [libblastrampoline_jll] Upgrade to v5.13.1 (#58775)### Check listVersion numbers:- [x] `deps/libblastrampoline.version`: `LIBNAME_VER`, `LIBNAME_BRANCH`,`LIBNAME_SHA1` and `LIBNAME_JLL_VER`- [x] `stdlib/libblastrampoline_jll/Project.toml`: `version`Checksum:- [x] `deps/checksums/libblastrampoline`* 🤖 [master] Bump the Pkg stdlib from 5577f68d6 to e3d456127 (#58781)Stdlib: PkgURL: https://github.com/JuliaLang/Pkg.jl.gitStdlib branch: masterJulia branch: masterOld commit: 5577f68d6New commit: e3d456127Julia version: 1.13.0-DEVPkg version: 1.13.0Bump invoked by: @KristofferCPowered by:[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)Diff:https://github.com/JuliaLang/Pkg.jl/compare/5577f68d612139693282c037d070f515bf160d1b...e3d4561272fc029e9a5f940fe101ba4570fa875d```$ git log --oneline 5577f68d6..e3d456127e3d456127 add update function to apps and fix a bug when adding an already installed app (#4263)cae9ce02a Fix historical stdlib fixup if `Pkg` is in the Manifest (#4264)a42046240 don't use tree hash from manifest if the path is set from sources (#4260)a94a6bcae fix dev taking when the app is already installed (#4259)313fddccb Internals: Add fallback `Base.show(::IO, ::RegistryInstance)` method (#4251)```Co-authored-by: KristofferC <1282691+KristofferC@users.noreply.github.com>* prevent unnecessary repeated squaring calculation (#58720)* LibGit2: Update to 1.9.1 (#58731)* Unify `_checkbounds_array` into `checkbounds` and use it in more places (#58785)Ref:https://github.com/JuliaLang/julia/pull/58755#discussion_r2158944282.---------Co-authored-by: Matt Bauman <mbauman@juliahub.com>Co-authored-by: Matt Bauman <mbauman@juliacomputing.com>* Chained hash pipelining in array hashing (#58252)the proposed switch in https://github.com/JuliaLang/julia/pull/57509from `3h - hash_finalizer(x)` to `hash_finalizer(3h -x)` should increasethe hash quality of chained hashes, as the expanded expression goes fromsomething like `sum((-3)^k * hash(x) for k in ...)` to anon-simplifiable compositionthis does have the unfortunate impact of long chains of hashes getting abit slower as there is more data dependency and the CPU cannot work onthe next element's hash before combining the previous one (I think ---I'm not particularly an expert on this low level stuff). As far as Iknow this only really impacts `AbstractArray`so, I've implemented a proposal that does some unrolling / pipeliningmanually to recover `AbstractArray` hashing performance. in fact, it'squite a lot faster now for most lengths. I tuned the thresholds (8accumulators, certain length breakpoints) by hand on my own machine.* Require all tuples in eachindex to have the same length. (#48125)Potential fix for #47898---------Co-authored-by: navdeep rana <navdeepr@tifrh.res.in>Co-authored-by: Oscar Smith <oscardssmith@gmail.com>Co-authored-by: Jerry Ling <proton@jling.dev>Co-authored-by: Andy Dienes <51664769+adienes@users.noreply.github.com>* trailing dimensions in eachslice (#58791)fixes https://github.com/JuliaLang/julia/issues/51692* Allow underscore (unused) args in presence of kwargs (#58803)Admittedly fixed because I thought I introduced this bug recently, butactually, fix #32727. `f(_; kw) = 1` should now lower in a similar wayto `f(::Any; kw) = 1`, where we use a gensym for the first argument.Not in this PR, but TODO: `nospecialize` underscore-only names* codegen: slightly optimize gc-frame allocation (#58794)Try to avoid allocating frames for some very simple function that onlyhave the safepoint on entry and don't define any values themselves.* codegen: ensure safepoint functions can read the pgcstack (#58804)This needs to be readOnly over all memory, since GC could read anything(especially pgcstack), and which is not just argmem:read, but also thepointer accessed from argmem that is read from.Fix #58801Note that this is thought not to be a problem for CleanupWriteBarriers,since while that does read the previously-inaccessibleMemOnly state,these functions are not marked nosync, so as long as the global statecan be read, it also must be assumed that it might observe anotherthread has written to any global state.* Revert code changes from "strengthen assume_effects doc" PR (#58289)Reverts only the functional changes from JuliaLang/julia#58254, not thedocs. Accessing this field here assumes that the counter valid isnumeric and relevant to the current inference frame, neither of whichis intended to be true, as we continue to add interfaces to executemethods outside of their current specific implementation with amonotonic world counter (e.g. with invoke on a Method, with precompilefiles, with external MethodTables, or with static compilation).* build: Error when attempting to set USECLANG/USEGCC (#58795)Way back in the good old days, these used to switch between GCC andClang. I guess these days we always auto-switch based on the CC value.If you try to directly set USECLANG, things get into a bad state. Give abetter error message for that case.* build: Add --no-same-owner to TAR (#58796)tar changes behavior when the current uid is 0 to try to also restoreowner uids/gids (if recorded). It is possible for the uid to be 0 insingle-uid environments like user namespace sandboxes, in which case theattempt to change the uid/gid fails. Of course ideally, the tars wouldhave been created non-archival (so that the uid/gid wasn't recorded inthe first place), but we get source tars from various places, so wecan't guarantee this. To make sure we don't run into trouble, manuallyadd the --no-same-owner flag to disable this behavior.* Add `cfunction` support for `--trim` (#58812)* fix error message for `eachindex(::Vararg{Tuple})` (#58811)Make the error message in case of mismatch less confusing and consistentwith the error message for arrays.While at it, also made other changes of the same line of source code:* use function composition instead of an anonymous closure* expand the one-liner into a multiline `if`---------Co-authored-by: Andy Dienes <51664769+adienes@users.noreply.github.com>* use more canonical way to check binding existence (#58809)* Add `trim_mode` parameter to JIT type-inference entrypoint (#58817)Resolves https://github.com/JuliaLang/julia/issues/58786.I think this is only a partial fix, since we can still end up loadingcode from pkgimages that has been poorly inferred due to running withoutthese `InferenceParams`. However, many of the common scenarios (such asJLL's depending on each other) seem to be OK since we have a targetedheuristic that adds `__init__()` to a pkgimage only if the module hasinference enabled.* codegen: gc wb for atomic FCA stores (#58792)Need to re-load the correct `r` since issetfield skips the intcast,resulting in no gc wb for the FCA.Fix #58760* codegen: relaxed jl_tls_states_t.safepoint load (#58828)Every function with a safepoint causes spurious thread sanitizerwarnings without this change. Codegen is unaffected, except when webuild with `ThreadSanitizerPass`.* bpart: Properly track methods with invalidated source after require_world (#58830)There are three categories of methods we need to worry about duringstaticdata validation:1. New methods added to existing generic functions2. New methods added to new generic functions3. Existing methods that now have new CodeInstancesIn each of these cases, we need to check whether any of the implicitbinding edges from the method's source was invalidated. Currently, wehandle this for 1 and 2 by explicitly scanning the method on load.However, we were not tracking it for case 3. Fix that by using an extrabit in did_scan_method that gets set when we see an existing methodgetting invalidated, so we know that we need to drop the correspondingCodeInstances during load.Fixes #58346* Limit --help and --help-hidden to 100 character line length (#58835)Just fixing the command line description to make sure it is not morethan 100 characters wide as discussed with @oscardssmith in PR #54066and PR #53759.I also added a test to make sure that nothing more than 100 charactersis inserted.Thank you.* libuv: Mark `(un)preserve_handle` as `@nospecialize` (#58844)These functions only worry about object identity, so there's no need forthem to specialize them on their type.* add METHOD_SIG_LATEST_ONLY optimization to MethodInstance too (#58825)Add the same optimization from Method to MethodInstance, although theperformance gain seems to be negligible in my specific testing, theredoesn't seem any likely downside to adding one caching bit to avoid somerecomputations.* Encode fully_covers=false edges using negative of method countThis change allows edges that don't fully cover their method matches tobe properly tracked through serialization. When fully_covers is false(indicating incomplete method coverage), we encode the method count asnegative in the edges array to signal that compactly.* move trim patches to separate files, only load if trimming (#58826)fixes part of #58458* gf: Add METHOD_SIG_LATEST_HAS_NOTMORESPECIFIC dispatch status bitThis commit introduces a new dispatch status bit to track when a methodhas other methods that are not more specific than it, enabling betteroptimization decisions during method dispatch.Key changes: 1. Add METHOD_SIG_LATEST_HAS_NOTMORESPECIFIC bit to track methods with non-morespecific intersections 2. Add corresponding METHOD_SIG_PRECOMPILE_HAS_NOTMORESPECIFIC bit for precompiled methods 3. Refactor method insertion logic: - Remove morespec_unknown enum state, compute all morespec values upfront - Convert enum morespec_options to simple boolean logic (1/0) - Change 'only' from boolean to 'dispatch_bits' bitmask - Move dispatch status updates before early continues in the loop* optimize verify_call again* juliac: Add rudimentary Windows support (#57481)This was essentially working as-is, except for our reliance on a Ccompiler.Not sure how we feel about having an `Artifacts.toml` floating aroundour `contrib` folder, but I'm not aware of an alternative other thanmoving `juliac.jl` to a subdirectory.* fix null comparisons for non-standard address spaces (#58837)Co-authored-by: Jameson Nash <vtjnash@gmail.com>* debuginfo: Memoize object symbol lookup (#58851)Supersedes https://github.com/JuliaLang/julia/pull/58355. Resolveshttps://github.com/JuliaLang/julia/issues/58326.On this PR:```juliajulia> @btime lgamma(2.0)┌ Warning: `lgamma(x::Real)` is deprecated, use `(logabsgamma(x))[1]` instead.│ caller = var"##core#283"() at execution.jl:598└ @ Core ~/.julia/packages/BenchmarkTools/1i1mY/src/execution.jl:598 47.730 μs (105 allocations: 13.24 KiB)```On `nightly`:```juliajulia> @btime lgamma(2.0)┌ Warning: `lgamma(x::Real)` is deprecated, use `(logabsgamma(x))[1]` instead.│ caller = var"##core#283"() at execution.jl:598└ @ Core ~/.julia/packages/BenchmarkTools/1i1mY/src/execution.jl:598 26.856 ms (89 allocations: 11.32 KiB)```* bpart: Skip inserting image backedges while we're generating a pkgimage (#58843)Should speed up deeply nested precompiles by skipping unnecessary workhere.PR is against #58830 to avoid conflicts, but semantically independent.* Re-add old function name for backward compatibility in init (#58860)While julia has no C-API backwards compatibility guarantees this issimple enough to add.Fixes #58859* trimming: Add `_uv_hook_close` support (#58871)Resolves https://github.com/JuliaLang/julia/issues/58862.Since this hook is called internally by the runtime, `--trim` was notaware of the callee edge required here.* Don't `@inbounds` AbstractArray's iterate method; optimize `checkbounds` instead (#58793)Split off from #58785, this simplifies `iterate` and removes the`@inbounds` call that was added inhttps://github.com/JuliaLang/julia/pull/58635. It achieves the same (orbetter!) performance, however, by targeting optimizations in`checkbounds` and — in particular — the construction of a linear`eachindex` (against which the bounds are checked).---------Co-authored-by: Mosè Giordano <mose@gnu.org>* aotcompile: Fix early-exit if CI not found for `cfunction` (#58722)As written, this was accidentally skipping all the subsequent `cfuncs`that need adapters.* zero-index get/setindex(::ReinterpretArray) require a length of 1 (#58814)fix https://github.com/JuliaLang/julia/issues/58232o3 helped me understand the existing implementations but code is mine---------Co-authored-by: Matt Bauman <mbauman@gmail.com>* Add `Base.isprecompilable` (#58805)Alternative to https://github.com/JuliaLang/julia/pull/58146.We want to compile a subset of the possible specializations of afunction. To this end, we have a number of manually written `precompile`statements. Creating this list is, unfortunately, error-prone, and thelist is also liable to going stale. Thus we'd like to validate each`precompile` statement in the list.The simple answer is, of course, to actually run the `precompile`s, andwe naturally do so, but this takes time.We would like a relatively quick way to check the validity of a`precompile` statement.This is a dev-loop optimization, to allow us to check "is-precompilable"in unit tests.We can't use `hasmethod` as it has both false positives (too loose):```juliajulia> hasmethod(sum, (AbstractVector,))truejulia> precompile(sum, (AbstractVector,))falsejulia> Base.isprecompilable(sum, (AbstractVector,)) # <- this PRfalse```and also false negatives (too strict):```juliajulia> bar(@nospecialize(x::AbstractVector{Int})) = 42bar (generic function with 1 method)julia> hasmethod(bar, (AbstractVector,))falsejulia> precompile(bar, (AbstractVector,))truejulia> Base.isprecompilable(bar, (AbstractVector,)) # <- this PRtrue```We can't use `hasmethod && isconcretetype` as it has false negatives(too strict):```juliajulia> has_concrete_method(f, argtypes) = all(isconcretetype, argtypes) && hasmethod(f, argtypes)has_concrete_method (generic function with 1 method)julia> has_concrete_method(bar, (AbstractVector,))falsejulia> has_concrete_method(convert, (Type{Int}, Int32))falsejulia> precompile(convert, (Type{Int}, Int32))truejulia> Base.isprecompilable(convert, (Type{Int}, Int32)) # <- this PRtrue````Base.isprecompilable` is essentially `precompile` without the actualcompilation.* Add a `similar` method for `Type{<:CodeUnits}` (#57826)Currently, `similar(::CodeUnits)` works as expected by going through thegeneric `AbstractArray` method. However, the fallback method hit by`similar(::Type{<:CodeUnits}, dims)` does not work, as it assumes theexistence of a constructor that accepts an `UndefInitializer`. This canbe made to work by defining a corresponding `similar` method thatreturns an `Array`.One could make a case that this is a bugfix since it was arguably a bugthat this method didn't work given that `CodeUnits` is an`AbstractArray` subtype and the other `similar` methods work. If anybodybuys that argument, it could be nice to backport this; it came up insome internal code that uses Arrow.jl and JSON3.jl together.* 🤖 [master] Bump the Pkg stdlib from e3d456127 to 109eaea66 (#58858)Stdlib: PkgURL: https://github.com/JuliaLang/Pkg.jl.gitStdlib branch: masterJulia branch: masterOld commit: e3d456127New commit: 109eaea66Julia version: 1.13.0-DEVPkg version: 1.13.0Bump invoked by: @KristofferCPowered by:[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)Diff:https://github.com/JuliaLang/Pkg.jl/compare/e3d4561272fc029e9a5f940fe101ba4570fa875d...109eaea66a0adb0ad8fa497e64913eadc2248ad1```$ git log --oneline e3d456127..109eaea66109eaea66 Various app improvements (#4278)25c2390ed feat(apps): Add support for multiple apps per package via submodules (#4277)c78b40b35 copy the app project instead of wrapping it (#4276)d2e61025b Fix leading whitespace in REPL commands with comma-separated packages (#4274)e02bcabd7 Registry: Properly pass down `depot` (#4268)e9a055240 fix what project file to look at when package without path but with a subdir is devved by name (#4271)8b1f0b9ff prompt for confirmation before removing compat entry (#4254)eefbef649 feat(errors): Improve error message for incorrect package UUID (#4270)4d1c6b0a3 explain no reg installed when no reg installed (#4261)```Co-authored-by: KristofferC <1282691+KristofferC@users.noreply.github.com>* fix a few tiny JET linter issues (#58869)* Fix data race in jl_new_module__ (#58880)Use an atomic fetch and add to fix a data race in `Module()` identifiedby tsan:```./usr/bin/julia -t4,0 --gcthreads=1 -e 'Threads.@threads for i=1:100 Module() end'==================WARNING: ThreadSanitizer: data race (pid=5575) Write of size 4 at 0xffff9bf9bd28 by thread T9: #0 jl_new_module__ /home/user/c/julia/src/module.c:487:22 (libjulia-internal.so.1.13+0x897d4) #1 jl_new_module_ /home/user/c/julia/src/module.c:527:22 (libjulia-internal.so.1.13+0x897d4) #2 jl_f_new_module /home/user/c/julia/src/module.c:649:22 (libjulia-internal.so.1.13+0x8a968) #3 <null> <null> (0xffff76a21164) #4 <null> <null> (0xffff76a1f074) #5 <null> <null> (0xffff76a1f0c4) #6 _jl_invoke /home/user/c/julia/src/gf.c (libjulia-internal.so.1.13+0x5ea04) #7 ijl_apply_generic /home/user/c/julia/src/gf.c:3892:12 (libjulia-internal.so.1.13+0x5ea04) #8 jl_apply /home/user/c/julia/src/julia.h:2343:12 (libjulia-internal.so.1.13+0x9e4c4) #9 start_task /home/user/c/julia/src/task.c:1249:19 (libjulia-internal.so.1.13+0x9e4c4) Previous write of size 4 at 0xffff9bf9bd28 by thread T10: #0 jl_new_module__ /home/user/c/julia/src/module.c:487:22 (libjulia-internal.so.1.13+0x897d4) #1 jl_new_module_ /home/user/c/julia/src/module.c:527:22 (libjulia-internal.so.1.13+0x897d4) #2 jl_f_new_module /home/user/c/julia/src/module.c:649:22 (libjulia-internal.so.1.13+0x8a968) #3 <null> <null> (0xffff76a21164) #4 <null> <null> (0xffff76a1f074) #5 <null> <null> (0xffff76a1f0c4) #6 _jl_invoke /home/user/c/julia/src/gf.c (libjulia-internal.so.1.13+0x5ea04) #7 ijl_apply_generic /home/user/c/julia/src/gf.c:3892:12 (libjulia-internal.so.1.13+0x5ea04) #8 jl_apply /home/user/c/julia/src/julia.h:2343:12 (libjulia-internal.so.1.13+0x9e4c4) #9 start_task /home/user/c/julia/src/task.c:1249:19 (libjulia-internal.so.1.13+0x9e4c4) Location is global 'jl_new_module__.mcounter' of size 4 at 0xffff9bf9bd28 (libjulia-internal.so.1.13+0x3dbd28)```* fix trailing indices stackoverflow in reinterpreted array (#58293)would fix https://github.com/JuliaLang/julia/issues/57170, fixhttps://github.com/JuliaLang/julia/issues/54623@nanosoldier `runbenchmarks("array", vs=":master")`* Add missing module qualifier (#58877)A very simple fix addressing the following bug:```juliaValidation: Error During Test at REPL[61]:1 Got exception outside of a @test #=ERROR showing exception stack=# UndefVarError: `get_ci_mi` not defined in `Base.StackTraces` Suggestion: check for spelling errors or missing imports. Hint: a global variable of this name also exists in Base. - Also declared public in Compiler (loaded but not imported in Main). Stacktrace: [1] show_custom_spec_sig(io::IOContext{IOBuffer}, owner::Any, linfo::Core.CodeInstance, frame::Base.StackTraces.StackFrame) @ Base.StackTraces ./stacktraces.jl:293 [2] show_spec_linfo(io::IOContext{IOBuffer}, frame::Base.StackTraces.StackFrame) @ Base.StackTraces ./stacktraces.jl:278 [3] print_stackframe(io::IOContext{IOBuffer}, i::Int64, frame::Base.StackTraces.StackFrame, n::Int64, ndigits_max::Int64, modulecolor::Symbol; prefix::Nothing) @ Base ./errorshow.jl:786```AFAIK this occurs when printing a stacktrace from a `CodeInstance` thathas a non-default owner.* OpenSSL: Update to 3.5.1 (#58876)Update the stdlib OpenSSL to 3.5.1.This is a candidate for backporting to Julia 1.12 if there is anotherbeta release.* `setindex!(::ReinterpretArray, v)` needs to convert before reinterpreting (#58867)Found inhttps://github.com/JuliaLang/julia/pull/58814#discussion_r2169155093.Previously, in a very limited situation (a zero-dimensional reinterpretthat reinterprets between primitive types that was setindex!'ed withzero indices), we omitted the `convert`. I believe this was anunintentional oversight, and hopefully nobody is depending on thisbehavior.* Support `debuginfo` context option in IRShow for `IRCode`/`IncrementalCompact` (#58642)This allows us to get complete source information during printing for`IRCode` and `IncrementalCompact`, same as we do by default with`CodeInfo`.The user previously had to do:```juliaCompiler.IRShow.show_ir(stdout, ir, Compiler.IRShow.default_config(ir; verbose_linetable=true))```and now, they only need to do:```juliashow(IOContext(stdout, :debuginfo => :source), ir)```* Add offset in `hvncat` dimension calculation to fix issue with 0-length elements in first dimension (#58881)* fix `setindex(::ReinterpretArray,...)` for zero-d arrays (#58868)by copying the way getindex works.Found inhttps://github.com/JuliaLang/julia/pull/58814#discussion_r2178243259---------Co-authored-by: Andy Dienes <51664769+adienes@users.noreply.github.com>* add back `to_power_type` to `deprecated.jl` since some packages call it (#58886)Co-authored-by: KristofferC <kristoffer.carlsson@juliacomputing.com>* Pkg: Allow configuring can_fancyprint(io::IO) using IOContext (#58887)* Make `Base.donotdelete` public (#55774)I rely on `Base.donotdelete` in[Chairmarks.jl](https://chairmarks.lilithhafner.com) and I'd like it tobe public. I imagine that other benchmarking tools also rely on it. It'sbeen around since 1.8 (see also: #55773) and I think we should commit tokeeping it functional for the rest of 1.x.* Add link to video in profiling manual (#58896)* Stop documenting that `permute!` is "in-place"; it isn't and never has been non-allocating (#58902)* faster iteration over a `Flatten` of heterogenous iterators (#58522)seems to help in many cases. would fix the precise MWE given inhttps://github.com/JuliaLang/julia/issues/52552, but does notnecessarily fix comprehensively all perf issues of all heterogenousflattens. but, may as well be better when it's possiblesetup:```julia> using BenchmarkToolsjulia> A = rand(Int, 100000); B = 1:100000;julia> function g(it) s = 0 for i in it s += i end s end```before:```julia> @btime g($(Iterators.flatten((A, B)))) 12.461 ms (698979 allocations: 18.29 MiB)julia> @btime g($(Iterators.flatten(i for i in (A, B)))) 12.393 ms (698979 allocations: 18.29 MiB)julia> @btime g($(Iterators.flatten([A, B]))) 15.115 ms (999494 allocations: 25.93 MiB)julia> @btime g($(Iterators.flatten((A, Iterators.flatten((A, B)))))) 82.585 ms (2997964 allocations: 106.78 MiB)```after:```julia> @btime g($(Iterators.flatten((A, B)))) 135.958 μs (2 allocations: 64 bytes)julia> @btime g($(Iterators.flatten(i for i in (A, B)))) 149.500 μs (2 allocations: 64 bytes)julia> @btime g($(Iterators.flatten([A, B]))) 17.130 ms (999498 allocations: 25.93 MiB)julia> @btime g($(Iterators.flatten((A, Iterators.flatten((A, B)))))) 13.716 ms (398983 allocations: 10.67 MiB)```* Make `hypot` docs example more type stable (#58918)* Markdown: Make `Table`/`LaTeX` objects subtypes of `MarkdownElement` (#58916)These objects satisfy the requirements of the `MarkdownElement`interface (such as implementing `Markdown.plain`), so they should besubtypes of `MarkdownElement`. This is convenient when definingfunctions for `MarkdownElement` in other packages.* Support "Functor-like" `code_typed` invocation (#57911)This lets you easily inspect IR associated with "Functor-like" methods:```juliajulia> (f::Foo)(offset::Float64) = f.x + f.y + offsetjulia> code_typed((Foo, Float64))1-element Vector{Any}: CodeInfo(1 ─ %1 = Base.getfield(f, :x)::Int64│ %2 = Base.getfield(f, :y)::Int64│ %3 = Base.add_int(%1, %2)::Int64│ %4 = Base.sitofp(Float64, %3)::Float64│ %5 = Base.add_float(%4, offset)::Float64└── return %5) => Float64```This is just a small convenience over `code_typed_by_type`, but I'm insupport of it (even though it technically changes the meaning of, e.g.,`code_typed((1, 2))` which without this PR inspects`(::Tuple{Int,Int})(::Vararg{Any})`We should probably update all of our reflection machinery (`code_llvm`,`code_lowered`, `methodinstance`, etc.) to support this "non-arg0" styleas well, but I wanted to open this first to make sure folks like it.* IRShow: Print arg0 type when necessary to disambiguate `invoke` (#58893)When invoking any "functor-like", such as a closure:```juliabar(x) = @noinline ((y)->x+y)(x)```our IR printing was not showing the arg0 invoked, even when it isrequired to determine which MethodInstance this is invoking.Before:```juliajulia> @code_typed optimize=true bar(1)CodeInfo(1 ─ %1 = %new(var"#bar##2#bar##3"{Int64}, x)::var"#bar##2#bar##3"{Int64}│ %2 = invoke %1(x::Int64)::Int64└── return %2) => Int64```After:```juliajulia> @code_typed optimize=true bar(1)CodeInfo(1 ─ %1 = %new(var"#bar##2#bar##3"{Int64}, x)::var"#bar##2#bar##3"{Int64}│ %2 = invoke (%1::var"#bar##2#bar##3"{Int64})(x::Int64)::Int64└── return %2) => Int64```* Support "functors" for code reflection utilities (#58891)As a follow-up to https://github.com/JuliaLang/julia/pull/57911, thisupdates: - `Base.method_instance` - `Base.method_instances` - `Base.code_ircode` - `Base.code_lowered` - `InteractiveUtils.code_llvm` - `InteractiveUtils.code_native` - `InteractiveUtils.code_warntype` to support "functor" invocations. e.g. `code_llvm((Foo, Int, Int))` which corresponds to `(::Foo)(::Int,::Int)`* Prevent data races in invalidate_code_for_globalref!* Fix type instability in invalidate_code_for_globalref!* Add the fact that functions ending with `!` may allocate to the FAQ (#58904)I've run into this question several times, that might count as"frequently asked".* Economy mode REPL: run the event loop with jl_uv_flush (#58926)`ios_flush` won't wait for the `jl_static_show` from the previousevaluation to complete, resulting in the output being interleaved withsubsequent REPL outputs. Anything that produces a lot of output willtrigger it, like `Core.GlobalMethods.defs`.* Fix grammar, typos, and formatting issues in docstrings (#58944)Co-authored-by: Claude <noreply@anthropic.com>* Fix nthreadpools size in JLOptions (#58937)* NFC: Remove duplicate `julia-src-%` dependency in makefile (#58947)* Improve error message for missing dependencies in packages (#58878)* Make current_terminfo a OncePerProcess (#58854)There seems to be no reason to always load this unconditionally -especially since it's in the critical startup path. If we never printcolored output or our IO is not a TTY, we don't need to load this atall. While we're at it, remove the `term_type` argument to`ttyhascolor`, which didn't work as advertised anyway, since it stilllooked at the current_terminfo. If clients want to do a full TermInfocheck, they can do that explicitly.(Written by Claude Code)* chore: remove redundant words in comment (#58955)* add a precompile workload to TOML (#58949)* 🤖 [master] Bump the NetworkOptions stdlib from c090626 to 532992f (#58882)Co-authored-by: DilumAluthge <5619885+DilumAluthge@users.noreply.github.com>* remove excessive code from trim script (#58853)Co-authored-by: gbaraldi <baraldigabriel@gmail.com>* Add juliac Artifacts.toml in Makefile (#58936)* staticdata: Don't discard inlineable code that inference may need (#58842)Seehttps://github.com/JuliaLang/julia/issues/58841#issuecomment-3014833096.We were accidentally discarding inferred code during staticdatapreparation that we would need immediately afterwards to satisfyinlining requests during code generation for the system image. This wasresulting in spurious extra compilation at the first inference aftersysimage reload. Additionally it was likely causing various unnecessarydispatch slow paths in the generated inference code. Fixes #58841.* clear up `isdone` docstring (#58958)I got pretty confused on my first reading of this docstring because forsome reason I thought it was saying that `isdone(itr, state) == missing`implied that it was true that `iterate(itr, state) === nothing` (akathat `state` is indeed final). which of course is wrong and doesn't makesense, but it's still how I read it. I think the new docstring is a bitmore explicit.* shield `_artifact_str` function behind a world age barrier (#58957)We already do this for `require` in Base loading, it probably makessense to do this here as well, as invalidating this function easily adds+1s in load time for a jll. Avoids the big load time penalty fromloading IntelOpenMP_jll inhttps://github.com/JuliaLang/julia/issues/57436#issuecomment-3052258775.Before:```julia> @time using ModelingToolkit 6.546844 seconds (16.09 M allocations: 938.530 MiB, 11.13% gc time, 16.35% compilation time: 12% of which was recompilation)```After:```julia> @time using ModelingToolkit 5.637914 seconds (8.26 M allocations: 533.694 MiB, 11.47% gc time, 3.11% compilation time: 17% of which was recompilation)```---------Co-authored-by: KristofferC <kristoffer.carlsson@juliacomputing.com>Co-authored-by: Cody Tapscott <84105208+topolarity@users.noreply.github.com>* doc: Fix grammar, typos, and formatting issues across documentation (#58932)Co-authored-by: Claude <noreply@anthropic.com>* Replace Base.Workqueues with a OncePerThread (#58941)Simplify `workqueue_for`. While not strictly necessary, the acquire loadin `getindex(once::OncePerThread{T,F}, tid::Integer)` makesThreadSanitizer happy. With the existing implementation, we get falsepositives whenever a thread other than the one that originally allocatedthe array reads it:```==================WARNING: ThreadSanitizer: data race (pid=6819) Atomic read of size 8 at 0xffff86bec058 by main thread: #0 getproperty Base_compiler.jl:57 (sys.so+0x113b478) #1 julia_pushNOT._1925 task.jl:868 (sys.so+0x113b478) #2 julia_enq_work_1896 task.jl:969 (sys.so+0x5cd218) #3 schedule task.jl:983 (sys.so+0x892294) #4 macro expansion threadingconstructs.jl:522 (sys.so+0x892294) #5 julia_start_profile_listener_60681 Base.jl:355 (sys.so+0x892294) #6 julia___init___60641 Base.jl:392 (sys.so+0x1178dc) #7 jfptr___init___60642 <null> (sys.so+0x118134) #8 _jl_invoke /home/user/c/julia/src/gf.c (libjulia-internal.so.1.13+0x5e9a4) #9 ijl_apply_generic /home/user/c/julia/src/gf.c:3892:12 (libjulia-internal.so.1.13+0x5e9a4) #10 jl_apply /home/user/c/julia/src/julia.h:2343:12 (libjulia-internal.so.1.13+0xbba74) #11 jl_module_run_initializer /home/user/c/julia/src/toplevel.c:68:13 (libjulia-internal.so.1.13+0xbba74) #12 _finish_jl_init_ /home/user/c/julia/src/init.c:632:13 (libjulia-internal.so.1.13+0x9c0fc) #13 ijl_init_ /home/user/c/julia/src/init.c:783:5 (libjulia-internal.so.1.13+0x9bcf4) #14 jl_repl_entrypoint /home/user/c/julia/src/jlapi.c:1125:5 (libjulia-internal.so.1.13+0xf7ec8) #15 jl_load_repl /home/user/c/julia/cli/loader_lib.c:601:12 (libjulia.so.1.13+0x11934) #16 main /home/user/c/julia/cli/loader_exe.c:58:15 (julia+0x10dc20) Previous write of size 8 at 0xffff86bec058 by thread T2: #0 IntrusiveLinkedListSynchronized task.jl:863 (sys.so+0x78d220) #1 macro expansion task.jl:932 (sys.so+0x78d220) #2 macro expansion lock.jl:376 (sys.so+0x78d220) #3 julia_workqueue_for_1933 task.jl:924 (sys.so+0x78d220) #4 julia_wait_2048 task.jl:1204 (sys.so+0x6255ac) #5 julia_task_done_hook_49205 task.jl:839 (sys.so+0x128fdc0) #6 jfptr_task_done_hook_49206 <null> (sys.so+0x902218) #7 _jl_invoke /home/user/c/julia/src/gf.c (libjulia-internal.so.1.13+0x5e9a4) #8 ijl_apply_generic /home/user/c/julia/src/gf.c:3892:12 (libjulia-internal.so.1.13+0x5e9a4) #9 jl_apply /home/user/c/julia/src/julia.h:2343:12 (libjulia-internal.so.1.13+0x9c79c) #10 jl_finish_task /home/user/c/julia/src/task.c:345:13 (libjulia-internal.so.1.13+0x9c79c) #11 jl_threadfun /home/user/c/julia/src/scheduler.c:122:5 (libjulia-internal.so.1.13+0xe7db8) Thread T2 (tid=6824, running) created by main thread at: #0 pthread_create <null> (julia+0x85f88) #1 uv_thread_create_ex /workspace/srcdir/libuv/src/unix/thread.c:172 (libjulia-internal.so.1.13+0x1a8d70) #2 _finish_jl_init_ /home/user/c/julia/src/init.c:618:5 (libjulia-internal.so.1.13+0x9c010) #3 ijl_init_ /home/user/c/julia/src/init.c:783:5 (libjulia-internal.so.1.13+0x9bcf4) #4 jl_repl_entrypoint /home/user/c/julia/src/jlapi.c:1125:5 (libjulia-internal.so.1.13+0xf7ec8) #5 jl_load_repl /home/user/c/julia/cli/loader_lib.c:601:12 (libjulia.so.1.13+0x11934) #6 main /home/user/c/julia/cli/loader_exe.c:58:15 (julia+0x10dc20)SUMMARY: ThreadSanitizer: data race Base_compiler.jl:57 in getproperty==================```* Fix `hygienic-scope`s in inner macro expansions (#58965)Changes from https://github.com/JuliaLang/julia/pull/43151, github justdidn't want me to re-open it.As discussed on slack, any `hygienic-scope` within an outer`hygienic-scope` can read and write variables in the outer one, so it'snot particularly hygienic. The result is that we can't safely nest macrocalls unless they know the contents of all inner macro calls.Should fix #48910.Co-authored-by: Michiel Dral <m.c.dral@gmail.com>* remove comment from julia-syntax that is no longer true (#58964)The code this referred to was removed byc6c3d72d1cbddb3d27e0df0e739bb27dd709a413* expand memoryrefnew capabilities (#58768)The goal here is 2-fold. Firstly, this should let us simplify theboundscheck (not yet implimented), but this also should reduce Julia IRside a bit.* Add news entry and update docstring for #58727 (#58973)* Fix alignment of failed precompile jobs on CI (#58971)* bpart: Tweak `isdefinedglobal` on backdated constant (#58976)In d2cc06193ef4161e4ac161bd4b5b57a51686a89a and prior commits, we madebackdated access a conditional error (if depwarns are enabled or ingenerators). However, we did not touch `isdefinedglobal`. This resultedin the common pattern `isdefinedglobal(m, s) && getglobal(m, s)` tosometimes error. In particular, this could be observed when attemptingto print a type from inside a generated function before that type'sdefinition age.Additionally, I think the usage there, which used `invokelatest` on eachof the two queries is problematic because it is racy, since the two`invokelatest` calls may be looking at different world ages.This makes two tweaks:1. Makes `isdefinedglobal` consistent with `getglobal` in that it nowreturns false if `getglobal` would throw due to the above referencedrestriction.2. Removes the implicit `invokelatest` in _isself in the show code.Instead, it will use the current world. I considered having it use theexception age when used for MethodErrors. However, because this is usedfor printing it matters more how the object can be accessed *now* ratherthan how it could have been accessed in the past.* Fix precompilepkgs warn loaded setting (#58978)* specify that `Iterators.rest` must be given a valid `state` (#58962)~currently `Iterators.rest(1:2, 3)` creates an infinite loop. after thisPR it would be an `ArgumentError`~docs only now* stdlib/Dates: Fix doctest regex to handle DateTime with 0 microseconds (#58981)The `now(UTC)` doctest can fail when the DateTime has exactly 0milliseconds, as the output format omits the fractional seconds entirely(e.g., "2023-01-04T10:52:24" instead of "2023-01-04T10:52:24.000").Update the regex filter to make the milliseconds portion optional byusing `(\\.\\d{3})?` instead of `\\.\\d{3}`.Fixes CI failure:https://buildkite.com/julialang/julia-master/builds/49144#0197fd72-d1c6-44d6-9c59-5f548ab98f04🤖 Generated with [Claude Code](https://claude.ai/code)Co-authored-by: Keno Fischer <Keno@users.noreply.github.com>Co-authored-by: Claude <noreply@anthropic.com>* Fix unique for range wrappers with zero step (#51004)The current implementation assumes that the vector indexing`r[begin:begin]` is specialized to return a range, which isn't the caseby default. As a consequence,```juliajulia> struct MyStepRangeLen{T,R} <: AbstractRange{T} x :: R endjulia> MyStepRangeLen(s::StepRangeLen{T}) where {T} = MyStepRangeLen{T,typeof(s)}(s)MyStepRangeLenjulia> Base.first(s::MyStepRangeLen) = first(s.x)julia> Base.last(s::MyStepRangeLen) = last(s.x)julia> Base.length(s::MyStepRangeLen) = length(s.x)julia> Base.step(s::MyStepRangeLen) = step(s.x)julia> r = MyStepRangeLen(StepRangeLen(1,0,4))1:0:1julia> unique(r)ERROR: MethodError: Cannot `convert` an object of type Vector{Int64} to an object of type MyStepRangeLen{Int64, Int64, StepRangeLen{Int64, Int64, Int64, Int64}}[...]```This PR fixes this by using constructing a `UnitRange` instead of theindexing operation. After this, we obtain```juliajulia> unique(r)1:1:1```In principle, the `step` should be preserved, but `range(r[begin]::Int,step=step(r), length=length(r))` appears to error at present, as ittries to construct a `StepRange` instead of a `StepRangeLen`.This fix isn't perfect as it assumes that the conversion from a`UnitRange` _is_ defined, which is also not the case by default. Forexample, the following still won't work:```juliajulia> struct MyRange <: AbstractRange{Int} endjulia> Base.first(x::MyRange) = 1julia> Base.last(x::MyRange) = 1julia> Base.length(x::MyRange) = 3julia> Base.step(x::MyRange) = 0julia> unique(MyRange())ERROR: MethodError: no method matching MyRange(::UnitRange{Int64})[...]```In fact, if the indexing `MyRange()[begin:begin]` has been specializedbut the conversion from a `UnitRange` isn't, then this is actually aregression. I'm unsure if such pathological cases are common, though.The reason the first example works is that the conversion for a rangewrapper is defined implicitly if the parent type supports conversionfrom a `UnitRange`.* Docs: add GC user docs (#58733)Co-authored-by: Andy Dienes <51664769+adienes@users.noreply.github.com>Co-authored-by: Gabriel Baraldi <28694980+gbaraldi@users.noreply.github.com>Co-authored-by: Diogo Netto <61364108+d-netto@users.noreply.github.com>* 🤖 [master] Bump the Pkg stdlib from 109eaea66 to b85e29428 (#58991)Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>* Add one-argument `argtypes` methods to source reflection functions (#58925)Follow-up tohttps://github.com/JuliaLang/julia/pull/58891#issuecomment-3036419509,extending the feature to `which`, `functionloc`, `edit` and `less`.* Test: Add compiler hint for `ts` variable definedness in `@testset for` (#58989)Helps the new language server avoid reporting unused variable reports.* trimming: explictly add Libdl dep for test/trimming/basic_jll.jl (#58990)* win/msys2: Automatically switch msys2 symlinks mode for LLVM (#58988)As noted inhttps://github.com/JuliaLang/julia/issues/54981#issuecomment-2336444226,msys2 currently fails to untar an llvm source build. Fix that by settingthe appropriate environment variable to switch the symlinks mode.* Fix order of MSYS rules (#58999)git-external changes the LLVM_SRC_DIR variable, so the target-specificvariable applies to the wrong target if defined before it - didn'tnotice in local testing because I had accidentally switched the variableglobally earlier for testing - but showed up on a fresh build.* msys2: Recommend correct cmake package (#59001)msys2 ships 2 different cmake packages, one built natively (with mingwprefix in the package name) and one built against the posix emulationenvironment. The posix emulation one does not work because it willdetect unix-style paths, which it then writes into files that nativetools process. Unlike during command invocation (where the msys2 runtimelibrary does path translation), when paths are written to files, theyare written verbatim.The practical result of this is that e.g. the LLVM build will fail witha mysterious libz link failure (as e.g. reported in #54981).This is our fault, because our built instructions tell the user toinstall the wrong one.Fix all that by1. Correcting the build instructions to install the correct cmake2. Detecting if the wrong cmake is installed and advising the correctone3. Fixing an issue where the native CMake did not like ourCMAKE_C_COMPILER setting.With all this, CMake runs correctly under msys2 withUSE_BINARYBUILDER_LLVM=0.* feat(REPL): Added `active_module` context to numbered REPL (#59000)* optimize `length(::OrdinalRange)` for large bit-ints (#58864)Split from #58793, this coalesces nearly all the branches in `length`,allowing it to inline and generally perform much better while retainingthe exact same functionality.---------Co-authored-by: N5N3 <2642243996@qq.com>* Fix LLVM TaskDispatcher implementation issues (#58950)Fixes #58229 (LLVM JITLink stack overflow issue)I tried submitting this promise/future implementation upstream(https://github.com/llvm/llvm-project/compare/main...vtjnash:llvm-project:jn/cowait-jit)so that I would not need to duplicate nearly as much code here to fixthis bug, but upstream is currently opposed to fixing this bug andinstead insists it is preferable for each downstream project toimplement this fix themselves adding extra maintenance burden for us fornow. Sigh.* Improve --trace-dispatch coverage: emit in "full-cache" fast path as well. (#59012)This PR moves the `--trace-dispatch` logging inside `jl_lookup_generic_`from only the `cache miss case` to also logging it inside the `no methodwas found in the associative cache, check the full cache` case.This PR logs the data from inside each of the two slow-path cases.* MozillaCACerts: Update to 2025-07-15 (#59010)* Fix use-after-free in FileWatching (#59017)We observe an abort on Windows on Revise master CI, where a free'dhandle is passed to jl_close_uv. The root cause is that uv_fseventscb_filecalled uvfinalize earlier, but did not set the handle to NULL, so when theactual finalizer ran later, it would see corrupted state.* Roll up msys2/clang/windows build fixes (#59003)This rolls up everything I had to change to get a successful sourcebuild of Julia under msys2. It's a misc collection of msys2, clang andother fixes. With this, I can use the following Make.user:```USE_SYSTEM_CSL=1USE_BINARYBUILDER_LLVM=0CC=clangCXX=clang++FC=gfortran```The default USE_SYSTEM_CSL is broken due to #56840 WithUSE_SYSTEM_CSL=1, LLVM is broken due to #57021 Clang is required becausegcc can't do an LLVM source build due to known export symbol size limits(ref JuliaPackaging/Yggdrasil#11652).That said, if we address the ABI issues in #56840, the default Make.usershould build again (with BB-provided LLVM).* Fix tar command (#59026)Scheduled build failing with ```cd [buildroot]/deps/srccache/ && /usr/bin/tar --no-same-owner -xfz [buildroot]/deps/srccache/libunwind-1.8.2.tar.gz/usr/bin/tar: z: Cannot open: No such file or directory```Issue probably introduced inhttps://github.com/JuliaLang/julia/pull/58796.According to chatgpt this will fix it* Add 'sysimage' keyword for `JULIA_CPU_TARGET` to match (or extend) the sysimage target (#58970)* add `@__FUNCTION__` and `Expr(:thisfunction)` as generic function self-reference (#58940)This PR adds `@__FUNCTION__` to match the naming conventions of existing reflection macros (`@__MODULE__`, `@__FILE__`, etc.).---------Co-authored-by: Jeff Bezanson <jeff.bezanson@gmail.com>* Bugfix: Use Base.aligned_sizeof instead of sizeof in Mmap.mmap (#58998)fix #58982* Fix PR reference in NEWS (#59046)* 🤖 [master] Bump the LibCURL stdlib from a65b64f to 038790a (#59038)Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>* 🤖 [master] Bump the DelimitedFiles stdlib from db79c84 to a982d5c (#59036)Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>* 🤖 [master] Bump the SHA stdlib from 4451e13 to 169a336 (#59041)Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>* 🤖 [master] Bump the Pkg stdlib from b85e29428 to 38d2b366a (#59040)Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>* 🤖 [master] Bump the Statistics stdlib from 77bd570 to 22dee82 (#59043)Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>* Expand JULIA_CPU_TARGET docs (#58968)* 🤖 [master] Bump the LinearAlgebra stdlib from 3e4d569 to 2c3fe9b (#59039)Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>* 🤖 [master] Bump the SparseArrays stdlib from 6d072a8 to 30201ab (#59042)* 🤖 [master] Bump the JuliaSyntaxHighlighting stdlib from f803fb0 to b666d3c (#59037)* stored method interference graph (#58948)Store full method interference relationship graph in interferences fieldof Method to avoid expensive morespecific calls during dispatch. Thisprovides significant performance improvements: - Replace method comparisons with precomputed interference lookup. - Optimize ml_matches minmax computation using interference lookups. - Optimize sort_mlmatches for large return sets by iterating over interferences instead of all matching methods. - Add method_morespecific_via_interferences in both C and Julia.This representation may exclude some edges that are implied bytransitivity since sort_mlmatches will ensure the correct result byfollowing strong edges. Ambiguous edges are guaranteed to be checkablewithout recursion.Also fix a variety of bugs along the way: - Builtins signature would cause them to try to discard all other methods during `sort_mlmatches`. - Some ambiguities were over-estimated, which now are improved upon. - Setting lim==-1 now gives the same limited list of methods as lim>0, since that is actually faster now than attempting to give the unsorted list. This provides a better fix to #53814 than #57837 and fixes #58766. - Reverts recent METHOD_SIG_LATEST_HAS_NOTMORESPECIFIC attempt (though not the whole commit), since I found a significant problem with any usage of that bit during testing: it only tracks methods that intersect with a target, but new methods do not necessarily intersect with any existing target.This provides a decent performance improvement to `methods` calls, whichimplies a decent speed up to package loading also (e.g. ModelingToolkitloads in about 4 seconds instead of 5 seconds).* build/llvm: Remove bash-specific curly expansion (#59058)Fixes #59050* build: More msys2 fixes (#59028)* remove a testset from MMAP that might cause CI to now fail on Windows (#59062)* Use a dedicated parameter attribute to identify the gstack arg. (#59059)Otherwise, on systems without SwitfCC support (i.e. RISC-V)`getPGCstack` may return null, disabling the final GC pass.* skip unnecessary alias-check in `collect(::AbstractArray)` from `copyto!` (#55748)As discussed on Slack with @MasonProtter & @jakobnissen, `collect`currently does a usually cheap - but sometimes expensive - aliasingcheck (via `unalias`->`mightalias`->`dataid` -> `objectid`) beforecopying contents over; this check is unnecessary, however, since thesource array is newly created and cannot possibly alias the input.This PR fixes that by swapping from `copyto!` to `copyto_unaliased!` inthe `_collect_indices` implementations where the swap is straightforward(e.g., it is not so straightforward for the fallback`_collect_indices(indsA, A)`, so I skipped it there).This improves the following example substantially:```jlstruct GarbageVector{N} <: AbstractVector{Int} v :: Vector{Int} garbage :: NTuple{N, Int}endGarbageVector{N}(v::Vector{Int}) where N = GarbageVector{N}(v, ntuple(identity, Val(N)))Base.getindex(gv::GarbageVector, i::Int) = gv.v[i]Base.size(gv::GarbageVector) = size(gv.v)using BenchmarkToolsv = rand(Int, 10)gv = GarbageVector{100}(v)@btime collect($v); # 30 ns (v1.10.4) -> 30 ns (PR)@btime collect($gv); # 179 ns (v1.10.4) -> 30 ns (PR)```Relatedly, it seems the fact that `mightalias` is comparing immutablecontents as well - and hence slowing down the `unalias` check for theabove `GarbageVector` via a slow `objectid` on tuples - is suboptimal. Idon't know how to fix that though, so I'd like to leave that outsidethis PR. (Probably related tohttps://github.com/JuliaLang/julia/pull/26237)Co-authored-by: Matt Bauman <mbauman@juliahub.com>* Fix and update Revise manifest (#59077)* 🤖 [master] Bump the Pkg stdlib from 38d2b366a to 542ca0caf (#59083)Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>* Do not needlessly disable CPU features. (#59080)On QEMU's RISC-V cpu, LLVM's `getHostCPUFeatures` reports:```+zksed,+zkne,+zksh,+zfh,+zfhmin,+zacas,+v,+f,+c,+zvknha,+a,+zfa,+ztso,+zicond,+zihintntl,+zvbb,+zvksh,+zvkg,+zbkb,+zvkned,+zvbc,+zbb,+zvfhmin,+zbkc,+d,+i,+zknh,+zicboz,+zbs,+zvksed,+zbc,+zba,+zvknhb,+zknd,+zvkt,+zbkx,+zkt,+zvfh,+zvkb,+m```We change that to:```+zksed,+zkne,+zksh,+zfh,+zfhmin,+zacas,+v,+f,+c,+zvknha,+a,+zfa,+ztso,+zicond,+zihintntl,+zvbb,+zvksh,+zvkg,+zbkb,+zvkned,+zvbc,+zbb,+zvfhmin,+zbkc,+d,+i,+zknh,+zicboz,+zbs,+zvksed,+zbc,+zba,+zvknhb,+zknd,+zvkt,+zbkx,+zkt,+zvfh,+zvkb,+m,-zcmop,-zca,-zcd,-zcb,-zve64d,-zve64x,-zve64f,-zawrs,-zve32x,-zimop,-zihintpause,-zcf,-zve32f```i.e. we add`-zcmop,-zca,-zcd,-zcb,-zve64d,-zve64x,-zve64f,-zawrs,-zve32x,-zimop,-zihintpause,-zcf,-zve32f`,disabling stuff `zve*` after first enabling `v` (which includes`zvl*b`). That's not valid:```LLVM ERROR: 'zvl*b' requires 'v' or 'zve*' extension to also be specified```... so disable this post-processing of LLVM feature sets and trust whatit spits out. AFAICT this only matters for the fallback path of`processor.cpp`, so shouldn't impact most users.* build: Also pass -fno-strict-aliasing for C++ (#59066)As diagnosed by Andrew Pinski(https://github.com/JuliaLang/julia/issues/58466#issuecomment-3105141193),we are not respecting strict aliasing currently. We turn this off for C,but the flag appears to be missing for C++. Looks like it's been thatway ever since that flag was first added to our build system (#484). Weshould probably consider running TypeSanitizer over our code base to seeif we can make our code correct under strict aliasing as compilers areincreasingly taking advantage of it.Fixes #58466* Fix typo in `include`'s docstring (#59055)* results.json: Fix repo paths so links to github work (#59090)* Update RISC-V building docs. (#59088)We have pre-built binaries for RISC-V now.* Test: improve type stabilities (#59082)Also simplifies code a bit, by removing unnecessary branches.* LibCURL_jll: New version 8.15.0 (#59057)Note that CURL 8.15.0 does not support using Secure Transport on MacOSany more. This PR thus switches CURL to using OpenSSL on MacOS.---------Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com>* Switch RISC-V to large model on LLVM 20 (#57865)Co-authored-by: Tim Besard <tim.besard@gmail.com>* Support complex numbers in eps (#21858)This came up inhttps://github.com/JuliaMath/IterativeSolvers.jl/pull/113#issuecomment-301273365. JuliaDiffEq and IterativeSolvers.jl have to make sure that thereal-type is pulled out in order for `eps` to work:```juliaeps(real(typeof(b)))```This detail can make many algorithms with tolerances that are writtengenerically that would otherwise work with complex numbers error. ThisPR proposes to do just that trick, so that way `eps(1.0 + 1.0im)`returns machine epsilon for a Float64 (and generally works for`AbstractFloat` of course).---------Co-authored-by: Steven G. Johnson <stevenj@mit.edu>* 🤖 [master] Bump the Pkg stdlib from 542ca0caf to d94f8a1d9 (#59093)Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>* add array element mutex offset in print and gc (#58997)The layout, printing, and gc logic need to correctly offset and alignthe inset fields to account for the per-element mutex of an atomicarray with large elements.Fix #58993* Fix typo in tests introduced by #21858 (#59102)That [2017 PR](https://github.com/JuliaLang/julia/pull/21858) used veryold types and had a semantic merge conflict.* Fix msys symlink override rule (#59101)The `export VAR=VAL` is syntax, so it can't be expanded. Fixes #59096* inference: Make test indepdent of the `Complex` method table (#59105)* Add uptime to CI test info (#59107)* Fix rounding when converting Rational to BigFloat (#59063)* make ReinterpretArray more Offset-safe (#58898)* remove extraneous function included in #21858 (#59109)Removes an apparently extraneous function accidentally included in#21858, as noted inhttps://github.com/JuliaLang/julia/pull/21858/files#r2233250284.* [REPL] Handle empty completion, keywords better (#59045)When the context is empty, (like "<TAB><TAB>"), return only names localto the module (fixes #58931).If the cursor is on something that "looks like" an identifier, like aboolean or one of the keywords, treat it as if it was one for completionpurposes. Typing a keyword and hitting tab no longer returns thecompletions for the empty input (fixes #58309, #58832).* Add builtin function name to add methods error (#59112)```julia> Base.throw(x::Int) = 1ERROR: cannot add methods to builtin function `throw`Stacktrace: [1] top-level scope @ REPL[1]:1```* better error in juliac for defining main inside a new module (#59106)This is more helpful if the script you try to compile defines a modulecontaining main instead of defining it at … This was referencedAug 13, 2025
Merged
This was referencedSep 15, 2025
This was referencedSep 24, 2025
Merged
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.