https://github.com/JuliaLang/julia

sort by:
Revision Author Date Message Commit Date
671de9f set VERSION to 1.11.0-alpha1 (#53358) https://github.com/JuliaLang/julia/pull/53345 got messed up 01 March 2024, 08:30:50 UTC
2911937 Backports release 1.11 (#53472) Backported PRs: - [x] #53361 <!-- 🤖 [master] Bump the SparseArrays stdlib from c9f7293 to cb602d7 --> - [x] #53300 <!-- allow external absint to hold custom data in `codeinst.inferred` --> - [x] #53342 <!-- Add `Base.wrap` to docs --> - [x] #53372 <!-- Silence warnings in `test/file.jl` --> - [x] #53357 <!-- 🤖 [master] Bump the Pkg stdlib from 6dd0e7c9e to 76070d295 --> - [x] #53373 <!-- fix sysimage-native-code=no option with pkgimages --> - [x] #53333 <!-- More consistent return value for annotations, take 2 --> - [x] #53354 <!-- fix code coverage bug in tail position and `else` --> - [x] #53407 <!-- fix sysimage-native-code=yes option --> - [x] #53388 <!-- Fix documentation: thread pool of main thread --> - [x] #53355 <!-- Fix synchronization issues on the GC scheduler. --> - [x] #53429 <!-- Subtype: skip slow-path in `local_∀_∃_subtype` if inputs contain no ∃ typevar. --> - [x] #53437 <!-- Add debug variant of loader_trampolines.o --> - [x] #53284 <!-- Add annotate! method for AnnotatedIOBuffer --> - [x] #53466 <!-- [MozillaCACerts_jll] Update to v2023-12-12 --> - [x] #53467 <!-- [LibGit2_jll] Update to v1.7.2 --> - [x] #53326 <!-- RFC: when loading code for internal purposes, load stdlib files directly, bypassing DEPOT_PATH, LOAD_PATH, and stale checks --> - [x] #53332 - [x] #53320 <!-- Add `Sys.isreadable, Sys.iswriteable`, update `ispath` --> - [x] #53476 Contains multiple commits, manual intervention needed: - [ ] #53285 <!-- Add update mechanism for Terminfo, and common user-alias data --> Non-merged PRs with backport label: - [ ] #53424 <!-- yet more atomics & cache-line fixes on work-stealing queue --> - [ ] #53408 <!-- task splitting: change additive accumulation to multiplicative --> - [ ] #53403 <!-- Move parallel precompilation to Base --> - [ ] #53402 <!-- Add `jl_getaffinity` and `jl_setaffinity` --> - [ ] #53391 <!-- Default to the medium code model in x86 linux --> - [ ] #53125 <!-- coverage: count coverage where explicitly requested by inference only --> - [ ] #52694 <!-- Reinstate similar for AbstractQ for backward compatibility --> 01 March 2024, 08:30:18 UTC
d6bbf85 post-opt analysis: fix conditional successor visitation logic (#53518) Previously `conditional_successors_may_throw` performed post-domination analysis not on the initially specified `bb` (which was given as the argument), but on those BBs being analyzed that were popped from the work-queue at the time. As a result, there were cases where not all conditional successors were visited. fixes #53508 01 March 2024, 00:43:55 UTC
7ef180e protect against PkgId and UUID being imported and losing Base prefix in create_expr_cache (#53387) Fixes https://github.com/JuliaLang/julia/issues/53381 (cherry picked from commit a1db8daafd6c1a1179de77955167a6958a4c23b0) 29 February 2024, 09:19:22 UTC
0f0f8eb minor fixes on test/precompile.jl (#53476) These changes are driven-by fixes I found during investigating into a more complex issue related to precompilation with external abs int. 27 February 2024, 06:14:09 UTC
ba189d8 Add update mechanism for Terminfo, and common user-alias data (#53285) Now that we take care of terminfo parsing ourselves, having a clear origin and processing method for arriving at our reference terminfo data seems somewhat important. The original form was acquired by re-purposing some pre-processed terminfo data from NCurses (I forget the exact source). I considered adding a separate ingestion/processing script, but it occurred to me that it would make sense to have the method for updating the data file be _in_ the data file, by turning it into a quine. This seems to work rather well, and so long as the NCurses source file format stays the same, updating the terminfo data is now dead simple. While working on the terminfo files, some minor refactors popped up as "probably nice to have". One of which makes the reported number of flags/numbers/strings actually accurate. Lastly, to support the ergonomic use of capability variable names instead of the short (read: uninformative) capname, we now also import the NCurses-recognised extended capabilities, and generate/specify some nice aliases for them. ----- If we separate out the terminfo parser/data into a small stdlib, the state here will be the initial state of the repo. (cherry picked from commit 923fe2d74d469d73f0285a9cd41c88f90edd04d1) 26 February 2024, 10:21:42 UTC
7a95a0c Prevent tainting native code loading from propagating (#53457) When we use options like code coverage, we can't use the native code present in the cache file since it is not instrumented. PR #52123 introduced the capability of skipping the native code during loading, but created the issue that subsequent packages could have an explicit or implicit dependency on the native code. PR #53439 tainted the current process by setting `use_sysimage_native_code`, but this flag is propagated to subprocesses and lead to a regression in test time. Move this to a process local flag to avoid the regression. In the future we might be able to change the calling convention for cross-image calls to `invoke(ci::CodeInstance, args...)` instead of `ci.fptr(args...)` to handle native code not being present. --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> (cherry picked from commit b8a0a3978ccf163ce8fc371a4882547dc1271d53) 26 February 2024, 09:17:39 UTC
4141f35 staticdata: fix assert from partially disabled native code (#53439) This should fix the assertion failure that has been plaguing the Pkg tests, as discussed in https://github.com/JuliaLang/julia/pull/52123#issuecomment-1959965395 (cherry picked from commit 6cbed3198554381a6ed57b2d81f6c2ae0adfc4e5) 26 February 2024, 09:17:30 UTC
945c93f Add `Sys.isreadable, Sys.iswriteable`, update `ispath` (#53320) As discussed here: https://github.com/JuliaLang/julia/pull/53286#discussion_r1487039190 Readds the methods that were removed in https://github.com/JuliaLang/julia/pull/12819. (cherry picked from commit ea2b255b3e42fc9abee3a657f5a3f785beb9edff) 26 February 2024, 09:06:29 UTC
00cbe4a when loading code for internal purposes, load stdlib files directly(#53326) This bypasses DEPOT_PATH, LOAD_PATH, and stale checks when loading known stdlib code for known purposes from known locations, specifically to avoid the problem that I cannot fix my tools because I have used my tools to break my tools. This helps avoid the situation that the user can break important Pkg, REPL, Socket or similar features simply because they chose to remove `@stdlib` from their environment. For example, if you make an edit to REPL, then this will trigger recompilation and load the edited version: ``` $ ./julia -e 'using REPL' -iq ┌ Info: Precompiling REPL [3fa0cd96-eef1-5676-8a61-b3b8758bbffb] (cache misses: include_dependency fsize change (2), invalid header (10), mismatched flags (1)) └ @ Base loading.jl:2643 julia> ``` But this will load the version that shipped with Julia, regardless of the state of the cache or the source code (unless you delete the cache files): ``` $ ./julia -iq julia> ``` Fixes #53365 (cherry picked from commit ea1a0d2512be72a4568348e6b5fdfbbe687436c3) 26 February 2024, 09:05:33 UTC
103f96f add being able to pass a `CacheFlags()` to `isprecompiled` to verify a precompile file against a set of custom flags (#53332) (cherry picked from commit 9c0f1dc1e426008250415d5dd7aa155e9df1a75e) 26 February 2024, 09:04:25 UTC
923789b [LibGit2_jll] Update to v1.7.2 (#53467) Memo to self: * update version number in `stdlib/LibGit2_jll/Project.toml` * update test result in `stdlib/LibGit2_jll/test/runtests.jl` * update version number and commit sha in `deps/libgit2.version` * refresh checksums with `make -f contrib/refresh_checksums.mk -j libgit2` (cherry picked from commit 90d03b2bbec84488af7792258bf99fa2606b77a5) 26 February 2024, 09:03:12 UTC
d49cdf5 [MozillaCACerts_jll] Update to v2023-12-12 (#53466) Memo to self: * update the version in `stdlib/MozillaCACerts_jll/Project.toml` * update `MOZILLA_CACERT_VERSION` in `deps/libgit2.version` * generate new checksums with `make -f contrib/refresh_checksums.mk mozillacert` * manually delete old checksums in `deps/checksums/cacert-<OLD-VERSIONS>` (cherry picked from commit 669cbdce4e40e3d06b168323b97c003d75483ca9) 26 February 2024, 09:03:12 UTC
99ad63e Add annotate! method for AnnotatedIOBuffer (#53284) The annotate! function provides a convenient way of adding annotations to an AnnotatedString/AnnotatedChar without accessing any of the implementation details of the Annotated* types. When AnnotatedIOBuffer was introduced, an appropriate annotations method was added, but annotate! was missed. To correct that, we refactor the current annotate! method for AnnotatedString to a more general helper function _annotate! that operates on the annotation vector itself, and use this new helper method to easily provide an annotate! method for AnnotatedIOBuffer. (cherry picked from commit 6e1d062bccf0147b849461c7c09ddd03d94f71dc) 26 February 2024, 09:01:16 UTC
63ebed7 Add debug variant of loader_trampolines.o (#53437) This prevents a race condition when building 'julia-cli-debug julia-cli-release' simultaneously (as we do for libjulia_jll, and also generally seems appropriate given what is done for all other source files. Motivated by https://github.com/JuliaPackaging/Yggdrasil/pull/8151 so I'll first see if it works there. Closes #45002. (cherry picked from commit fee198beaba675772158ddc5faeeaf76beea612d) 26 February 2024, 09:01:16 UTC
d57e7f7 Subtype: skip slow-path in `local_∀_∃_subtype` if inputs contain no ∃ typevar. (#53429) This should be safe as ∀ vars' bounds are frozen in env. If there's no ∃ var, then the current env won't change after `local_∀_∃_subtype`. Thus, the slow path should be equivalent to the fast path if the latter returns 1. Close #53371. (cherry picked from commit 37c48e8b11d4742818571405019d80b59fceab49) 26 February 2024, 09:01:15 UTC
06e52c5 Fix synchronization issue on the GC scheduler (#53355) This aims to slightly simplify the synchronization by making `n_threads_marking` the sole memory location of relevance for it, it also removes the fast path, because being protected by the lock is quite important so that the observed gc state arrays are valid. Fixes: #53350 Fixes: #52757 Maybe fixes: #53026 Co-authored-by: Jameson Nash <vtjnash@gmail.com> (cherry picked from commit a96726b84d9dfcaec304c5643956a2e9d2176079) 26 February 2024, 09:01:15 UTC
2fdf5df Fix documentation: thread pool of main thread (#53388) See https://github.com/JuliaLang/julia/issues/53217#issuecomment-1930891907 (cherry picked from commit 8425b0ea03a4cbf4cfb677fb554b19d6a5a0eb03) 26 February 2024, 09:01:14 UTC
2d6c154 fix sysimage-native-code=yes option (#53407) Follow up to #53373, it seems this assert was broken for empty packages, causing CI issues. It is not necessary. Observed in CI here: https://github.com/JuliaLang/julia/pull/53395 https://buildkite.com/julialang/julia-master/builds/33860#018dc4dc-a603-4ad1-90cf-574540a41720 (cherry picked from commit 3742d33ecc9048bb925ad89020751702c45f18a2) 26 February 2024, 09:01:13 UTC
6af3596 fix code coverage bug in tail position and `else` (#53354) This was due to lowering keeping the same location info for the inserted `return` or `goto` statement, even though the last seen location might not have executed. Also fixes inliner handling of the sentinel `0` value for code locations. (cherry picked from commit 61fc907a225eb642fd180257a02e5951336dabe4) 26 February 2024, 09:01:13 UTC
f287e8a More consistent return value for annotations, take 2 (#53333) Relands #53281 with some fixes noticed, though not the original causes of the failure. (cherry picked from commit fbc766aa9869e914e9540f5ad5b7ec03ccfcd47d) 26 February 2024, 09:01:12 UTC
d5dcb94 fix sysimage-native-code=no option with pkgimages (#53373) Loading pkgimages would try to access the sysimage native code, which will fail. Ensure that no code tries to load if the sysimage native code is not available, as it may try to link against it. Fixes #53147 (cherry picked from commit 02699bb6cd83d16b1e51e2fb127241e18df7c56b) 26 February 2024, 09:01:11 UTC
43dc98a 🤖 [master] Bump the Pkg stdlib from 6dd0e7c9e to 76070d295 (#53357) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: 6dd0e7c9e New commit: 76070d295 Julia version: 1.12.0-DEV Pkg version: 1.11.0(Does not match) Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaLang/Pkg.jl/compare/6dd0e7c9e99d578aa5477e2c78c91a161ce4c357...76070d295fc4a1f27f852e05400bbc956962e084 ``` $ git log --oneline 6dd0e7c9e..76070d295 76070d295 Prevent repl crash on invalid command (#3800) d267986c2 RFC: stop testing non-ARM on mac on CI (#3794) 2571be6d1 CI: Add Apple Silicon (macOS aarch64) to the CI matrix (#3793) 3075fb78c Simplify Pkg.Registry APIs. (#3785) e6f1e0902 Explain about Manifest.toml per julia version (#3791) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> (cherry picked from commit 59102aa21e1b37cd116f12553876937dd080dcb1) 26 February 2024, 09:01:10 UTC
162bbfb silence warnings in tests introduced in #33593 (cherry picked from commit 4990429a1f038ebeda573181609745bf30c4a7d6) 26 February 2024, 09:01:10 UTC
008d109 add Base.wrap to docs (cherry picked from commit 2197b5c9ed926c20ca03c6bf6fa903edd96ab6b1) 26 February 2024, 09:01:09 UTC
913f7d5 allow external absint to hold custom data in `codeinst.inferred` (#53300) It has been possible for external abstract interpreters to keep custom data in `codeinst.inferred` (together /w overloading `inlining_policy`). After JuliaLang/julia#52233, when such external absint uses `InternalCodeCache`, this data is passed to `jl_ir_flag_inferred`, leading to segfaults in assertion builds. This commit resolves the issue by omitting `jl_ir_flag_inferred` checks when the `cache_owner` is external. Nonetheless, a better resolution might be necessary. It suggests that the current design of `code_owner` and `InternalCodeCache` for the external cache system is somewhat flawed. A conceivable approach could involve: - Adding a layer similar to `inlining_policy` in `CC.get(::WorldView{InternalCodeCache})` to enable safe redirection of custom data to the native interpreter's implementation. - Prohibiting custom data in the `inferred` field and directing such data to be kept in `analysis_results`. (cherry picked from commit 93876c92ed725272d8853d73dc0c3256095f1617) 26 February 2024, 09:01:08 UTC
7dad444 🤖 [master] Bump the SparseArrays stdlib from c9f7293 to cb602d7 (#53361) Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: c9f7293 New commit: cb602d7 Julia version: 1.12.0-DEV SparseArrays version: 1.11.0(Does not match) Bump invoked by: @dkarrasch Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaSparse/SparseArrays.jl/compare/c9f7293c10e6bea775feceabd4554ab55c34e3a8...cb602d7b7cf46057ddc87d23cda2bdd168a548ac ``` $ git log --oneline c9f7293..cb602d7 cb602d7 Add generic matmatmul for inplace sparse x sparse (#486) 95575c0 Speedup for `findmin()/findmax()` on sparse arrays (#510) (#511) 4cc31f2 Fix error message in getcommon() in cholmod (#509) 1748989 Move `fkeep!` docstring to the right function (#503) 1aa6431 Update ci.yml timeout (#507) 1f88ae1 Update ci.yml - add codecov token (#504) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> (cherry picked from commit ddd7afb95165b15f87b2c83e7862437d0a68272d) 26 February 2024, 09:01:07 UTC
aecd8fd Propagate inbounds in isassigned with CartesianIndex indices (#53305) Close #53302 --------- Co-authored-by: Matt Bauman <mbauman@juliahub.com> 16 February 2024, 02:40:57 UTC
4118db8 update `--pkgimages=existing` option in CLI section of manual (#53343) 16 February 2024, 02:40:26 UTC
e460d35 Support `signbit(::Dates.Period)` (#51073) 15 February 2024, 15:55:51 UTC
1b25d1e Add CartesianIndex to getindex docstring (#51567) Co-authored-by: Matt Bauman <mbauman@gmail.com> Co-authored-by: Denis Barucic <barucic.d@gmail.com> Co-authored-by: Jishnu Bhattacharya <jishnub.github@gmail.com> Co-authored-by: Max Horn <max@quendi.de> 15 February 2024, 15:25:31 UTC
c7eb766 minor refactoring on the `CustomAbstractInterpreterCaching` test case (#53329) By using `@newinterp`. Also ensures `cache_owner` for external abstract interpreter defined by `@newinterp` is unique always. 15 February 2024, 14:06:58 UTC
61c3521 More cautious legacy_color conversion in Logging (#53280) Can be seen as a follow-on from #51829, also wants https://github.com/JuliaLang/StyledStrings.jl/pull/37 to behave as expected. 15 February 2024, 10:26:34 UTC
7fcf9c8 Random: make statistical uniform tests fail less often (#52165) We have a very basic test to check that a distribution might be uniform: all the sampled elements should be unique, under certain conditions. But these conditions allowed the tests to fail too often. So allow one collision if the probability of such an event is too high. Fix #52156. --------- Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com> 15 February 2024, 02:38:27 UTC
2c0098e Cleanups for tagged code instance (#53336) Two small cleanups to #52233 - Don't use foreign code-instances for native code caching decision making - don't return a non-native codeinst for jl_method_compiled --------- Co-authored-by: Keno Fischer <keno@juliahub.com> 15 February 2024, 02:22:21 UTC
4c2633c Fix results.json generation after chunk-splitting (#53335) Should fix the problem raised in https://github.com/JuliaLang/julia/pull/53323#issuecomment-1943007134. 15 February 2024, 02:16:43 UTC
254f234 Merge duplicate entries in results.json (#53334) Should resolve #53198 🙂 15 February 2024, 02:16:03 UTC
c23be9a Update style-guide with invalid constructor example (#53328) 15 February 2024, 01:53:14 UTC
3e6ff3d add ability to specify heap size hint as a percent (#52979) also fix overflowed subtraction with size hints < 250mb --- we should pick some minimum soft heap limit; I chose 1mb here but it could be anything. 14 February 2024, 19:24:25 UTC
8eaf83c doc: clean up some example regex expressions (#26931) Remove some unnecessary parts of regex expressions used as examples in the docs. 14 February 2024, 18:14:07 UTC
a19fbac make dependencies of extensions be found in implicit environments (#53314) Alternative to https://github.com/JuliaLang/julia/pull/53293 This does kind of the same thing but it does not rely on `EXT_PRIMED` to identify extensions which I think is a better idea since we don't really want code lookup to depend on the state of Julia itself imo. Fixes https://github.com/JuliaLang/julia/issues/53264 ----------------------- Co-authored by: Mark Kittisopikul <`markkitti@fosstodon.org`> 14 February 2024, 12:47:41 UTC
52006ae Move isassigned within inbounds in copyto_unaliased (#53311) This matches the other branches where the `isassigned` and ` _unsetindex!` are within `@inbounds` blocks, and this might help with performance after https://github.com/JuliaLang/julia/pull/53305 14 February 2024, 12:13:56 UTC
09a27b3 AbsInt: add interfaces to customize cases when cached results are used (#53318) For external abstract interpreters like JET, which propagate custom data interprocedurally, it is essential to inject custom behaviors into where cached regular/constant inference results are used. Previously, this was accomplished by overloading both `abstract_call_method` and `get(::WorldView{CustomView}, ...)` (and `const_prop_call` and `cached_lookup`), that method was admittedly hacky and should probably better to be avoided. Moreover, after #52233, doing so has become infeasible when the external abstract interpreter uses `InternalCodeCache`. To address this issue, this commit provides an interface named `return_cached_result`. This allows external abstract interpreters to inject custom interprocedural data propagation during abstract interpretation even when they use `InternalCodeCache`. 14 February 2024, 10:17:39 UTC
4a13e9e Clarify the difference between collect and bracket notation for generators (#50619) As a follow-up to my question on the forum [Unclear documentation of `collect`? (similarity and difference with brackets)](https://discourse.julialang.org/t/unclear-documentation-of-collect-similarity-and-difference-with-brackets/), here is a tentative expansion of the docstring of `Base.collect` to clarify both the similarities and differences with the bracket notation for generators. I'm pretty sure it needs so edits, but here are the motivating factors behind the changes, by decreasing order of importance: 1. avoid the presence of bracket notation in the example without explanation (in the present docstring, I find it highly *implicit*) 2. simplification of examples to focus on the topic (and not on range syntax or filtering in comprehensions) 3. avoid wasting vertical space by using longer than needed iterators/generators Feedback on my formulation is welcome! --------- Co-authored-by: Max Horn <max@quendi.de> Co-authored-by: Jishnu Bhattacharya <jishnub.github@gmail.com> 14 February 2024, 10:11:53 UTC
aaed1cc allow passing command line flags to `compilecache`. (#53316) Pkg right now has to start a separate process to run precompilation for the test environment which is annoying for multiple reasons Corresponding Pkg PR: https://github.com/JuliaLang/Pkg.jl/pull/3792 14 February 2024, 06:43:02 UTC
90afb7c split results.json into 5000 result partitions (#53323) Re. https://github.com/JuliaCI/julia-buildkite/pull/338#issuecomment-1942542712 14 February 2024, 00:14:44 UTC
288912a Add Juliaup docs (#50477) 13 February 2024, 23:16:48 UTC
ba34d89 Add `conj!` for arrays of arrays (#53303) Apparently, `broadcast!(conj!, A, A)` is not allocation-free, so I spelled it out, but perhaps there's a more elegant solution. 13 February 2024, 15:33:06 UTC
d7b9ac8 change IOBuffer to use Memory internally (#53192) An Array is often still allocated on output, but this gives the compiler a chance to potentially elide that in certain cases. For measurement, it seems about 10% faster as a string builder: ``` julia> @btime repr("hello\nworld"^10); 1.096 μs (10 allocations: 640 bytes) # master 973.000 ns (9 allocations: 608 bytes) # PR 994.000 ns (8 allocations: 576 bytes) # also PR, after Revise-ing Base.wrap ``` 13 February 2024, 15:32:15 UTC
81c3474 Revert "More consistent return value for annotations" (#53309) Reverts JuliaLang/julia#53281 as it appears to have broken CI on all subsequent commits: https://github.com/JuliaLang/julia/pull/53281#issuecomment-1938071915 According to the CI logs, it is this test that aborts early on in the rr-trace log: ``` Pkg.test(TEST_PKG.name; coverage = coverage_path) ``` 13 February 2024, 14:45:02 UTC
d211398 Fix FileWatching tests on FreeBSD (#53307) #49937 optimistically enabled some file watcher tests on FreeBSD due to changes made in libuv that suggested it should work, but unfortunately it does not. 13 February 2024, 12:43:21 UTC
38065a4 Set LLVM issue tracker URL to Julia's issue tracker (#53128) This patch sets the default issue tracker URL for LLVM to Julia's issue tracker. LLVM issues coming from Julia should probably go through Julia's issue tracker first and then can be reported upstream if there is an issue with something in upstream LLVM. Having this set to the default is moderately confusing for users as it refers to the LLVM issue tracker, which probably isn't wanted. 13 February 2024, 04:26:46 UTC
69f16a2 Update logging.jl to add docstrings for exported symbols (#53299) This is a part of issue #52725. 13 February 2024, 02:19:55 UTC
54e9728 llvmunwind: use LLVM_PATH instead of LLVM_CONFIG_PATH variable (#53304) with llvm-16, the `--src-root` argument of llvm-config has been removed. see https://github.com/llvm/llvm-project/commit/c061892fcdbdfe46884c54a7a7bfe6df54d1df12 but `llvmunwind` was using it for configuration. so prefer to use `LLVM_PATH` and explicitly pass the llvm source directory. 13 February 2024, 02:18:25 UTC
1fd0981 Trim hash map size when pruning type caches (#53296) This doesn't make much of a difference for the smaller type caches (many of which have exactly 1 element actually), but it does offer up to ~75% savings (8192 -> 2048, 4096 -> 512) for some of the larger type caches in our sysimage. 13 February 2024, 02:17:37 UTC
75cb2a5 eliminate the dead `iterate` branch in `_unsafe_(get)setindex!`. (#52809) It's sad that compiler can't do this automatically. Some benchmark with `setindex!`: ```julia julia> a = zeros(Int, 100, 100); julia> @btime $a[:,:] = $(1:10000); 1.340 μs (0 allocations: 0 bytes) #master: 3.350 μs (0 allocations: 0 bytes) julia> @btime $a[:,:] = $(view(LinearIndices(a), 1:100, 1:100)); 10.000 μs (0 allocations: 0 bytes) #master: 11.000 μs (0 allocations: 0 bytes) ``` BTW optimization for `FastSubArray` introduced in #45371 still work after this change as the parent array might have their own `copyto!` optimization. 13 February 2024, 02:16:16 UTC
e8bf9bc Add more @showarg examples (#52410) Adds a few more examples to show how `@showarg` works with literals and interpolated string expressions. 13 February 2024, 02:12:56 UTC
dba215f Strengthen docs for `reinterpret` (#52157) As suggested in #52135, I've added some to the `reinterpret` docs. 13 February 2024, 02:11:58 UTC
e6992f7 Add `Iterators.cycle(iter, n)` (#47354) At present `Iterators.repeated(iter, n)` is the lazy cousin of `fill(iter, n)`, but there is no iterator for `repeat(iter, n)`. This PR proposes that `Iterators.cycle(iter, n)` should fill that role. This relates to the one-argument form in the same way as `Iterators.repeated`. That is, `cycle(iter)` means `cycle(iter, Inf)` in the same way that `repeated(iter)` means `repeated(iter, Inf)`... or would be if Inf were an integer. The implementation uses `flatten(repeated(xs, n))`. It could instead use `take(cycle(xs), n * length(xs))` but that only works when the contents has known length. `take(cycle...)` tends to be faster, perhaps it should be used when possible? Some timing below. But perhaps this detail is a secondary question. <details> ```julia julia> takecycle(x, n::Int) = Iterators.take(Iterators.cycle(x), n * length(x)); julia> flatrep(x, n::Int) = Iterators.flatten(Iterators.repeated(x, n)); # as in PR, first commit julia> takecycle(1:10, 100) |> length 1000 julia> flatrep(1:10, 100) |> Base.haslength # and won't be helped by 47353 false julia> @btime collect(takecycle(1:10, 100)); min 1.642 μs, mean 2.554 μs (1 allocation, 7.94 KiB) julia> @btime collect(flatrep(1:10, 100)); min 6.617 μs, mean 9.107 μs (6 allocations, 21.86 KiB) julia> flatrep(Tuple(1:10), 100) |> Base.haslength # behaves better with tuples, but not faster: true julia> @btime collect(takecycle($(Tuple(rand(10))), 100)); min 1.100 μs, mean 1.977 μs (1 allocation, 7.94 KiB) julia> @btime collect(flatrep($(Tuple(rand(10))), 100)); min 10.458 μs, mean 11.220 μs (1 allocation, 7.94 KiB) ``` </details> 13 February 2024, 01:50:05 UTC
56e193e tempdir: error on non-directory result (#33593) Potential more graceful handling of https://github.com/JuliaLang/julia/issues/33382. I thought about creating the directory if it doesn't exist, but that seems aa bit questionable. Probably better to let the user know about the situation in a clear way so they can mitigate it. An even better improvement would be if we could tell them which environment variable to look at. I tried setting `TEMP` in the environment on macOS but it didn't seem to have any effect on the result. --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 13 February 2024, 00:12:46 UTC
81c6526 Fix typo in `Sys.total_memory` docstring. (#53301) Fixes #53298. 12 February 2024, 18:44:06 UTC
f8d5947 Documentation update for LinearAlgebra functions (#52934) Documentation update for LinearAlgebra functions, see #52725 - [X] Pivoting strategies - [X] `NoPivot` - [X] `RowNonZero` - [X] `ColumnNorm` - [X] `RowMaximum` - [X] Matrix multiplication functions - [X] `copy_transpose!` - [X] `copyto!` Note: `copyto!` is not mentioned in the original issue. However, it is felt that `copy_transpose!` without the complementing `copyto!` will be confusing for a reader. - [X] Exceptions - [X] `LAPACKException` - [X] `RankDeficientException` Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 12 February 2024, 17:21:15 UTC
29a58d5 Improve docstrings for `Int`, `Float64`, `^`, and friends (#45221) This extends the docs for `Int`, `Float64` etc, to * Note that Int is the default, mention that it can overflow * Explain what `1f0` means, and that Float64 is the default Similarly extends docs for `^`, `+`, `*` aiming to * Point out that `1.2 * 10^3` is a bad habit, warn about overflow * Give an example for what `literal_pow` is doing since the explanation is quite technical * Also point out overflow in `+`, as [suggested here](https://github.com/JuliaLang/julia/pull/45141#discussion_r862808888) * While there, mention that you can add vectors, and that vararg `+(1,2,3,4)` has a default binary behaviour * Similarly mention that vararg `*(1,2,3,4)` has a default order, from the left * While there, mention `1/2pi` and `v'v` as examples of `*`. --------- Co-authored-by: Lilith Orion Hafner <lilithhafner@gmail.com> 12 February 2024, 14:03:37 UTC
61bf208 follow up #52868 and fix up doc/src/base/base.md (#53294) 12 February 2024, 10:56:26 UTC
0a89164 Restrict vector indexing of views to 1-based ranges (#53249) This will be an offset array in general, so we need to restrict the method to 1-based ranges. This restores the behavior on `v"1.10"`. The method was added in #45371 12 February 2024, 02:14:23 UTC
d6396f1 doc: in constructors, note the correspondence with callable objects (#53051) 12 February 2024, 02:11:28 UTC
987d6f3 Update probes.md to remove workaround mention (#53160) Given #41616 merged, remove reference to it in doc example 12 February 2024, 01:43:52 UTC
8500356 Add more doc examples for `cat` (#47409) - `cat` 2 2D arrays - `cat` 2 3D arrays - `cat` 2 strings 12 February 2024, 01:41:41 UTC
a459926 Make zero on array of arrays etc apply recursively (#51458) I wonder if this breaks things, in practice. It shouldn't. Since old code behavior errored for the cases I am aware of. As discussed in #38064, this definition is needed to be consistent with our other linear algebra operations, and with us considering a vector of vectors etc as a vector space. Closes #38064 12 February 2024, 01:41:01 UTC
57f02bf Add `Lockable` to Base, to bundle a lock with its resource (#52898) I am not sure about a `lock(f, ::Lockable)` method: it is nice because it unpacks the value for you, but it is weird because it unpacks the value for you. For a `Lockable`, `f` must accept one argument, whereas for a `Lock`, `f` must be 0-arg. A `Lockable` is not `<:AbstractLock` here, so maybe this is allowed, but if we deleted this `lock` method, we could inherit from `AbstractLock` and just use the generic one (requiring folks to unpack the value within the locked region themselves, as is the case for `@lock`). I think it is preferred these days to use `@lock` anyway, so having the `lock(f, ::Lockable)` method may be of limited value anyway. I searched Base and came up with two places that could currently use this internally, `TEMP_CLEANUP` and `env_dict`. We didn't add them both as usages yet, to avoid external breakage from delaying this PR. Similarly, this is not exported yet, to avoid breakage with older releases of ConcurrentUtilities.jl. redo of https://github.com/JuliaLang/julia/pull/34400 First commit copied from https://github.com/JuliaServices/ConcurrentUtilities.jl/blob/main/src/lockable.jl, Closes #52897 Co-authored-by: Jacob Quinn <quinn.jacobd@gmail.com> Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 12 February 2024, 01:33:29 UTC
a86edf1 Add existing 3-arg `*` docstring to the manual (#53288) PR #37898 added methods to `*` for chained matrix multiplication. They have a descriptive docstring but I don't think this is mentioned in the manual. 12 February 2024, 01:24:59 UTC
3412c86 Fix seekend method of AnnotatedIOBuffer (#53282) A minor oversight had it returning the underlying IOBuffer originally. 12 February 2024, 01:08:47 UTC
e1a76bb More consistent return value for `annotations` (#53281) This is a generally nice simplification, that tweaks the `annotations` API. It also requires the adjustment in https://github.com/JuliaLang/StyledStrings.jl/pull/38 to be made, hence the bump. 12 February 2024, 00:56:30 UTC
86c0191 Tests: rename Foo test pkg (#53289) Encountered another instance of a flaky `Foo.jl` test pkg which caused me trouble locally. Xref: https://github.com/JuliaLang/julia/issues/53103#issuecomment-1915458694 11 February 2024, 23:25:48 UTC
002f07a Improve the annotated join method and dispatch (#51914) With the initial implementation, join could work for AnnotatedStrings, however only when the eltype of the iterator or delim was itself a Annotated{String,Char}. This was better than nothing, but seems inconsistent in the face of mixed iterators. Furthermore, the implementation of an annotated join was far from optimised, relying on zipping and then calling annotatedstring(xs...). By contrast, the non-annotated implementation relies on printing to IO and even has manually defined alternative methods for optional arguments to minimise code generation. With the advent of AnnotatedIOBuffer and _isannotated, we can improve on both those aspects. The new AnnotatedIOBuffer type allows us to re-use the optimised join(::IO, ...) methods, and we can more reliably dispatch to them with _isannotated. Since this is a type-based decision, the Julia compiler is kind enough to work out which branch is taken at compile-time, making this zero-overhead in the unannotated case. 11 February 2024, 22:42:31 UTC
efa77cc Predicate versions of `allequal` & `allunique` (#47679) First, use `Iterators.peel` to improve `allequal(itr)` as suggested by jlapeyre in here: https://github.com/JuliaLang/julia/issues/47005#issuecomment-1276477572 After that, `allequal(f, xs) = allequal(f(x) for x in xs)` should never call `f` twice on the same `x`, nor more times than necessary. For `allunique`, at present this has a path which collects short iterators (<32) as this is faster than making a `Set`. Thus calling `allunique(f(x) for x in xs)` will sometimes call `f` more times than it has to. This PR doesn't change that, just adds a method `allunique(f, xs)`. Since generators tend to have eltype `Any`, it pays to use `Set{@default_eltype(C)}()` now. I think this ought to be safe. Finally, methods `allequal(f, xs::Tuple)` and `allunique(f, xs::Tuple)` seem to be worthwhile. [This gist](https://gist.github.com/mcabbott/69c0b85cdf0a37d97eecba3edb18bdc0) times a few variants. Closes #47005, and does the same for `allunique` 11 February 2024, 22:33:43 UTC
c4bec9a Missing tests for TwicePrecision (#34938) Co-authored-by: Tim Holy <tim.holy@gmail.com> 11 February 2024, 18:44:25 UTC
3560036 Docs: add `Logging.BelowMinLevel` and `Logging.AboveMaxLevel` to the manual page for the Logging stdlib (#52232) According to the source code file, `Logging.BelowMinLevel` and `Logging.AboveMaxLevel` are already part of the public API of the Logging stdlib: https://github.com/JuliaLang/julia/blob/c8ca350832030992fca113ed56d979b6a8ff7fd3/stdlib/Logging/src/Logging.jl#L85-L91 Additionally, Logging currently exports `BelowMinLevel` and `AboveMaxLevel`: https://github.com/JuliaLang/julia/blob/c8ca350832030992fca113ed56d979b6a8ff7fd3/stdlib/Logging/src/Logging.jl#L61-L81 However, `Logging.BelowMinLevel` and `Logging.AboveMaxLevel` are not currently in the manual. This PR adds them to the manual. --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> 11 February 2024, 18:43:47 UTC
1f1436d Prefer `# Examples` in docstrings (#53276) ... as suggested by the Julia manual and by `CONTRIBUTING.md` In one case `# Example` was dropped (instead of appending an `s`) because it was redundant. 11 February 2024, 18:16:40 UTC
790a4eb document exactness for `typeintersect(T, S)` when `T <: S` (#53283) As per the discussion in #53265. 11 February 2024, 18:16:25 UTC
a37d626 Clarify that command-line switches need to be manually set in `addprocs` (#50843) Co-authored-by: Max Horn <max@quendi.de> 11 February 2024, 15:52:54 UTC
37ed82b Mark codeinstance.specsigflags as atomic (#53275) A correctness fix from #53255 This shouldn't matter much as that field is only accessed from the runtime, but this synchronizes the C-header definition, with the Julia native definition. 11 February 2024, 14:08:13 UTC
af90dac Add unary negation in table of operator precedence and associativity (#49438) Co-authored-by: Jameson Nash <vtjnash@gmail.com> 11 February 2024, 03:56:08 UTC
b8540d1 [REPL] Fix typo in using/import completion (#53273) Co-authored-by: Keno Fischer <keno@juliahub.com> 11 February 2024, 03:53:23 UTC
4be67e4 export `IdSet` and document it (#53262) It feels kind of odd to have `IdDict` exported and documented and not `IdSet`. 11 February 2024, 01:34:59 UTC
a3e0b62 Use tagged CodeInstances for AbstractInterpreter caching (#52233) Currently external AbstractInterpreters all follow the pattern that `CACHE = IdDict{MethodInstance,CodeInstance}`. The NativeInterpreter has the benefit that each `MethodInstance` carries an inline cache of `CodeInstances`. `CodeInstances` pull triple duty, they contain validity information (`min_world`, `max_world`), the inference state cache and the compilation state cache. When we currently create a CodeInstance we don't record the owner and we thus construct detached CodeInstances. In this PR I introduce the notion of tagging the code instances with the owner (nothing meaning native), thus allowing foreign code instances to be stored in the inline cache. GPUCompiler/CUDA would change it's caching strategy from `IdDict{MethodInstance, CodeInstance}` to `IdDict{CodeInstance, LLVM.Module}` or similar. Ideally we would allow polymorphism for the compilation state part of the code instance, but that seems to invasive for now. This has the benefit that CodeInstances are handled by caching and it would allow us to cache inference results from foreign abstract interpreters across sessions. The downside is that the cache walk now is a bit slower since we need to filter on owner. If this turns out to be a large bottleneck we could bifurcate the cache on owner. Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com> 10 February 2024, 22:35:36 UTC
e5496e0 update libuv to v2-1.48.0 (#49937) Notable additions: - Linux now uses io_uring for many fs calls - Windows now supports WTF-8 - new cross-platform uv_clock_gettime API - Windows now emits a coredump when sending SIGQUIT, if configured - Windows now can execute file given by an exact path name that do not contain a `.` (unlike cmd.exe, which cannot) Closes #47611 Fixes #33486 10 February 2024, 20:26:47 UTC
604609a Add docstring to constants in `Base.Filesystem` (#53247) A first step towards https://github.com/JuliaLang/julia/issues/52725 for `Base.Filesystem`. 10 February 2024, 19:26:18 UTC
a78b8e3 bypass assignments in edit, code_warntype and friends (#52046) It was suggested in the original issue that the binding should still occur, but for consistency with `@edit f(2)` which doesn't actually call `f`, this does not. Fixes #20270 10 February 2024, 19:17:53 UTC
5114441 [GMP_jll] Upgrade to v6.3.0 (#53270) 10 February 2024, 19:10:09 UTC
a59f219 doc: float: add note for NaN compare with egal (#53194) Current documentation seems to imply that one should use `===` for NaN comparisons. But non-normalized NaNs will give unexpected results: `NaN32p1 !== NaN32`. 10 February 2024, 18:26:28 UTC
8e70bf1 Add documentation for some documentation forms. (#50679) There are a couple of documentation forms that are used in the wild but not covered by the documentation. Here I describe them. 10 February 2024, 18:23:09 UTC
65ffa79 `names` docstring: qualify non-exported cross-refs (#52745) It seems like cross-references to non-exported symbols, like `ispublic`, should be qualified — otherwise it is confusing since looking them up fails. Co-authored-by: Max Horn <max@quendi.de> 10 February 2024, 18:11:40 UTC
35768c2 Fix interpreter_exec.jl test (#53218) This test was supposed to check that we correctly handled PhiNodes in uninferred code in both the interpreter and the compiler. However, the compiler path wasn't actually exercised, because the `inferred=true` part of this forced it to be skipped. Drop that and fix the exposed issues in the compiler where we didn't handle PhiNodes properly. --------- Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com> Co-authored-by: Jameson Nash <vtjnash@gmail.com> Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 10 February 2024, 17:41:57 UTC
3a283d9 document Base.Chars arguments of startswith/endswith (#52741) Since Julia 0.3 (#6779), the `startswith` and `endswith` functions have accepted not only a string as the prefix/suffix, but also a character or a tuple/vector/set of characters. However, this wasn't fully documented. (The docstring actually mentioned vectors and sets of characters, but this was inconsistent with the given signature.) Also updates `Base.Chars` to allow `AbstractSet` types, not just `Set`, which seems to have been an oversight. 10 February 2024, 14:55:04 UTC
baa36e4 add --compiled-modules=strict option (#52174) This is useful for ensuring that all modules were precompiled successfully. 10 February 2024, 14:47:20 UTC
a333f1c Update `unique` and `unique!` docstrings to mention `hash` function (#52159) 10 February 2024, 09:44:38 UTC
5d9a472 additional clarification on cfunction embedding (#52315) Additional clarification to #45208 — in addition to some punctuation tweaks, I added a sentence noting that using `@cfunction` to construct and C function pointers, unlike `jl_call`, eliminates the overhead of dynamic dispatch. See also [this discourse thread](https://discourse.julialang.org/t/jl-call-function-call-latency/106791). 10 February 2024, 09:06:15 UTC
e177fc3 Fix sortperm(::OffsetRange) (#53208) 10 February 2024, 06:37:32 UTC
8922eaa Allow overriding default value of `JL_STACK_SIZE` (#53254) Occasionally, users may want to be able to customize the default per-task stack size. While this is a somewhat unusual thing to do, this plumbs through support for this to be set at the `Make.user` level, rather than having to modify `CFLAGS` or `src/options.h` directly. 10 February 2024, 03:48:27 UTC
back to top