https://github.com/JuliaLang/julia

sort by:
Revision Author Date Message Commit Date
2947f8c Experiment with always using memcmp 03 January 2024, 18:50:19 UTC
972f55f Mention `@lock` in `lock(f, l)` docstring (#52357) Follow up to: https://github.com/JuliaLang/julia/issues/36441. Makes this macro much easier to learn about if you're just viewing the docstrings. 02 January 2024, 19:04:46 UTC
1dfd2a6 syntax: properly linearize type-for-closure code (#52497) The (core svec) calls are not supposed to be nested like this now. We would rarely attempt to infer this, which makes it hard to notice, but we should try to be correct. 02 January 2024, 19:04:17 UTC
567754c update latest stable version in README (#52699) 02 January 2024, 14:32:56 UTC
acddc62 Fix docs for Sockets.getaddrinfo() (#52538) Previously only the two-argument method was documented, which stated that the default type to be returned was IPv4. But that hasn't been true since 2ab654ce5b (#36029), so now both methods are documented and corrected. I believe this fixes #40306. 02 January 2024, 12:04:53 UTC
0d9c0d9 Add 3-argument div and rem in doc (#52662) Resolves #52624 02 January 2024, 12:00:53 UTC
0f62824 Profile: Improve module docstring (#52678) ![Screenshot 2023-12-30 at 7 24 10 PM](https://github.com/JuliaLang/julia/assets/1694067/a7c78943-5e4a-475c-864c-3b0005305471) 02 January 2024, 01:58:53 UTC
7baa577 Add `@create_log_macro` for making custom styled logging macros (#52196) 02 January 2024, 01:57:03 UTC
1b183b9 Add Docs.undocumented_names (#52413) Fixes #51174 --------- Co-authored-by: Steven G. Johnson <stevenj@alum.mit.edu> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> 31 December 2023, 01:32:59 UTC
89cae45 Optimized arithmetic methods for strided triangular matrices (#52571) This uses broadcasting for operations like `A::UpperTriangular + B::UpperTriangular` in case the parents are `StridedMatrix`es. Looping only over the triangular part is usually faster for large matrices, where presumably memory is the bottleneck. Some performance comparisons, using ```julia julia> U = UpperTriangular(rand(1000,1000)); julia> U1 = UnitUpperTriangular(rand(size(U)...)); ``` | Operation | master | PR | | --------------- | ---------- | ----- | |`-U` |`1.011 ms (3 allocations: 7.63 MiB)` |`559.680 μs (3 allocations: 7.63 MiB)` | |`U + U`/`U - U` |`971.740 μs (3 allocations: 7.63 MiB)` | `560.063 μs (3 allocations: 7.63 MiB)` | |`U + U1`/`U - U1` |`3.014 ms (9 allocations: 22.89 MiB)` | `944.772 μs (3 allocations: 7.63 MiB)` | |`U1 + U1` |`4.509 ms (12 allocations: 30.52 MiB)` | `1.687 ms (3 allocations: 7.63 MiB)` | |`U1 - U1` |`3.357 ms (9 allocations: 22.89 MiB)` | `1.763 ms (3 allocations: 7.63 MiB)` | I've retained the existing methods as fallback, in case there's current code that works without broadcasting. 30 December 2023, 17:08:45 UTC
fe0db7d heap snapshot: add gc roots and gc finalist roots to fix unrooted nodes (#52618) 30 December 2023, 14:46:53 UTC
2091058 Fix :noshift construction of an empty SubString (#51923) 30 December 2023, 12:20:28 UTC
9deee46 Bunch-Kaufman factorization support for generic number types and inertia computations (#51487) ### Introduction This PR adds a generic implementation of the Bunch-Kaufman factorization in native Julia code, and a generic implementation of a inertia calculation function. Right now Julia only support the Bunch-Kaufman factorization for `Float32`, `Float64` and their complex variants. This is because the factorization is handled by LAPACK, which only supports these types. To extend support to generic number types, I translated the LAPACK implementation to native Julia code, and the code performs the factorization in-place. I also included the function `inertia` that computes the number of positive, negative, and zero eigenvalues of an $n \times n$ Bunch-Kaufman factorized matrix in $\mathcal{O}(n)$ time. ### Changes - `bunchkaufman` and `bunchkaufman!` now work for any `AbstractFloat`, `Rational` and their complex variants. Behavior for previously supported types is not changed (LAPACK is used when possible). `bunchakaufman!` does not support `Integer` types, as in general the factorization lies in the arithmetic closure of the number type (the rationals for the integers). On the other hand, `bunchakaufman` supports `Integer` types, by making an internal conversion to `Rational{BigInt}`. - `ldiv!` for a `BunchKaufman` factorization has extended support for generic number types with type stability. - Previously, Julia extracted the diagonal factor of an $n \times n$ `BunchKaufman` object by making a copy of the matrix and then calling a LAPACK function (`dsyconvf`, `csyconvf`, etc., depending on the number type). This function also computes the triangular factor, so it runs in $\mathcal{O}(n^2)$ time. Now Julia uses a native implementation of the LAPACK function with small modifications, so it computes the diagonal factor in $\mathcal{O}(n)$ time, without making a new copy of the matrix. - Added the function `inertia` that computes the number of positive, negative and zero eigenvalues of the diagonal factor of an $n \times n$ `BunchKaufman` object, in case that the matrix is real symmetric or Hermitian. For complex symmetric matrices, `inertia` only computes the number of zero eigenvalues of the diagonal factor. `inertia` runs in $\mathcal{O}(n)$ time and only uses arithmetic and real absolute value operations. Therefore, `inertia` can be used for matrices of any generic number type, including `Rational`. In particular, for rational matrices the output of `inertia` is exact (unless a positive tolerance is specified). - Unit tests of the `BunchKaufman` library has been adapted to handle low precision number types (approximate comparisons with tolerance `sqrt(eps(Float64))` do not make sense when the floating point type is `Float16`, for example). The test-set now also runs on the following types: `Float16, Complex{Float16}, BigFloat, Complex{BigFloat}, Complex{Int}, BigInt, Complex{BigInt}, Rational{BigInt}, Complex{Rational{BigInt}}`. Unit tests for the `inertia` function have been added too. 30 December 2023, 10:58:31 UTC
3f4cfc6 [dSFMT_jll] Upgrade to v2.2.5 (#52667) Usual memo to self: * update version number in `stdlib/dSFMT_jll/Project.toml` * refresh checksums with `make -f contrib/refresh_checksums.mk -j dsfmt` * update version number in `deps/checksums/dsfmt` 30 December 2023, 09:04:07 UTC
2b2f534 minor fix in malloc terminology used in docs (#52665) 29 December 2023, 23:37:46 UTC
e8f8968 Added Tests for Permute function in combinatorics.jl (#52648) Signed-off-by: happy <happy@Ubunutt.myguest.virtualbox.org> Co-authored-by: happy <happy@Ubunutt.myguest.virtualbox.org> 29 December 2023, 05:33:19 UTC
ad3769e `Base`: make `Tuple(::Pair)` type-stable (#52650) Fixes #52636 28 December 2023, 21:50:59 UTC
90ae544 fix typo in NEWS (#52652) Typo from #52461. 28 December 2023, 19:18:07 UTC
e96c13a update nthreads info in versioninfo (#52423) Fixes https://github.com/JuliaLang/julia/issues/52404 @nilshg I opted to make it one line as it fits. ``` julia> versioninfo() Julia Version 1.11.0-DEV.1011 Commit bb7091c6f2* (2023-12-04 14:58 UTC) Platform Info: OS: macOS (arm64-apple-darwin23.0.0) CPU: 10 × Apple M2 Pro WORD_SIZE: 64 LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1) Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores) Environment: JULIA_EDITOR = code ``` 28 December 2023, 12:42:28 UTC
26d0460 Show more info on why package precompilation was needed (#52619) 28 December 2023, 07:52:18 UTC
e6e572e Temporarily remove failing sorting tests (#52643) Tracked by issue #52642 28 December 2023, 01:50:02 UTC
e7e8b89 update --gcthreads section in command line options (#52645) Make these consistent with what's shown by `julia --help`. Fixes https://github.com/JuliaLang/www.julialang.org/issues/1997. 27 December 2023, 18:59:53 UTC
66e9410 Add a fully typed Diagonal constructor from `AbstractMatrix`es (#52487) The following works after this PR: ```julia julia> oftype(Diagonal(Float32[1,2]), [1 0; 0 2]) 2×2 Diagonal{Float32, Vector{Float32}}: 1.0 ⋅ ⋅ 2.0 ``` This changes the behavior of the constructor to copy the diagonal, so now ```julia julia> D = Diagonal([1,2]); julia> typeof(D)(D).diag === D.diag false ``` whereas this used to be `true` previously. This probably doesn't matter much, as in most non-trivial cases it'd be copied anyway, and this conversion is unusual in the trivial case. --------- Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 27 December 2023, 06:36:28 UTC
b4eefd0 Default uplo in symmetric/hermitian (#52605) This makes the function signatures match the respective docstrings, as well as that of `Symmetric/Hermitian`. 27 December 2023, 06:36:08 UTC
713560b Specialize axes for structured matrices (#52480) On master ```julia julia> S = SMatrix{4,4}(1:16); julia> A = StructArray{Complex{Int}}((S,S)); julia> axes(Symmetric(A)) (Base.OneTo(4), Base.OneTo(4)) ``` The static axes are lost. After this, ```julia julia> axes(Symmetric(A)) (SOneTo(4), SOneTo(4)) ``` Similarly, I've added methods for other structured matrix types. These help with other cases like infinite arrays. --------- Co-authored-by: Matt Bauman <mbauman@juliahub.com> 25 December 2023, 12:55:56 UTC
933a83a Fix inconsistant logical index behavior (#45869) 1. If we use `BitArray`/`Array{Bool}` to index, `to_indices` has an optimiztion for linear-iteratable case. But the corresponding check is not correct. IIUC, this optimization is legal only when the Boolen array is the only index provided. The first commit fix it and widen this optimization to all Boolen array. Before this PR ```julia julia> A = rand(2,3,4); I = rand(Bool,3,4); julia> A[1,I] == A[1,view(I,:,:)] ERROR: BoundsError: attempt to access 2×3×4 Array{Float64, 3} at index [1, 3×4 Matrix{Bool}] ``` After ```julia julia> A = rand(2,3,4); I = rand(Bool,3,4); julia> A[1,I] == A[1,view(I,:,:)] true ``` 2. On master, if the index/array has singleton trailing dimension, boundcheck of logical index show different behavior depending on the number of indexes provided. If there's only one index variable, singleton dimension wil not be ignored. The second commit fix it. (close #45867) --------- Co-authored-by: Matt Bauman <mbauman@gmail.com> 25 December 2023, 12:54:47 UTC
4e4c0e5 simplification in `permutedims!` (#52623) `strides_1` was never used, and the `@nexprs` that creates `strides_i` can be replaced with `@ntuple`. Fixes #52615, credit: ararslan. 25 December 2023, 12:53:09 UTC
ef549ae Don't access parent of triangular matrix in powm (#52583) Since the values stored in the parent corresponding to the structural zeros of a tridiagonal matrix aren't well-defined, using it in `ldiv!` is a footgun that may lead to heisenbugs (one seen in https://buildkite.com/julialang/julia-master/builds/31285#018c7cc7-6c77-41ac-a01b-1c7d14cb1b15). This PR changes it to using the tridiagonal matrix directly in `ldiv!`, which should lead to predictable results, and be bug-free. The failing tests for #52571 pass locally with this change. 25 December 2023, 12:51:49 UTC
b51b809 Warn if an already loaded package is attempted to be loaded from a different path (#44329) 23 December 2023, 21:10:19 UTC
52ff558 cfg_simplify: Add one more check to avoid merging :leave terminator (#52621) In #52608, I made `:leave` a proper terminator (we already considered it as such during CFG construction, we just didn't maintain that property in the optimizer). As part of this, I adjusted one place in cfg_simplify to avoid merging blocks that end with non-trivial terminators (previously only EnterNode was considered). Turns out there's another one, so fix that as well. 23 December 2023, 15:03:47 UTC
0b5cf42 lowering: Optimize lowering of tryfinally with trivial finally block (#52593) This optimizes the lowering of a tryfinally block with empty finally block to instead use the try/catch lowering, where the catch block is given as simply `rethrow()`. This is equivalent semantically to try/finally in this case, but the code structure is a lot simpler with fewer basic blocks and without the auxiliary slot for tracking the finally slot. The motivation here is to help the compiler optimize better when using the `@with` macro, which has an empty `finally` block (but uses the scope argument of 'tryfinally). The only problem with this is that it violates the lowering assumptions I made in https://github.com/JuliaLang/julia/pull/52527, so we'll probably need to fix that first. 23 December 2023, 12:35:12 UTC
5111208 [LibCURL_jll] Update to v8.5.0 (#52611) 23 December 2023, 06:49:04 UTC
f98b895 sroa: Better current_scope folding (#52608) Third time's the charm hopefully. This builds on #52527 and addresses the TODO left there by keeping track of the appropriate :scope in sroa as we go along in order to ensure correct current_scope folding, even when the try body is nothrow (which was left as a todo). As a result, we also no longer result on lowering assumptions for this transformation, which enables us to enable the lowering optimization in #52593. 23 December 2023, 05:08:49 UTC
44a7915 ir: Fix incorrect renaming of phinode values (#52614) This fixes #52610. The underlying issue is a left over OldSSAValue after the adce_pass! (introduced by compaction, it being during adce is incidental). Compaction introduces `OldSSAValue` when it compacts in PhiNodes that reference later SSAValues and adds them to a list to revisit at the end of compaction to fill in the actual renamed result. There are two separate fixes here: 1. If the result of the final revisit is yet another `OldSSAValue`, rename it again. I don't this ordinarily happens at all, but I suppose it is possible in theory during sroa beacuse of the rename-shortcut optimization [1]. However, this is not not what happened here. Instead compaction incorrectly used an OldSSAValue for an already-inserted node, which then ends up in the rename list because we deleted one of the predecessor edges [2]. To fix that we: 2. Fix an issue where we weren't accounting for the possibility of previously pending nodes (which have SSAValues beyond the numbering range of the ordinary statements) in the special already_inserted query in phinode value processing. To fix this, unify the logic with the ordinary `already_inserted` query, which handles this case correctly. [1] https://github.com/JuliaLang/julia/blob/9443c761871c4db9c3213a1e01804286292c3f4d/base/compiler/ssair/passes.jl#L1385 [2] https://github.com/JuliaLang/julia/blob/9443c761871c4db9c3213a1e01804286292c3f4d/base/compiler/ssair/ir.jl#L1556 Co-authored-by: Tim Besard <tim@juliahub.com> 23 December 2023, 05:07:47 UTC
4975a78 GC page profiler (#52567) Piggybacks in the sweeping phase of the GC to pretty-print a JSON representation of every page in the pool allocator. Usage: ```bash julia> using Profile julia> Profile.take_page_profile("/tmp/test-profile.out") "/tmp/test-profile.out" ``` Output (truncated to one page & after pretty printing): ```json { "address": "0x109dd0000", "object_size": 400, "objects": [ "Task", "Task", "Task", "garbage", "GenericMemory", "garbage", "GenericMemory", "GenericMemory", "garbage", "GenericMemory", "GenericMemory", "Task", "Task", "Task", "garbage", "garbage", "garbage", "String", "garbage", "garbage", "String", "GenericMemory", "GenericMemory", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", ] } ``` This proved particularly useful for us when studying fragmentation in some of our workloads, though this profiler may possibly have some repeated functionality compared to the other profilers we already have in `stdlib`. 23 December 2023, 00:11:49 UTC
b97ffd0 [MbedTLS_jll] Update to v2.28.6 (#52612) 22 December 2023, 22:50:03 UTC
1a64299 Remove flakey sorting test (#52594) 22 December 2023, 20:45:20 UTC
40bc64c Fix `show` for `MethodList` when methods are from another module (#52354) When a type is defined in one module but its methods are defined elsewhere, `show_method_table` errors due to an incorrect lookup of the defining module used to determine colors for printing. In particular, the code had been assuming that the type is defined in the module in which its constructor's first method (in the sense of `first(methods())`) is defined, which isn't always true. The color used for printing the module name needs to be determined on a per-method basis and can't be correctly done based on the method table's module. For each method, we attempt to derive the module for the method table to which the method was added, then determine whether it's the same as the defining module for the method. Fixes #49382 Fixes #49403 Fixes #52043 Co-Authored-By: Jameson Nash <vtjnash@gmail.com> 22 December 2023, 20:21:11 UTC
9443c76 When setting `JULIA_DEPOT_PATH` to `/path:`, omit the default user depot (#51448) This commit slightly changes how the `DEPOT_PATH` works when overriden using the env var `JULIA_DEPOT_PATH`, now omitting the default user depot when specifying a path. Before: ``` ❯ JULIA_DEPOT_PATH=/foo: \ julia-1.10 -e 'display(DEPOT_PATH)' 4-element Vector{String}: "/foo" "/home/tim/.julia" "/path/to/julia/local/share/julia" "/path/to/julia/share/julia" ``` After: ``` ❯ JULIA_DEPOT_PATH=/foo: \ julia-pr -e 'display(DEPOT_PATH)' 3-element Vector{String}: "/foo" "/path/to/julia/local/share/julia" "/path/to/julia/share/julia" ``` This makes it possibly to create a new isolated depot by simply setting `JULIA_DEPOT_PATH` to `/path:`, while still being able to load resources that are bundled with Julia. For a full discussion, see the PR. 22 December 2023, 13:35:14 UTC
878b0c0 sroa: More fixes for KeyValue optimization (#52602) Fixes some mistakes in #52542 that led to the following issue: ``` function persistent_dict_elim_multiple_phi2(c::Bool) z = Base.inferencebarrier(1)::Int if c a = Base.PersistentDict(:a => z) else a = Base.PersistentDict(:a => z) end b = Base.PersistentDict(a, :b => 2) return b[:a] end julia> persistent_dict_elim_multiple_phi2(true) ERROR: KeyError: key :a not found Stacktrace: [1] getindex @ Base ./dict.jl:1010 [inlined] [2] persistent_dict_elim_multiple_phi2(c::Bool) @ Main ./REPL[1]:9 [3] top-level scope @ REPL[3]:1 ``` i.e. sroa incorrectly thought the value was not found. 22 December 2023, 13:07:20 UTC
1290b51 Lowering: Insert QuoteNode for captured boxed value (#52596) `Core.Box` is not self-quoting so it should be captured in a QuoteNode. This has been benign until the improved effect system, we handle `QuoteNode` of a mutable value as a global access, whereas a direct reference to a value is treated as inaccessible memory. Fixes #52531 --------- Co-authored-by: Gabriel Baraldi <baraldigabriel@gmail.com> Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 22 December 2023, 10:09:56 UTC
c1e1d5c irinterp: Don't give bad answers on encountering try/catch (#52601) We generally don't model try/catch in irinterp, but let's at least add the cases and make them do nothing, rather than assuming these nodes are literals and giving bad type results. Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Co-authored-by: Oscar Smith <oscardssmith@gmail.com> 21 December 2023, 17:50:15 UTC
bc979ae expand GC developer docs (#52340) The previous GC docs are mostly stale now given the recent GC changes. 21 December 2023, 17:12:24 UTC
a1a9ff4 remove duplicate increment to freecall in jl_gc_free_memory (#52598) Probably a typo. 21 December 2023, 17:02:45 UTC
f2ae45f Don't use `deepcopy_internal(xi, stackdict)` for isbits fields (#52597) This gives a good speed-up in some common cases: ```julia julia> mutable struct A x::Int end julia> a = A(1) A(1) # before julia> @benchmark deepcopy($a) BenchmarkTools.Trial: 10000 samples with 209 evaluations. Range (min … max): 370.895 ns … 4.573 μs ┊ GC (min … max): 0.00% … 83.23% Time (median): 389.206 ns ┊ GC (median): 0.00% Time (mean ± σ): 406.474 ns ± 136.334 ns ┊ GC (mean ± σ): 1.19% ± 3.34% ▁▁▆█▆▄▆▅▄▃▂▁ ▂ ▆█████████████▇▆▆▅▅▅▅▃▃▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▄▄▆▆▇▇▆▇▆█▇███▇▇▇▇█▇█▇ █ 371 ns Histogram: log(frequency) by time 596 ns < Memory estimate: 352 bytes, allocs estimate: 3. # this pr julia> @benchmark deepcopy($a) BenchmarkTools.Trial: 10000 samples with 964 evaluations. Range (min … max): 80.261 ns … 1.642 μs ┊ GC (min … max): 0.00% … 86.97% Time (median): 87.662 ns ┊ GC (median): 0.00% Time (mean ± σ): 96.426 ns ± 77.467 ns ┊ GC (mean ± σ): 6.20% ± 7.42% ▂█▅▆▁ █████▄▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▁▁▂▁▁▁▁▁▁▁▁▂▂▂▂▂▂▂▂▂ ▃ 80.3 ns Histogram: frequency by time 239 ns < Memory estimate: 352 bytes, allocs estimate: 3. julia> mutable struct B x::Int y::Float64 end julia> b = B(1, 1.0) B(1, 1.0) # before julia> @benchmark deepcopy($b) BenchmarkTools.Trial: 10000 samples with 153 evaluations. Range (min … max): 699.569 ns … 9.972 μs ┊ GC (min … max): 0.00% … 89.92% Time (median): 723.804 ns ┊ GC (median): 0.00% Time (mean ± σ): 738.515 ns ± 222.079 ns ┊ GC (mean ± σ): 0.93% ± 2.94% ▂▇█▁ ▂▂▂▃████▆▅▄▅▇▆▅▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▁▁▂▁▁▁▁▂▁▂▁▁▁▁▁▁▂▁▁▂▁▂▁▂▂▂▂ ▃ 700 ns Histogram: frequency by time 914 ns < Memory estimate: 384 bytes, allocs estimate: 4. # this pr julia> @benchmark deepcopy($b) BenchmarkTools.Trial: 10000 samples with 956 evaluations. Range (min … max): 91.535 ns … 1.660 μs ┊ GC (min … max): 0.00% … 81.91% Time (median): 99.322 ns ┊ GC (median): 0.00% Time (mean ± σ): 108.450 ns ± 88.399 ns ┊ GC (mean ± σ): 6.97% ± 7.82% ▁▃██▅▂ ▂▂▂▂▃▄▇███████▇▆▅▄▃▃▃▃▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▁▁▁▂ ▃ 91.5 ns Histogram: frequency by time 134 ns < Memory estimate: 384 bytes, allocs estimate: 4. ``` 21 December 2023, 14:40:06 UTC
34d1b71 Fix typos CI job for PRs that don't edit any files or do edit binary files (#52600) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 21 December 2023, 13:15:04 UTC
631e7ef effect: mark `Core.TypeofVararg` as `ismutationfree` (#52586) Found in https://buildkite.com/julialang/julia-master/builds/31309#018c7f0b-aada-4017-bb2f-44001593ac6b. On master keyword call might taint `inaccessiblememonly`. MWE: ```julia julia> foo(; kws...) = 1 foo (generic function with 1 method) julia> Base.infer_effects(foo, Tuple{}) (+c,+e,+n,+t,+s,!m,+u) ``` which is caused by ```julia julia> Base.infer_effects(()->Vararg) (+c,+e,+n,+t,+s,!m,+u) ``` Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 21 December 2023, 10:00:25 UTC
0cac28c 🤖 [master] Bump the Pkg stdlib from 85f1e5564 to 3c86ba27e (#52595) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: 85f1e5564 New commit: 3c86ba27e Julia version: 1.11.0-DEV Pkg version: 1.11.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaLang/Pkg.jl/compare/85f1e5564d733c9b04199d3523aeef0607f564e2...3c86ba27e904807e13beb8cb0466ed70365b0b2d ``` $ git log --oneline 85f1e5564..3c86ba27e 3c86ba27e add `add --weak/extra Foo` to add to [weakdeps] or [extras] (#3708) 2e640f92f respect --color=no in Pkg.precompile (#3740) cbd5d08ad Automatically add compat entries when adding deps to a package (#3732) 03de920b3 rm old manual handling of `--compiled-modules` (#3738) 314d5497b Use realpaths for temp dirs during tests. Fix SparseArrays `why` breakage (#3734) a6531d4be environments.md: update Julia version (#3715) a509bc062 Revise the API of is_manifest_current. (#3701) 60b7b7995 rm incorrect kwargs in add docstring (#3733) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 21 December 2023, 02:37:11 UTC
fb3e387 Fix small issue in EnterNode rename (#52589) Fixes issue noted at [1] - not sure why it didn't show up in CI on the PR. [1] https://github.com/JuliaLang/julia/pull/52527#issuecomment-1863930368 21 December 2023, 01:21:13 UTC
39087c5 Exception type: Model intrinsics (#52547) And then use this model for `nothrow` also (eventually we should just refactor everything to make nothrow just the appropriate query on exct). While we're at it, fix the nothrow model for pointerref/pointerset, which was missing a type check. --------- Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 21 December 2023, 01:20:53 UTC
2cf4de4 Document the String constructors for IPv4 and IPv6 (#52559) Also capitalized 'IP' in the Int constructors. These are pretty important and I couldn't see them mentioned anywhere else in the docs. 20 December 2023, 16:34:08 UTC
58fac69 inference: fix `istuple` check in `apply_type_tfunc` (#52585) close #51927 20 December 2023, 14:17:32 UTC
69d5537 Additional Phi node semantics details for ssair docs (#52587) Following a discussion on slack, I thought I would propose to add this to the docs. I'm very open to changing the form of the explanation, I just wanted to get the point across that "all phi nodes at the start of a basic block run simultaneously". --------- Co-authored-by: Keno Fischer <keno@alumni.harvard.edu> Co-authored-by: Oscar Smith <oscardssmith@gmail.com> 20 December 2023, 14:15:20 UTC
f8cd1eb `invperm` for immutable arrays (#52546) Rebase #47855 Close #47855 Close #47847 After this, ```julia julia> invperm(SA[3,2,1]) 3-element MVector{3, Int64} with indices SOneTo(3): 3 2 1 ``` 20 December 2023, 12:42:21 UTC
a987f56 Fix ?(#TAB method search name exploration (#52555) Fix #52551. This PR ensures that a `SomeModule.?(...#TAB` completion can only suggests method `foo` such that `SomeModule.foo` exists (by checking `isdefined(SomeModule, :foo)`). This is equivalent, I believe, to the initial implementation of https://github.com/JuliaLang/julia/pull/38791, less the bug. Now that we have #51345, we may want to relax the above condition somewhat to include public names present in modules loaded into `SomeModule`, so that, for instance, a direct completion of `?(` would include `@assume_effects`. This could be good for method exploration because even though typing `@assume_effects` with no qualification in `Main` will error, the error now includes the helpful message ``` Hint: a global variable of this name also exists in Base. ``` But that can wait for a later PR anyway, this one is just the bugfix. The bug mentioned at https://github.com/JuliaLang/julia/issues/52551#issuecomment-1858543413 dates from the initial #38791 so this could be backported as far back as v1.8. --------- Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com> 20 December 2023, 10:17:51 UTC
ae3c711 make `update_exc_bestguess!` overloadable by `AbstractInterpreter` (#52588) This change allows `AbstractInterpreter` to record each program counter where exception type inference happened, which is required for new functionality of Cthulhu that I'm implementing. 20 December 2023, 09:25:52 UTC
d53fc50 Expand Nagle DocString (#52565) Improve Nagle DocString. See also https://github.com/JuliaLang/julia/issues/31842 --------- Co-authored-by: Elliot Saba <staticfloat@gmail.com> 20 December 2023, 05:39:47 UTC
d07a272 Improve the docstring of `mul!` (#52509) Add a comparison between the in-place and out-of-place versions to demonstrate that they compute the same values. 20 December 2023, 04:06:38 UTC
1633934 Specialize `fill!` for `Lower`/`UpperTriangular` (#52570) Only looping over the triangular part provides a performance boost: ```julia julia> U = UpperTriangular(rand(3000,3000)); julia> @btime zero($U); 23.575 ms (3 allocations: 68.66 MiB) # master 15.739 ms (3 allocations: 68.66 MiB) # PR ``` This is only really applicable when filling a triangular matrix with zeros, but this has several applications (e.g. imaginary part of a real matrix). --------- Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 20 December 2023, 04:06:26 UTC
24e43ad added promotions for SymTri and Tri (#48536) Co-authored-by: zzeuuus <74652697+ArunSanganal@users.noreply.github.com> Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 19 December 2023, 18:30:40 UTC
4d677a5 Fix array condition in is_valid_intrinsic_elptr (#52433) This conditional was added in the Memory PR, but the `ety` is obviously a type, not an array, so I'm assuming it meant to filter out array types. 19 December 2023, 15:19:34 UTC
f1f680f docs: fix `PersistentDict` doc string note admonition formatting (#52579) https://docs.julialang.org/en/v1/stdlib/Markdown/#Admonitions Fixes #52578 19 December 2023, 13:23:26 UTC
3b250c7 fix isequal_normalized for combining-char reordering (#52447) Fixes #52408. (Note that this function was added in Julia 1.8, in #42493.) In the future it would be good to further optimize this function by adding a fast path for the common case of strings that are mostly ASCII characters. Perhaps simply skip ahead to the first byte that doesn't match before we begin doing decomposition etcetera. 19 December 2023, 12:55:04 UTC
91d87c6 Add --pkgimages=existing. (#52573) Equivalent of https://github.com/JuliaLang/julia/pull/50586; implements https://github.com/JuliaLang/julia/issues/51474. With `--pkgimages=existing`, it's possible to disable the (often slow) generation of package images, without losing the ability to use existing ones. That's important now that we're moving more and more packages outside of the system image, e.g., running with `--pkgimages=no` otherwise takes close to 30s here before the Pkg REPL is usable. The main motivation for this is PkgEval, where generating package images is not very useful, yet disabling generation of them makes each job (which requires Pkg to drive the test process) take a significantly longer time. For example, `--pkgimages=yes` vs `no`: ```julia ❯ JULIA_DEBUG=loading ./julia --project=Example.jl --pkgimages=yes # no precompilation of REPL.jl ┌ Debug: Loading object cache file /Users/tim/Julia/src/julia/build/dev/usr/share/julia/compiled/v1.11/REPL/u0gqU_XmENM.dylib for REPL [3fa0cd96-eef1-5676-8a61-b3b8758bbffb] └ @ Base loading.jl:1116 julia> using Example # short time precompiling + pkgimg generation for Example.jl ┌ Debug: Loading object cache file /Users/tim/.julia/compiled/v1.11/Example/lLvWP_tJaso.dylib for Example [7876af07-990d-54b4-ab0e-23690620f79a] └ @ Base loading.jl:1116 ``` ```julia ❯ JULIA_DEBUG=loading ./julia --project=Example.jl --pkgimages=no ┌ Debug: Rejecting cache file /Users/tim/Julia/src/julia/build/dev/usr/share/julia/compiled/v1.11/REPL/u0gqU_XmENM.ji for REPL [3fa0cd96-eef1-5676-8a61-b3b8758bbffb] since the flags are mismatched │ current session: use_pkgimages = false, debug_level = 1, check_bounds = 0, inline = true, opt_level = 2 │ cache file: use_pkgimages = true, debug_level = 1, check_bounds = 0, inline = true, opt_level = 2 └ @ Base loading.jl:3289 # long time precompiling REPL.jl ┌ Debug: Loading cache file /Users/tim/.julia/compiled/v1.11/REPL/u0gqU_CWvWI.ji for REPL [3fa0cd96-eef1-5676-8a61-b3b8758bbffb] └ @ Base loading.jl:1119 julia> using Example # short time precompiling Example ┌ Debug: Loading cache file /Users/tim/.julia/compiled/v1.11/Example/lLvWP_CWvWI.ji for Example [7876af07-990d-54b4-ab0e-23690620f79a] └ @ Base loading.jl:1119 ``` With the new `--pkgimages=existing`: ```julia ❯ JULIA_DEBUG=loading ./julia --project=Example.jl --pkgimages=existing # no precompilation of REPL.jl ┌ Debug: Loading object cache file /Users/tim/Julia/src/julia/build/dev/usr/share/julia/compiled/v1.11/REPL/u0gqU_XmENM.dylib for REPL [3fa0cd96-eef1-5676-8a61-b3b8758bbffb] └ @ Base loading.jl:1116 julia> using Example # short time precompiling Example ┌ Debug: Loading cache file /Users/tim/.julia/compiled/v1.11/Example/lLvWP_CWvWI.ji for Example [7876af07-990d-54b4-ab0e-23690620f79a] └ @ Base loading.jl:1119 ``` 19 December 2023, 11:49:05 UTC
4f25e87 sroa: Better walk for chained KeyValue (#52542) This redoes #52369, to put the walk through tothe chained KeyValue into a more logical place (the definition walking). This way, we automatically inherit correct handling of PhiNodes and ifelse. 19 December 2023, 11:24:27 UTC
ec4745b Fix interaction between try/catch elision and scope handling (#52527) Currently, our try/catch elision code does not look at whether the EnterNode has a scope, and just deletes it, if it can prove the contents nothrow. This is obviously problematic, so this fixes that case up to instead set the catch dest to 0 in that case (along with support in the rest of the system to ignore such catch dests for the purpose of renaming). The idea is that a later pass could use the notasklocalstate effect to delete this after appropriate verification, but this is not implemented. Additionally, this currently bails on folding current_scope inside such try/catch regions - for such regions we cannot use the CFG to determine the extent of the try/catch region. A proper treatment of this would probably be to just treat this as a single value mutable - but again this is not implemented. The primary purpose of this patch is to ensure correctness. 19 December 2023, 11:21:11 UTC
d336a3e Fix negation for an immutable unit triangular (#52510) Fixes ```julia julia> using FillArrays, LinearAlgebra julia> U = UnitUpperTriangular(Fill(2,4,4)) 4×4 UnitUpperTriangular{Int64, Fill{Int64, 2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}: 1 2 2 2 ⋅ 1 2 2 ⋅ ⋅ 1 2 ⋅ ⋅ ⋅ 1 julia> -U ERROR: ArgumentError: Cannot setindex! to -1 for an AbstractFill with value -2. Stacktrace: [1] setindex! @ ~/.julia/packages/FillArrays/oXkMk/src/FillArrays.jl:52 [inlined] [2] -(A::UnitUpperTriangular{Int64, Fill{Int64, 2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}) @ LinearAlgebra ~/packages/julias/julia-latest/share/julia/stdlib/v1.11/LinearAlgebra/src/triangular.jl:442 [3] top-level scope @ REPL[33]:1 ``` After this, ```julia julia> -U 4×4 UpperTriangular{Int64, Matrix{Int64}}: -1 -2 -2 -2 ⋅ -1 -2 -2 ⋅ ⋅ -1 -2 ⋅ ⋅ ⋅ -1 ``` 19 December 2023, 04:37:59 UTC
5977cb0 Fix GC rooting during rehashing of iddict (#52569) Should fix #52558. `a` should be rooted before the alloc call. I removed the comment as it seemed to refer to a write barrier that was removed long ago. 18 December 2023, 21:37:22 UTC
2ab4105 Fix typo in heuristics of BracketedSort (#52494) The impact of this typo was a) massively decreased performance that was b) predicted by heuristic dispatch, resulting in this algorithm not being dispatched too. I introduced this typo in 187e8c2222878c68b2afc9295ab8dc61773bd7f2 after performing all the benchmarking and before merging. 18 December 2023, 14:08:19 UTC
b57f8d1 Export method instance lookup functions (#52176) 18 December 2023, 09:20:17 UTC
7fe08e0 Specialize copy for Diagonal (#52500) On master ```julia julia> copy(Diagonal(1:4)) |> typeof Diagonal{Int64, Vector{Int64}} ``` This PR ```julia julia> copy(Diagonal(1:4)) |> typeof Diagonal{Int64, UnitRange{Int64}} ``` Similar methods already exist for `Bidiagonal` and `Tridiagonal`, but this was missing for `Diagonal`. 18 December 2023, 05:58:18 UTC
df5361a Accept IndexStyle in diagind, defaulting to IndexLinear (#52549) Partly revert and redesign #52115, with `diagind` now accepting an optional `IndexStyle`, which is `IndexLinear` by default. This should address the breakages reported in that PR. After this, ```julia julia> D = Diagonal(1:4) 4×4 Diagonal{Int64, UnitRange{Int64}}: 1 ⋅ ⋅ ⋅ ⋅ 2 ⋅ ⋅ ⋅ ⋅ 3 ⋅ ⋅ ⋅ ⋅ 4 julia> diagind(D) 1:5:16 julia> diagind(D, IndexCartesian()) StepRangeLen(CartesianIndex(1, 1), CartesianIndex(1, 1), 4) ``` --------- Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 18 December 2023, 02:12:24 UTC
c99572e Propagate inbounds in triangular/symmetric/UpperHessenberg get/setindex (#52512) Annotate several `getindex`/`setindex!` methods with `@propagate_inbounds`. We may need to be a bit careful to check for errant `@inbounds` annotations without a corresponding bounds-check. Close #52550 18 December 2023, 02:08:12 UTC
67c7843 Log pid of parent process that is running the CI tests (#52554) 15 December 2023, 22:53:29 UTC
e207c10 fix #52531, fix the effects modeling of `QuoteNode` (#52548) What observed in #52531 is that `QuoteNode` can embed global variables that users can modify. Therefore, when dealing with `QuoteNode`, it's necessary to taint its `:inaccessiblememonly` just like we do for `GlobalRef`. - fixes #52531 - replaces #52536 15 December 2023, 20:29:26 UTC
e8576fc gc: add some guard rails and refinements to MemBalancer (#52197) This replaces https://github.com/JuliaLang/julia/pull/50909, though notably does not include the change to use heap size instead of heap memory. This adds the smoothing behavior from that prior PR (to better estimate the long-term rates / ignore transient changes), updates the GC_TIME printing to reflect the change to use MemBalancer heuristics, and adds some other guardrails to the decisions so they do not get put off too far into the future. Since, unlike several other languages that use MemBalancer, we do not have a time-based trigger for GC to update these heuristics continuously, so we need to make sure each step is reasonably conservative (both from under and over predicting the rate). Finally, this is stricter about observing limits set by the user, by strictly limiting the exceedence rate to around 10%, while avoiding some prior possible issues with the hard cut-off being disjoint at the cutoff. This should mean we will go over the threshold slowly if the program continues to demand more space. If we OOM eventually by the kerenl, we would have died anyways from OOM now by ourself. 15 December 2023, 17:35:07 UTC
2c2ea3a Document environment variable JULIA_PKG_PRESERVE_TIERED_INSTALLED (#52362) This is based on ```julia julia> using Pkg help?> Pkg.add ... │ Note │ │ To change the default strategy to PRESERVE_TIERED_INSTALLED set the env var │ JULIA_PKG_PRESERVE_TIERED_INSTALLED to true. ... ``` I suggest to backport this so that it becomes available in the release docs of Julia v1.9 and newer. 15 December 2023, 15:53:35 UTC
9fc1b65 clarify permutedims docs (#52261) As commented [on discourse](https://discourse.julialang.org/t/how-do-we-julians-win-big-when-the-situation-is-so-unfair/106433/63?u=stevengj), it would be nice if the `permutedims` examples began with something like an array of strings where `transpose` is inapplicable. This PR simply clarifies the docs and adds a few more examples. --------- Co-authored-by: Haakon Ludvig Langeland Ervik <45243236+haakon-e@users.noreply.github.com> Co-authored-by: Jishnu Bhattacharya <jishnub.github@gmail.com> 15 December 2023, 06:24:22 UTC
d0efc5c 🤖 [master] Bump the Pkg stdlib from 5f666b077 to 85f1e5564 (#52537) 15 December 2023, 01:01:55 UTC
5e4e7fa remove unnecessary `\up` (upright) from some latex abbrevs (e.g. \upMu -> \Mu) (#50925) Closes #50911. Closes #50913. There were a few oddball symbols prefixed with `\up` (for "upright") for no reason that I can tell, ala the LaTeX "upgreek" package, even though we don't use an `\up` prefix for other upright Greek letters (e.g. we have `\alpha`, not `\upalpha`, even though it isn't italicized — we have `\italpha` for italic alpha). Not breaking since this is just a UI thing. (In practice, I doubt many people use these symbols. e.g. `\upMu` is `Μ`, which looks a lot like the Latin `M`. But there is no reason to have the `\up` prefix here. It seems to have just been an automated abbreviation-import snafu. And [`\upkoppa 'ϟ'` (U+O3DF)](https://www.compart.com/en/unicode/U+03DF) is visually quite distinctive though I've never seen it used in math, not to mention lowercase — it's definitely goofy to have an `\up` prefix for it.) 15 December 2023, 00:17:27 UTC
e9b0fa1 Add preference for version named manifest files (#43845) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 14 December 2023, 19:54:58 UTC
ad2d770 test: fix timeout changed by #52461 accidentally (#52534) 14 December 2023, 19:18:22 UTC
f345755 Reland "gc: avoid cpu stalls when starting" (#45794) 14 December 2023, 16:54:42 UTC
5195da2 Improve linear indexing performance for FastSubArrays (#45371) This PR forwards `AbstractUnitRange` indices for `FastSubArrays` to the parent, making use of the fact that the parent might have efficient vector indexing methods defined. --------- Co-authored-by: Jishnu Bhattacharya <jishnub@users.noreply.github.com> Co-authored-by: N5N3 <2642243996@qq.com> 14 December 2023, 12:24:16 UTC
d69bb97 Expand more Vararg elements during re-intersection if valid. (#46604) Our type intersection "prefers" `Tuple` with more parameters. This PR tries to replace `Tuple{Vararg{T,N}}` with `Tuple{T,T,T,Vararg{T,N}}` during re-intersection if we can prove that `N >= 3` and `N` is used only for Vararg length. 14 December 2023, 12:23:12 UTC
9147437 irinterp: Add :leave support (#52525) We still don't model exceptions, but the :leave expression doesn't participate in type refinement, so adding it here is easy. 14 December 2023, 07:08:14 UTC
0ae2094 Pass mutable copies to inplace LinearAlgebra functions (#52504) This gets some functions working with immutable matrix types, e.g.: ```julia julia> using FillArrays, LinearAlgebra julia> F = Fill(big(2), 4, 4) 4×4 Fill{BigInt}, with entries equal to 2 julia> det(F) 0 julia> triu(F) 4×4 Matrix{BigInt}: 2 2 2 2 0 2 2 2 0 0 2 2 0 0 0 2 ``` 14 December 2023, 05:01:42 UTC
b9668ee 🤖 [master] Bump the Pkg stdlib from debc38b9a to 5f666b077 (#52521) 14 December 2023, 01:17:34 UTC
ab1dda2 add missing increment of nrunning for jl_adopt_thread 13 December 2023, 21:24:39 UTC
3495404 handle data-race on nrunning==0 from scheduler_delete_thread Could be observed by thread 0 during certain phases, since if the dying thread was not running, it was not supposed to call jl_wakeup_thread (which will not increment nrunning until after the wakeup). 13 December 2023, 21:24:39 UTC
c92ce0a Reland "gc: avoid cpu stalls when starting" This reverts commit 4801b6ce9a4d737ad1722ca620a7bc8087590f2e and adds the safepoints needed to catch the unsafe->safe transition also and the locks needed for the condition broadcast message to be seen. 13 December 2023, 21:23:50 UTC
c601f39 Update crc32c.c register constraints again (#52437) As suggested in #52326#issuecomment-1840999660 For https://github.com/JuliaPackaging/Yggdrasil/pull/7757#issuecomment-1840604944 13 December 2023, 15:05:00 UTC
282e466 spawn: permit using IOBuffer as stdout (#52461) People expect to use this (the docs even almost even suggested it at some point), so it is better to make it work as expected (and better than they can emulate) than to criticize their choices. Also fix a few regressions and handling mistakes in setup_stdios: - #44500 tried to store a Redirectable into a SpawnIO, dropping FileRedirect - CmdRedirect did not allocate a ProcessChain, so it would call setup_stdio then call setup_stdios on the result of that, which is strongly discouraged as setup_stdio(s) should only be called once - BufferStream was missing `check_open` calls before writing, and ignored `Base.reseteof` as a possible means of resuming writing after `closewrite` sends a shutdown message. - Add `closewrite` to more methods, and document it. Fixes #39311 Fixes #49234 Fixes #49233 Fixes #46768 13 December 2023, 14:54:42 UTC
1524466 follow up #52309 (#52499) 13 December 2023, 08:46:57 UTC
2f5daca fix alignment of emit_unbox_store copy (#52505) The dest alignment might be determined to be greater than the source. For example, observed with: code_llvm(dump_module=true, optimize=false, (Int,)) do x Pair(ntuple(i -> 0x00, 8), x) end Where the alignment of the first field of the Pair is at least 4, but the alignment of the ntuple data is 1. (discovered while analyzing an ARM build failure @staticfloat) 13 December 2023, 07:42:02 UTC
406f5b4 Make EnterNode save/restore dynamic scope (#52309) As discussed in #51352, this gives `EnterNode` the ability to set (and restore on leave or catch edge) jl_current_task->scope. Manual modifications of the task field after the task has started are considered undefined behavior. In addition, we gain a new intrinsic to access current_task->scope and both inference and the optimizer will forward scopes from EnterNodes to this intrinsic (non-interprocedurally). Together with #51993 this is sufficient to fully optimize ScopedValues (non-interprocedurally at least). 13 December 2023, 04:17:25 UTC
d27ed8f doc/src/manual/arrays.md: fix typo (#52502) Mix-up between `I_k` and `i_k`. I bolded the wrong part. 12 December 2023, 20:29:59 UTC
eba10dd CI: Start the Pkg tests very early on during the test suite (#52460) 12 December 2023, 17:03:05 UTC
0a6ae7c contrib/check-whitespace: Use / for all platform (#52468) When built on Windows, the source code build will not pass `check-whitespace`. _check-whitespace issues (truncated):_ ``` $ make check-whitespace Whitespace check found 1658 issues: src/flisp/aliases.scm:25 -- tab src/flisp/aliases.scm:27 -- tab src/flisp/aliases.scm:28 -- tab src/flisp/aliases.scm:29 -- tab src/flisp/aliases.scm:73 -- tab src/flisp/color.lsp:55 -- tab .... ``` Because `git ls-files` use `/` as a path separator on Windows. https://github.com/JuliaLang/julia/blob/649982aa0995c45165084baa643ce5c7c5b489cb/contrib/check-whitespace.jl#L33 _"git ls-files" output on win (truncated):_ ``` $ git ls-files -- *.jl base/Base.jl base/Enums.jl base/abstractarray.jl base/abstractarraymath.jl base/abstractdict.jl base/abstractset.jl base/accumulate.jl ... ``` But `joinpath` gives `\\` on win, so it won't match. https://github.com/JuliaLang/julia/blob/649982aa0995c45165084baa643ce5c7c5b489cb/contrib/check-whitespace.jl#L21-L29 Change: just use `/` for all platforms. 12 December 2023, 17:01:50 UTC
deef5a9 deduplicate some already global values in global cache (#52303) System image savings is negligible (almost everything in the parameters are already cached datatypes), but seems good enough to have it, since we can 12 December 2023, 16:52:15 UTC
back to top