0b31e8b | Shuhei Kadowaki | 18 October 2023, 08:56:27 UTC | EA: allow tests to run for out-of-tree build (#51752) | 18 October 2023, 08:56:27 UTC |
86cbb60 | Shuhei Kadowaki | 17 October 2023, 21:19:01 UTC | inference: use `jl_method_get_table` for `get_nospecializeinfer_sig` (#51735) This allows `@nospecializeinfer` to be functional for `@overlay`ed methods, making it more aligned with `get_compileable_sig` too. | 17 October 2023, 21:19:01 UTC |
4d2d849 | Jishnu Bhattacharya | 17 October 2023, 13:33:23 UTC | Dots in displaying views of sparse/structured arrays (#51679) With this, views of sparse/structured arrays are printed with dots as well: ```julia julia> D = Diagonal(1:4) 4×4 Diagonal{Int64, UnitRange{Int64}}: 1 ⋅ ⋅ ⋅ ⋅ 2 ⋅ ⋅ ⋅ ⋅ 3 ⋅ ⋅ ⋅ ⋅ 4 julia> view(D, 1:3, 1:3) 3×3 view(::Diagonal{Int64, UnitRange{Int64}}, 1:3, 1:3) with eltype Int64: 1 ⋅ ⋅ ⋅ 2 ⋅ ⋅ ⋅ 3 julia> S = sparse([1,2,2,2,3], [1,1,2,2,4], [5, -19, 73, 12, -7]) 3×4 SparseMatrixCSC{Int64, Int64} with 4 stored entries: 5 ⋅ ⋅ ⋅ -19 85 ⋅ ⋅ ⋅ ⋅ ⋅ -7 julia> view(S, 1:3, 1:3) 3×3 view(::SparseMatrixCSC{Int64, Int64}, 1:3, 1:3) with eltype Int64: 5 ⋅ ⋅ -19 85 ⋅ ⋅ ⋅ ⋅ ``` | 17 October 2023, 13:33:23 UTC |
09dd7d7 | Benjamin Lorenz | 17 October 2023, 12:44:29 UTC | REPL: remove 'oops.' for non Markdown help strings (#51734) This was added in https://github.com/JuliaLang/julia/pull/50105/files#diff-625b68d89f9d5b3eaa175971271a3cce315a0d1e0597d03c9ab0bd7a0b020648R196 | 17 October 2023, 12:44:29 UTC |
66cdf15 | Justin Walker | 17 October 2023, 11:41:38 UTC | Add note in constructor doc about infix notation (#51610) When reading the documentation---and later, when I was doing an Exercism example implementing the complex numbers---it wasn't clear to me how certain symbols could work as infix operators. The Julia documentation uses ⊘ for rational division in its example, but it doesn't say why this works for `1 ⊘ 2`. I just added a note to clarify this. | 17 October 2023, 11:41:38 UTC |
214ac51 | Eric Hanson | 17 October 2023, 11:40:33 UTC | add `Printf.Format` and `Printf.format` to manual (#51723) | 17 October 2023, 11:40:33 UTC |
2e54092 | Gabriel Baraldi | 17 October 2023, 11:31:23 UTC | Use currently unused LLVM statistics (#51685) These variables missed being incremented | 17 October 2023, 11:31:23 UTC |
a0f1629 | Neven Sajko | 17 October 2023, 11:30:24 UTC | docs: `Base.Order.Ordering`: consistency with #48363 and #48387 (#51683) "Total order" -> "strict weak order". | 17 October 2023, 11:30:24 UTC |
ac7eecb | Florian | 17 October 2023, 10:46:23 UTC | Fix LinearAlgebra/diagonal test (#51733) | 17 October 2023, 10:46:23 UTC |
d42415a | DilumAluthgeBot | 17 October 2023, 08:40:01 UTC | 🤖 [master] Bump the Pkg stdlib from b02fb9597 to ffb6edf03 (#51732) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: b02fb9597 New commit: ffb6edf03 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/b02fb95979c71dc5834aad739ad61622cccf4a16...ffb6edf0306a651240b71641fb4aa5ab8cc7659b ``` $ git log --oneline b02fb9597..ffb6edf03 ffb6edf03 cache pidlock tweaks (#3654) 550eadd7e Pin registry for MetaGraph tests (#3666) ee39026b8 Remove test that depends on Random being in the sysimg (#3656) 561508db2 CI: Increase the CI timeout. Update actions. Fix double precompilation. (#3665) 7c7ed63b1 Remove change UUID script it should be uncessary on Julia v1.11-dev (#3655) a8648f7c8 Precompile: Fix algorithmic complexity of cycle detection (#3651) 0e0cf4514 Switch datastructure Vector -> Set for algorithmic complexity (#3652) 894cc3f78 respect if load-time precompile is disabled (#3648) 3ffd1cf73 Make auto GC message use printpkgstyle (#3633) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> | 17 October 2023, 08:40:01 UTC |
bbcbac9 | Jeff Bezanson | 16 October 2023, 21:16:45 UTC | support `public` in fallback/legacy parser (#51575) | 16 October 2023, 21:16:45 UTC |
ab94a24 | Jeff Bezanson | 16 October 2023, 21:15:25 UTC | clean up identifiers defined in `Main` (#51411) Loaded packages do not need explicit bindings, and the name `MainInclude` does not need to be visible. I noticed that `Main` tab completes to `MainInclude`, which is not great since it's an implementation detail. It's also a bit messy that `InteractiveUtils` appears in `varinfo()`. This is not necessary to access its functionality. The only behavior change from this is that adding a method to `include` or `eval` in Main used to work since these were explicitly imported. This now gives the "must be explicitly imported to be extended" error, which I consider a big improvement. Nobody should be doing that anyway. | 16 October 2023, 21:15:25 UTC |
d5cde52 | Viral B. Shah | 16 October 2023, 20:16:08 UTC | Bump SparseArrays to pull in SuiteSparse 7.2.1 (#51725) Upgrade SuiteSparse to 7.2.1 Upgrade SparseArrays.jl to the latest master --------- Co-authored-by: DilumAluthgeBot <43731525+DilumAluthgeBot@users.noreply.github.com> Co-authored-by: Dilum Aluthge <dilum@aluthge.com> | 16 October 2023, 20:16:08 UTC |
6ec149f | Ian Butterworth | 16 October 2023, 16:53:47 UTC | Lower Pidfile stale_age multiplier. Add pidfile to cache log message. (#51714) | 16 October 2023, 16:53:47 UTC |
4d36da7 | KronosTheLate | 16 October 2023, 15:01:46 UTC | Improve dostring for error(msg...) (#51721) This PR slightly modifies the docstring for the second method defined for `error`, as the docstring for this method a) seems quite imprecise, and b) is identical to that of `error(::AbstractString)`. | 16 October 2023, 15:01:46 UTC |
b0c6781 | DilumAluthgeBot | 16 October 2023, 12:09:42 UTC | 🤖 [master] Bump the SparseArrays stdlib from 4e6776a to 0f8bbda (#51678) Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: 4e6776a New commit: 0f8bbda Julia version: 1.11.0-DEV SparseArrays version: 1.11.0 Bump invoked by: @ViralBShah Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaSparse/SparseArrays.jl/compare/4e6776a825f2a26c3c580f9b77ba230a6598d7dd...0f8bbdac9c2d805f32faed90f4d8b8c8514aa478 ``` $ git log --oneline 4e6776a..0f8bbda 0f8bbda Interpolate SparseVector in display test (#455) d884072 Merge pull request #427 from JuliaSparse/jishnub/sparsevecshow 9e68b7e Merge branch 'main' into jishnub/sparsevecshow 12a1c30 remove unnecessary inequality change 4217641 don't set Documenter compat e86b148 Adapt to Documenter v1 (#444) 8c72535 Merge branch 'main' into jishnub/sparsevecshow 8c20ba1 Test for truncation 8f925f8 Interpolate Int in expected string c53e1f2 interpolate struct in display test 33d4bf5 Undef show with MIME text/plain 034d234 Hook into new factorization dispatch mechanisms (#437) 248d0e6 Merge branch 'main' into jishnub/sparsevecshow 713ab9b Fix documentation of `findall` behaviour (#452) cb9b31f rowvals instead of nonzeroinds 05ac950 Add example for UMFPACK control vector (#449) 605237e Add JL_UMFPACK_PIVOT_TOLERANCE to umfpack.jl (#447) 5dac134 Use a single header wrapper for all platforms. (#446) 47e26dd Explicit types in test RHS c123952 Interpolate vectors in show test b309da7 Explicit types d21fc79 Add test for showing a vector of sparsevec 3e918e4 Restore unfilled sparsevec display b533818 Don't add SparseArrays to docs/Project.toml 4449100 Remove commented out method 728e116 ignore docs/build 99a0db2 Merge show methods ac5c8ed Switch from internal 5-arg `searchsorted*` methods to views (#440) ada9edd sparse vector views remain sparse (#416) c93065c Improved the dot product between two vectors and a sparse matrix (#410) 2fae1a1 Correctly set zeros with `fill!(::SubArray)` and fix its return value (#433) 03ed9e3 Code quality cleanup (#438) 559a74e Merge branch 'main' into jishnub/sparsevecshow 8944160 fix empty show e72223d One-line show for SparseVector ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> | 16 October 2023, 12:09:42 UTC |
258ac46 | Ian Butterworth | 16 October 2023, 02:09:11 UTC | Add note about sysimage `__init__`s running before startup.jl (#51623) What caught me out in https://github.com/JuliaLang/julia/issues/51620 | 16 October 2023, 02:09:11 UTC |
0c4af32 | Lilith Orion Hafner | 16 October 2023, 01:34:52 UTC | Fix typos [nfc] (#51709) | 16 October 2023, 01:34:52 UTC |
ff03e51 | Paul Berg | 16 October 2023, 00:41:46 UTC | Allow using `ReturnNode()` in `@generated` code (#51715) IRTools.jl currently tries to use `ReturnNode()` to model unreachable block terminators but it fails in `find_ssavalue_uses`. This PR adds a check to enable using `ReturnNode()` in untyped code. One other alternative for frontends is to use an instruction known to terminate (`Core.throw`) instead. See https://github.com/FluxML/IRTools.jl/pull/115 for more context. | 16 October 2023, 00:41:46 UTC |
0acca3c | Keno Fischer | 15 October 2023, 19:21:33 UTC | Optimize away try/catch blocks that are known not to trigger (#51674) This leverages the support from #51590 to delete any try catch block that is known not to be triggered (either because the try-body is empty to because we have proven `:nothrow` for all contained statements). | 15 October 2023, 19:21:33 UTC |
4a1d74e | Valentin Churavy | 15 October 2023, 14:45:26 UTC | Add versions to all stdlibs (#51696) For upgradeable stdlibs we need versions numbers, let's add them now instead of after excision. | 15 October 2023, 14:45:26 UTC |
b1e711e | N5N3 | 15 October 2023, 13:56:22 UTC | Avoid `Style()` during broadcast whenever possible. (#51708) On master, `combine_styles(bc::Broadcasted)` calls `BroadcastStyle(typeof(bc))`, which seems bad after #49395 as it has a `Style()` call by default. | 15 October 2023, 13:56:22 UTC |
730450c | Alexis Montoison | 14 October 2023, 21:32:45 UTC | [LAPACK] Add a method to provide ipiv for sytrf! and hetrf! (#51705) It's similar to what we have with `getrf!` / `geqrf!` and the vectors `ipiv` / `tau`. | 14 October 2023, 21:32:45 UTC |
b050af1 | Sheehan Olver | 14 October 2023, 11:24:29 UTC | AbstractMatrix{T}(::SpecialMat{T}) should make a copy (#50495) Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> | 14 October 2023, 11:24:29 UTC |
1911c00 | Florian | 14 October 2023, 11:23:51 UTC | fix `eigvals,eigvecs,eigen` for `Diagonal{Matrix}` (#50897) | 14 October 2023, 11:23:51 UTC |
a3effa9 | Simeon Schaub | 13 October 2023, 21:28:14 UTC | add effects for `Cmd` constructor (#51543) These can't be synthesized automatically because the implementation uses mutation in a mix of loops and recursion Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> | 13 October 2023, 21:28:14 UTC |
3250804 | Steven G. Johnson | 13 October 2023, 20:11:34 UTC | clarify docs on for loops for general iterators (#51639) This PR updates the `for` loop documentation in the manual, in two ways: 1. It moves the information that `for` can loop over arbitrary containers up, before the more technical documentation about the scoping rules. I feel like the more basic information should go first. 2. It says a few more words about what a general iterator is, and gives an example of a `StepRange`. That's in response to [this discourse thread](https://discourse.julialang.org/t/julia-documentation-about-for-loop/104725) that non-unitrange loops are important for beginners but are somewhat buried. | 13 October 2023, 20:11:34 UTC |
97e3c5e | Steven G. Johnson | 13 October 2023, 18:46:59 UTC | mention .= in assignment-vs-mutation docs (#51681) This seemed like an omission from that section, in the paragraph listing syntaxes that mutate an object. --------- Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> | 13 October 2023, 18:46:59 UTC |
42fb22e | Tim Besard | 13 October 2023, 17:56:00 UTC | loader: Provide memset, and use hidden visibility instead of symbol renaming. (#51682) This ensures that the compiler may generate calls to these functions. | 13 October 2023, 17:56:00 UTC |
3df63a1 | Keno Fischer | 13 October 2023, 17:17:30 UTC | irinterp: Allow Expr(:boundscheck) in statement position (#51688) We didn't used to see these because :boundscheck in statement position would always taint consistency, but with the recent consistency refinement this is reachable, so it needs to be in the list. | 13 October 2023, 17:17:30 UTC |
8a847d5 | Valentin Churavy | 12 October 2023, 15:02:19 UTC | Revert "Reinstate load-time Pkg.precompile" (#51675) | 12 October 2023, 15:02:19 UTC |
e949236 | Lionel Zoubritzky | 12 October 2023, 11:15:22 UTC | Handle infix operators in REPL completion (#51366) Fix https://github.com/JuliaLang/julia/issues/51194 This PR fixes a regression introduced in https://github.com/JuliaLang/julia/pull/49294, so I believe it should be backported to v1.10. In the current code, completion of `qux(foo, bar.` is detected by parsing `foo(qux, bar` as an incomplete expression, and then looking for the sub-expression to complete (here, `bar.`). This approach fails however for infix calls, since completing `foo + bar.` starts by parsing `foo + bar`, which is a complete call expression, and so the code behaves as if completing `(foo + bar).` instead of `bar.`. This leads to the current problematic behaviour: ```julia julia> Complex(1, 3) + (4//5).#TAB im re ``` which would be correct for `(Complex(1, 3) + (4//5)).#TAB`, but here we expect ```julia julia> Complex(1, 3) + (4//5).#TAB den num ``` This PR fixes that by trying to detect infix calls. In the long term, all this ad-hoc and probably somewhat wrong string processing should be replaced by proper use of `JuliaSyntax` (as mentioned in https://github.com/JuliaLang/julia/pull/49294#issue-1659443492, https://github.com/JuliaLang/julia/issues/50817#issuecomment-1668773346 and probably other places), but for now at least this fixes the regression. | 12 October 2023, 11:15:22 UTC |
71872d1 | Jishnu Bhattacharya | 12 October 2023, 08:18:43 UTC | Forward `copyto!` for `Adjoint` to `adjoint!` (#51650) | 12 October 2023, 08:18:43 UTC |
a045313 | Ian Butterworth | 12 October 2023, 05:15:01 UTC | Reinstate load-time Pkg.precompile (#51672) | 12 October 2023, 05:15:01 UTC |
64a127d | Syx Pek | 11 October 2023, 16:05:24 UTC | Update link for reference for day to date conversions (#51651) Previous link is dead link --------- Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com> | 11 October 2023, 16:05:24 UTC |
3711749 | Keno Fischer | 11 October 2023, 14:41:22 UTC | lowering: Keep track of which :enter correspond to which :leave (#51590) This should be NFC and is intended to allow the optimizer to delete :enter statements (by replacing them with `nothing`), without leaving dangling `:leave`s around. This is accomplished by having `leave` take (a variable number of) `:enter` tokens (that are already being used by `:pop_exception`). The semantics are that a literal `nothing` or an SSAValue pointing to a `nothing` statement are ignored, and one exception handler is popped for each remaining argument. The actual value of the token is ignored, except that the verifier asserts that it belongs to an `:enter`. Note that we don't need to do the same for :pop_exception, because the token generated by an `:enter` is semantically only in scope for :pop_exception during its catch block. If we determine the `:enter` is dead, then its catch block is guaranteed to not be executed and will be deleted wholesale by cfg liveness. I was considering doing something fancier where :leave is changed back to taking an integer after optimization, but the case where the IR size is bigger after this change (when we are `:leave`ing many handlers) is fairly rare and likely not worth the additional complexity or time cost to do anything special. If it does show up in size benchmarks, I'd rather give `:leave` a special, compact encoding. | 11 October 2023, 14:41:22 UTC |
8180240 | Jaakko Ruohio | 11 October 2023, 13:55:53 UTC | Allow tab after key name in TOML.parse (#51622) Fixes https://github.com/JuliaLang/TOML.jl/issues/52 | 11 October 2023, 13:55:53 UTC |
72779b5 | Petr Vana | 11 October 2023, 13:52:20 UTC | Do not shrink `Dict`/`Set` in `merge!`/`union!` (#51629) | 11 October 2023, 13:52:20 UTC |
be1702e | Jakob Nybo Nissen | 11 October 2023, 13:51:34 UTC | Add eachrsplit iterator (#51646) Unlike rsplit, this iterator returns split substrings right to left, but other- wise it behaves just like eachsplit. This design has been chosen to avoid either a costly double traversal of the input string, or needing a stack to store the strings. Both of these workarounds would lessen the appeal compared to simply using rsplit. Closes https://github.com/JuliaLang/julia/issues/45385 | 11 October 2023, 13:51:34 UTC |
342e394 | Gabriel Baraldi | 11 October 2023, 13:18:54 UTC | Add debug_info_level to cgparams (#51484) | 11 October 2023, 13:18:54 UTC |
abf5d9e | Kristoffer Carlsson | 11 October 2023, 12:41:30 UTC | [LibCURL_jll] Upgrade to v8.4.0 (#51667) | 11 October 2023, 12:41:30 UTC |
1abafe8 | Alexis Montoison | 11 October 2023, 07:57:26 UTC | [OpenBLAS_jll] Upgrade to v0.3.24 (#51660) Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com> | 11 October 2023, 07:57:26 UTC |
e10c8f5 | DilumAluthgeBot | 10 October 2023, 16:56:01 UTC | 🤖 [master] Bump the Pkg stdlib from 3960c692b to b02fb9597 (#51652) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> | 10 October 2023, 16:56:01 UTC |
651aef9 | Tim Besard | 10 October 2023, 12:38:24 UTC | Use llvm::SmallVector instead of std::vector for bounds checking (#51579) This should catch issues like https://github.com/JuliaLang/julia/issues/51561, at least when running with `FORCE_ASSERTIONS := 1` (as PkgEval does). | 10 October 2023, 12:38:24 UTC |
f82f0d4 | Rafael Fourquet | 10 October 2023, 12:10:25 UTC | Random: allow string seeds (#51527) We used to be able to seed RNGs with a string, but that string was interpreted as the filename containing the actual seed. This was deprecated in #21359, in order to later allow using a string seed directly, which this patch does. --------- Co-authored-by: Nathan Zimmerberg <39104088+nhz2@users.noreply.github.com> | 10 October 2023, 12:10:25 UTC |
a857a86 | Rafael Fourquet | 10 October 2023, 12:03:35 UTC | make sure `rand(sampler, dims)` works (#51643) For any object `x` from which one can sample, the `Random` API also requires that `rand(rng, Sampler(typeof(rng), x), [dims])` works. So add tests for that, and fix `rand(Tuple{...})` accordingly, which was not using `SamplerTag` fully correctly. More precisely, the `Sampler` constructor for tuple types was returning a `SamplerTag` object whose `gentype` was returning the wrong type, leading to the wrong eltype of the output array for a call like `rand(rng, Sampler(rng, Tuple{...}), dims)`, so filling this array with random values was failing. | 10 October 2023, 12:03:35 UTC |
ecaf457 | Ian Butterworth | 10 October 2023, 06:49:02 UTC | srcfile module check: also allow single line docstrings (#51648) | 10 October 2023, 06:49:02 UTC |
6da54ce | Ian Butterworth | 09 October 2023, 21:25:33 UTC | Check that file being precompiled contains a module (#51635) | 09 October 2023, 21:25:33 UTC |
4115c72 | Tortar | 09 October 2023, 10:06:59 UTC | Create rand function for Base.KeySet and Base.ValueIterator{Dict} (#51608) Fixes #51605 . I also created a version of rand for `Base.ValueIterator{Dict}` which currently throws an error. | 09 October 2023, 10:06:59 UTC |
f4e1a15 | Jishnu Bhattacharya | 09 October 2023, 05:59:26 UTC | Use `oneto` instead of `OneTo` when constructing `LinearIndices` (#51578) This permits constructing `LinearIndices` for infinite arrays, for which the axes can't be a `Base.OneTo`: ```julia julia> using InfiniteArrays julia> L = LinearIndices(1:∞) ℵ₀-element LinearIndices{1, Tuple{InfiniteArrays.OneToInf{Int64}}} with indices OneToInf(): 1 2 3 4 5 6 7 8 9 10 ⋮ ``` | 09 October 2023, 05:59:26 UTC |
f90fd72 | Keno Fischer | 08 October 2023, 23:10:30 UTC | Main entrypoint take 3 - revenge of the macro (#51435) As they say, if at first you don't succeed, try again, then try again, add an extra layer of indirection and take a little bit of spice from every other idea and you've got yourself a wedding cake. Or something like that, I don't know - at times it felt like this cake was getting a bit burnt. Where was I? Ah yes. This is the third edition of the main saga (#50974, #51417). In this version, the spelling that we'd expect for the main use case is: ``` function (@main)(ARGS) println("Hello World") end ``` This syntax was originally proposed by `@vtjnash`. However, the semantics here are slightly different. `@main` simply expands to `main`, so the above is equivalent to: ``` function main(ARGS) println("Hello World") end @main ``` So `@main` is simply a marker that the `main` binding has special behavior. This way, all the niceceties of import/export, etc. can still be used as in the original `Main.main` proposal, but there is an explicit opt-in and feature detect macro to avoid executing this when people do not expect. Additionally, there is a smooth upgrade path if we decide to automatically enable `Main.main` in Julia 2.0. | 08 October 2023, 23:10:30 UTC |
e81c8e3 | Ujjwal gupta | 08 October 2023, 14:20:27 UTC | Docs: fix typos and grammar (#51547) doc: Corrected some sentences. --------- Co-authored-by: Christian Guinard <chguinard99@gmail.com> Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> | 08 October 2023, 14:20:27 UTC |
341e9d0 | Valentin Churavy | 07 October 2023, 22:53:10 UTC | Don't mark nonlocal symbols as hidden (#51596) Co-authored-by: Prem Chintalapudi <prem.chintalapudi@gmail.com> | 07 October 2023, 22:53:10 UTC |
aa42963 | Jameson Nash | 07 October 2023, 21:22:08 UTC | inference: better align type_more_complex with _limit_type_size for Type (#51600) A small further extension to #51512 to better align the internal behavior of the `_limit_type_size` and `type_more_complex` computations. | 07 October 2023, 21:22:08 UTC |
3bb0392 | Rafael Fourquet | 07 October 2023, 20:01:33 UTC | support random sampling of tuple types: add tests (#51630) This is a rebase of #35856, where we keep only the tests, as the functionality was added in #50251. This also adds the possibility to call `rand` on an empty tuple type: `rand(Tuple{})`. Co-authored-by: Stephan Hilb <stephan@ecshi.net> | 07 October 2023, 20:01:33 UTC |
e4c9031 | Rafael Fourquet | 07 October 2023, 20:00:04 UTC | add rand(::Type{<:Pair}) (#28705) This adds e.g. `rand(Pair{Int,Int})` producing a random pair of `Int`. | 07 October 2023, 20:00:04 UTC |
0296599 | Rafael Fourquet | 07 October 2023, 19:55:47 UTC | Random: better handling of the "global seed" (using TLS) (#51526) We maintain a "global seed" for this feature of `@testset`: > Before the execution of the body of a @testset, there is an implicit call to Random.seed!(seed) where seed is the current seed of the global RNG. Moreover, after the execution of the body, the state of the global RNG is restored to what it was before the @testset. This is meant to ease reproducibility in case of failure, and to allow seamless re-arrangements of @testsets regardless of their side-effect on the global RNG state. But since we don't use `MersenneTwister` as the "global RNG" anymore, we need to maintain a separate "global seed" object. So far we literally used a global object `Random.GLOBAL_SEED` storing the original seed, but it's not robust when multi-tasking is involved: e.g. ```julia seed!(0) x = rand() seed!(0) @sync begin @async @testset "A" begin seed!(1) # reset GLOBAL_SEED to V2 sleep(2) end # reset GLOBAL_SEED to its original value V1 sleep(0.5) @async @testset "B" begin # here seed!(2) above has already been called # so @testset B recorded value V2 as the "original" value of GLOBAL_SEED seed!(2) sleep(2) # here @testset A already finished end # reset GLOBAL_SEED to the wrong original value V2 end @testset "main task" begin # async tests didn't mutate this task's global seed @test x == rand() # fails! end ``` So we store here a "global seed" in `task_local_storage()`, which is set when `seed!()` is invoked without an explicit RNG, and defaults to `Random.GLOBAL_SEED`, which is set only once when `Random` is loaded. And instead of actually storing a seed, we store a copy of the RNG state. This is still not ideal, in that at the beginning of `@testset "A"` or `@testset "B"`, we can't do `@test x == rand()`, because these are in separate tasks, so the global seed defaults to `Random.GLOBAL_SEED`, and not to the global seed of the parent's task; there might be a nice way to handle that, but at least different tasks don't corrupt each-other's seeds. | 07 October 2023, 19:55:47 UTC |
fee7551 | Valentin Churavy | 07 October 2023, 18:36:00 UTC | Move Distributed out of Base (#51621) | 07 October 2023, 18:36:00 UTC |
41184cc | Jakob Nybo Nissen | 07 October 2023, 18:13:33 UTC | Fix typo in compat note (#51627) | 07 October 2023, 18:13:33 UTC |
60b10de | Ian Butterworth | 07 October 2023, 01:38:29 UTC | fix whitespace (#51625) From #51550 --------- Co-authored-by: Dilum Aluthge <dilum@aluthge.com> | 07 October 2023, 01:38:29 UTC |
fd21c96 | Ian Butterworth | 06 October 2023, 23:46:41 UTC | Highlight manifests from other versions when failing to find packages (#51613) | 06 October 2023, 23:46:41 UTC |
6fc6a97 | Valentin Churavy | 06 October 2023, 19:40:25 UTC | Add excise stdlib script (#51550) | 06 October 2023, 19:40:25 UTC |
1d6ee7e | Oscar Smith | 06 October 2023, 16:19:38 UTC | slightly speed up cartesian indexing (#51606) This is a minor simplification to the multidimensional iteration code that behaves slightly better in the presence of possible overflow (at least according to LLVM. This was found when looking into performance regressions caused by https://github.com/JuliaLang/julia/pull/51319 since that makes `Array` rely more on the regular multidimensional code rather than being special cased. This PR does remove/alter a few tests, but they are all tests of iteration when given an invalid iterator state which we specifically document as a thing that does not work. Co-authored-by: Jameson Nash <vtjnash@gmail.com> | 06 October 2023, 16:19:38 UTC |
5488b81 | Shuhei Kadowaki | 06 October 2023, 14:29:35 UTC | [REPLCompletions] fix #51548, set up a mode to limit the scope of the aggressive inference (#51581) It turns out that when using `REPLInterpreter` inference for tasks like evaluating (partially) interpolated paths in shell mode, we need to ensure accuracy of the inference result, requiring `REPLInterpreter` to disable its aggressive inference (xref: <https://github.com/JuliaLang/julia/pull/51581#issuecomment-1749732045>). To this end, this commit adds an optional argument `limit_aggressive_inference::Bool=false` to `repl_eval_ex`. This mode will allow future REPL completion code to utilize it when prioritizing correct inference results over a wider range of completion opportunities. Note that that mode is disabled by default, so our current completion capabilities are preserved. Fixes #51548. | 06 October 2023, 14:29:35 UTC |
3f23533 | Jameson Nash | 06 October 2023, 13:32:59 UTC | add an ability to suspend/resume a thread in a GC-safe way (#51489) This exposes the GC "stop the world" API to the user, for causing a thread to quickly stop executing Julia code. This adds two APIs (that will need to be exported and documented later): ``` julia> @ccall jl_safepoint_suspend_thread(#=tid=#1::Cint, #=magicnumber=#2::Cint)::Cint # roughly tkill(1, SIGSTOP) julia> @ccall jl_safepoint_resume_thread(#=tid=#1::Cint)::Cint # roughly tkill(1, SIGCONT) ``` You can even suspend yourself, if there is another task to resume you 10 seconds later: ``` julia> ccall(:jl_enter_threaded_region, Cvoid, ()) julia> t = @task let; Libc.systemsleep(10); print("\nhello from $(Threads.threadid())\n"); @ccall jl_safepoint_resume_thread(0::Cint)::Cint; end; ccall(:jl_set_task_tid, Cint, (Any, Cint), t, 1); schedule(t); julia> @time @ccall jl_safepoint_suspend_thread(0::Cint, 2::Cint)::Cint hello from 2 10 seconds (6 allocations: 264 bytes) 1 ``` The meaning of the magic number is actually the kind of stop that you want: ``` // n.b. suspended threads may still run in the GC or GC safe regions // but shouldn't be observable, depending on which enum the user picks (only 1 and 2 are typically recommended here) // waitstate = 0 : do not wait for suspend to finish // waitstate = 1 : wait for gc_state != 0 (JL_GC_STATE_WAITING or JL_GC_STATE_SAFE) // waitstate = 2 : wait for gc_state != 0 (JL_GC_STATE_WAITING or JL_GC_STATE_SAFE) and that GC is not running on that thread // waitstate = 3 : wait for full suspend (gc_state == JL_GC_STATE_WAITING) -- this may never happen if thread is sleeping currently // if another thread comes along and calls jl_safepoint_resume, we also return early // return new suspend count on success, 0 on failure ``` Only magic number 2 is currently meaningful to the user though. The difference between waitstate 1 and 2 is only relevant in C code which is calling this from JL_GC_STATE_SAFE, since otherwise it is a priori known that GC isn't running, else we too would be running the GC. But the distinction of those states might be useful if we have a concurrent collector. Very important warning: if the stopped thread is holding any locks (e.g. for codegen or types) that you then attempt to acquire, your thread will deadlock. This is very likely, unless you are very careful. A future update to this API may try to change the waitstate to give the option to wait for the thread to release internal or known locks. | 06 October 2023, 13:32:59 UTC |
0ab032a | Jameson Nash | 06 October 2023, 13:24:03 UTC | optimize: revise inlining costs (#51599) Add a bonus for Intrinsics called with mostly constant arguments. We know that simple expressions like `x*1 + 0` will get optimized later by LLVM, and also likely fold into other expressions, so try to reflect that in the cost estimated earlier. Additionally rebalance some of the other costs to more accurately reflect what they take in assembly. | 06 October 2023, 13:24:03 UTC |
f919e8f | kamesy | 06 October 2023, 09:27:20 UTC | Fix infinite loop when inputs are `Inf` (#51554) | 06 October 2023, 09:27:20 UTC |
0d494e4 | Daniel Karrasch | 06 October 2023, 09:19:27 UTC | Mention allocation of `R` factor from QR (#51400) Co-authored-by: Ian McInerney <i.mcinerney17@imperial.ac.uk> | 06 October 2023, 09:19:27 UTC |
5487046 | Tim Besard | 06 October 2023, 08:49:20 UTC | Add native support for BFloat16. (#51470) This PR adds native support for the LLVM `bfloat` type, through a new `BFloat16` type. It doesn't add any language-level functionality, only the bare minimum support (e.g. runtime conversion routines). Use of the BFloat16s.jl package is still required to use BFloat16 values. | 06 October 2023, 08:49:20 UTC |
20a5fa7 | Tim Besard | 05 October 2023, 15:14:12 UTC | Use a simple error when reporting sysimg load failures. (#51598) `jl_errorexception_type` is undefined at the point we (fail to) load a sysimg. | 05 October 2023, 15:14:12 UTC |
5bdc1b3 | Diogo Netto | 05 October 2023, 14:04:23 UTC | correctly track element pointer in heap snapshot (#51592) Fixes https://github.com/JuliaLang/julia/issues/51576 on a simple snapshot I collected on my machine. | 05 October 2023, 14:04:23 UTC |
91f8020 | Valentin Churavy | 05 October 2023, 13:45:57 UTC | Make REPL not slow-down if we load a valid cachefile (#51565) Fixes #51532. We have funny series of interactions. With the REPL and its dependencies being removed from the system image, we observed latency regressions when users create their own precompilation cache of REPL. During the precompilation of REPL we launch a subordinate process that we send statements too. Now we do want that process to use the existing cache of the REPL dependencies so we launch it with `--compiled-modules=existing`. Otherwise precompilation of REPL is even slower than it is now. When the user triggers recompilation of REPL due to the use of `-O3` the subordinate process sees a valid cache file for REPL itself. Thus no (or very few) precompilation statements are being generated. Leading to the cache file compiled with `-O3` to have a significant latency regression. In this PR I work around this by replaying the precompilation statements of REPL from the subordinate process. A bit hacky, but should be more reliable than trying to set up a "just right" depot, or filtering the REPL cache-file out. | 05 October 2023, 13:45:57 UTC |
0fd7f72 | Jishnu Bhattacharya | 05 October 2023, 12:52:47 UTC | Aggressive constprop in LinearAlgebra.wrap (#51582) This helps with type-stability, as the flag `tA` is usually known from the type of the matrix. On master, ```julia julia> f(A) = LinearAlgebra.wrap(A, 'N') f (generic function with 1 method) julia> @code_typed f([1;;]) CodeInfo( 1 ─ %1 = invoke LinearAlgebra.wrap(A::Matrix{Int64}, 'N'::Char)::Union{Adjoint{Int64, Matrix{Int64}}, Hermitian{Int64, Matrix{Int64}}, Symmetric{Int64, Matrix{Int64}}, Transpose{Int64, Matrix{Int64}}, Matrix{Int64}} └── return %1 ) => Union{Adjoint{Int64, Matrix{Int64}}, Hermitian{Int64, Matrix{Int64}}, Symmetric{Int64, Matrix{Int64}}, Transpose{Int64, Matrix{Int64}}, Matrix{Int64}} ``` This PR ```julia julia> @code_typed f([1;;]) CodeInfo( 1 ─ return A ) => Matrix{Int64} ``` | 05 October 2023, 12:52:47 UTC |
c18e485 | Oscar Smith | 05 October 2023, 12:29:49 UTC | reset `maxprobe` on `empty!` (#51595) As pointed out in https://github.com/JuliaLang/julia/issues/51594#issuecomment-1747781744, this is necessary for the assertion added in https://github.com/JuliaLang/julia/pull/49447 to be valid. Fix #51594 | 05 October 2023, 12:29:49 UTC |
25f510a | Jameson Nash | 05 October 2023, 05:30:14 UTC | avoid limiting Type{Any} to Type (#51512) Fix #51510 | 05 October 2023, 05:30:14 UTC |
165f728 | Matt Bauman | 04 October 2023, 21:20:08 UTC | annotate method from `@ccallable` with `@__doc__` (#51587) This allows you to attach a docstring to a `@ccallable` method definition. Fixes #51586 | 04 October 2023, 21:20:08 UTC |
f7e8f92 | Jeff Bezanson | 04 October 2023, 21:16:41 UTC | fix annotations on `sym_in` (#51573) This seems to be the right combination of annotations to fix both #50562 and an inference regression in PropertyDicts.jl on the 1.10 release branch. When backported the `@noinline` should be restored for 1.10. | 04 October 2023, 21:16:41 UTC |
9fb67c8 | Matt Bauman | 04 October 2023, 19:22:59 UTC | Improve deepcopy documentation to clarify reference behavior (#51569) The original text here: > For example, deep-copying an array produces a new array whose elements are deep copies of the original elements reads to me that its implementation would do something like `deepcopy(array) = [deepcopy(element) for element in array]`. That's the wrong mental model — we preserve relationships. This is tricky to talk about, but I think this gets at the crux of it. | 04 October 2023, 19:22:59 UTC |
b790cf8 | Valentin Churavy | 03 October 2023, 20:35:38 UTC | Revert "Don't mark nonlocal symbols as hidden" (#51571) | 03 October 2023, 20:35:38 UTC |
0dd8d43 | Valentin Churavy | 03 October 2023, 20:29:04 UTC | Move LazyArtifacts out of the mono-repo (#51549) | 03 October 2023, 20:29:04 UTC |
f2d1276 | Ian Butterworth | 03 October 2023, 12:04:36 UTC | Fix last startup & shutdown precompiles (#51557) | 03 October 2023, 12:04:36 UTC |
a988992 | Alexis Montoison | 03 October 2023, 10:30:07 UTC | [LAPACK] Update the dispatch of getrf! (#51486) `getrf!` should take the vector `ipiv` as input the same way that `geqrf!` uses the vector `tau`. | 03 October 2023, 10:30:07 UTC |
6a1af76 | Tim Besard | 03 October 2023, 00:30:03 UTC | Bump libunwind. (#51545) Fixes https://github.com/JuliaLang/julia/issues/51465, caused by https://github.com/libunwind/libunwind/pull/203. Ref https://github.com/JuliaPackaging/Yggdrasil/pull/7466 | 03 October 2023, 00:30:03 UTC |
ac8246f | pchintalapudi | 02 October 2023, 12:42:23 UTC | Don't mark nonlocal symbols as hidden (#51530) Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com> | 02 October 2023, 12:42:23 UTC |
7b83eac | Markus Kurtz | 02 October 2023, 11:16:02 UTC | Markdown Docs: specify necessary indent (#51456) Rationale: currently, the Markdown documentation specifies the necessary indent for code blocks and lists only. As there are people out there, who indent their lines by only two spaces (or whatever amount) documenting the indent could help in finding the reason for malformed Markdown. See #45622. For an example where this problem occurred see https://github.com/oscar-system/Oscar.jl/pull/1369#discussion_r893488230. | 02 October 2023, 11:16:02 UTC |
4119dcf | Benjamin Uekermann | 02 October 2023, 11:13:40 UTC | Fix copy-paste mistake in docs of Test (#51539) | 02 October 2023, 11:13:40 UTC |
6ce15fc | Jakob Nybo Nissen | 02 October 2023, 11:13:24 UTC | Fix string index error in tab completion code, fixes #51540 (#51541) | 02 October 2023, 11:13:24 UTC |
e9d633f | Mustafa Mohamad | 01 October 2023, 18:36:22 UTC | Update libc.jl compatability note (#51535) Update libc.jl compatability note to julia 1.11 | 01 October 2023, 18:36:22 UTC |
64fc7db | Takafumi Arakaki | 01 October 2023, 11:54:41 UTC | Add Libc.mkfifo (#34587) | 01 October 2023, 11:54:41 UTC |
b685650 | Jameson Nash | 01 October 2023, 11:14:04 UTC | fix some test noise that has been accumulating (#51508) | 01 October 2023, 11:14:04 UTC |
ca862df | Ian Butterworth | 30 September 2023, 21:12:35 UTC | fix `_tryonce_download_from_cache` (busybox.exe download error) (#51531) | 30 September 2023, 21:12:35 UTC |
a4562e6 | Shuhei Kadowaki | 30 September 2023, 19:05:02 UTC | [REPLCompletions] fix #51505, guard against empty tuple expression (#51522) | 30 September 2023, 19:05:02 UTC |
292562c | Shuhei Kadowaki | 30 September 2023, 15:39:23 UTC | [REPLCompletions] enable aggressive inference for uncached child frames (#51503) The REPL completion engine employs aggressive inference (incorporating aggressive global binding resolution and aggressive concrete evaluation, ignoring `:consistent`-cy), enabling completions in scenarios such as: ```julia julia> d = Dict{Symbol,Any}(:key => Any[Some(r"x")]) julia> d[:key][1].value.<TAB> compile_options match_options pattern regex ``` While this approach has proven to be quite effective, it has its limitations, given that aggressive inference was only activated for the top-level representing an input code. Therefore, it fails to apply to general cases like: ```julia julia> getkeyelem(d) = d[:key][1] julia> getkeyelem(d).<TAB> # no TAB completion ``` This limitation is the underlying cause of the first part of #51499. To rectify this, the commit implements the following: 1. generalizes aggressive inference to apply to all child frames, when they are not cached. 2. enables aggressive constant propagation, allowing the propagation of mutable Consts. With these changes, now we can get: ```julia julia> getkeyelem(d). # TAB completes julia> getkeyelem(d).value. compile_options match_options pattern regex ``` In conjunction with #51502, this resolves #51499. | 30 September 2023, 15:39:23 UTC |
f27619c | Gabriel Baraldi | 30 September 2023, 15:33:39 UTC | codegen: check addresspace before doing a bitcast for small tags (#51517) Fixes https://github.com/JuliaGPU/GPUCompiler.jl/issues/504. Similar to https://github.com/JuliaLang/julia/pull/38424 | 30 September 2023, 15:33:39 UTC |
af9a7af | Gabriel Baraldi | 30 September 2023, 15:27:10 UTC | Make allocopt respect the GC verifier rules with non usual address spaces (#51520) On AMDGPU, this was generating a `addrspace(10)` pointer to an `alloca` which is illegal and lead to other issues. | 30 September 2023, 15:27:10 UTC |
5006db1 | Alexander Plavin | 30 September 2023, 15:17:14 UTC | improve performance of searchsorted(range, lt=<) (#50365) No behavior change, just a performance improvement: searchsorted(range, lt=<) now performs exactly as fast as searchsorted(range). Passing lt=< allows searchsorted to find floating point values such as -0.0, so it's useful to make it fast - see https://github.com/JuliaLang/julia/issues/44102#issuecomment-1418152295. | 30 September 2023, 15:17:14 UTC |
d988f8f | Shuhei Kadowaki | 30 September 2023, 06:44:19 UTC | [REPLCompletions] suppress false positive field completions (#51502) Field completions can be wrong when `getproperty` and `propertynames` are overloaded for a target object type, since a custom `getproperty` does not necessarily accept field names. This commit simply suppresses field completions in such cases. Fixes the second part of #51499. | 30 September 2023, 06:44:19 UTC |
0a4bea6 | Shuhei Kadowaki | 30 September 2023, 04:36:37 UTC | compiler: remove unused `:noinbounds` argument (#51506) | 30 September 2023, 04:36:37 UTC |
ab992b9 | Rafael Fourquet | 29 September 2023, 20:06:36 UTC | MersenneTwister: hash seeds like for `Xoshiro` (#51436) This addresses a part of #37165: > It's common that sequential seeds for RNGs are not as independent as one might like. This clears out this problem for `MersenneTwister`, and makes it easy to add the same feature to other RNGs via a new `hash_seed` function, which replaces `make_seed`. This is an alternative to #37766. | 29 September 2023, 20:06:36 UTC |
3a85776 | Frames White | 29 September 2023, 19:28:59 UTC | fix out of place entry in NEWS.md (#51459) `pmap` is part of the Distributed std lib | 29 September 2023, 19:28:59 UTC |