Skip to content

Commit 915d62e

Browse files
edit NEWS for 1.11 (#53423)
Co-authored-by: Shuhei Kadowaki <[email protected]>
1 parent 671de9f commit 915d62e

File tree

1 file changed

+126
-70
lines changed

1 file changed

+126
-70
lines changed

NEWS.md

Lines changed: 126 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,96 @@
11
Julia v1.11 Release Notes
2-
========================
2+
=========================
33

44
New language features
55
---------------------
6+
7+
* New `Memory` type that provides a lower-level container as an alternative to `Array`.
8+
`Memory` has less overhead and a faster constructor, making it a good choice for situations
9+
that do not need all the features of `Array` (e.g. multiple dimensions).
10+
Most of the `Array` type is now implemented in Julia on top of `Memory`, leading to
11+
significant speedups for several functions (e.g. `push!`) as well as more maintainable code ([#51319]).
612
* `public` is a new keyword. Symbols marked with `public` are considered public
713
API. Symbols marked with `export` are now also treated as public API. The
814
difference between `public` and `export` is that `public` names do not become
915
available when `using` a package/module ([#50105]).
1016
* `ScopedValue` implements dynamic scope with inheritance across tasks ([#50958]).
11-
* The new macro `Base.Cartesian.@ncallkw` is analogous to `Base.Cartesian.@ncall`,
12-
but allows to add keyword arguments to the function call ([#51501]).
13-
* Support for Unicode 15.1 ([#51799]).
14-
* Three new types around the idea of text with "annotations" (`Pair{Symbol, Any}`
15-
entries, e.g. `:lang => "en"` or `:face => :magenta`). These annotations
16-
are preserved across operations (e.g. string concatenation with `*`) when
17-
possible.
18-
* `AnnotatedString` is a new `AbstractString` type. It wraps an underlying
19-
string and allows for annotations to be attached to regions of the string.
20-
This type is used extensively in the new `StyledStrings` standard library to
21-
hold styling information.
22-
* `AnnotatedChar` is a new `AbstractChar` type. It wraps another char and
23-
holds a list of annotations that apply to it.
24-
* `AnnotatedIOBuffer` is a new `IO` type that mimics an `IOBuffer`, but has
25-
specialised `read`/`write` methods for annotated content. This can be
26-
thought of both as a "string builder" of sorts and also as glue between
27-
annotated and unannotated content.
2817
* `Manifest.toml` files can now be renamed in the format `Manifest-v{major}.{minor}.toml`
2918
to be preferentially picked up by the given julia version. i.e. in the same folder,
3019
a `Manifest-v1.11.toml` would be used by v1.11 and `Manifest.toml` by every other julia
3120
version. This makes managing environments for multiple julia versions at the same time
3221
easier ([#43845]).
33-
* `@time` now reports a count of any lock conflicts where a `ReentrantLock` had to wait, plus a new macro
34-
`@lock_conflicts` which returns that count ([#52883]).
22+
* Support for Unicode 15.1 ([#51799]).
3523

3624
Language changes
3725
----------------
38-
* During precompilation, the `atexit` hooks now run before saving the output file. This
39-
allows users to safely tear down background state (such as closing Timers and sending
26+
27+
* During precompilation, `atexit` hooks now run before saving the output file. This
28+
allows users to safely tear down background state (such as closing `Timer`s and sending
4029
disconnect notifications to heartbeat tasks) and cleanup other resources when the program
4130
wants to begin exiting.
4231
* Code coverage and malloc tracking is no longer generated during the package precompilation stage.
4332
Further, during these modes pkgimage caches are now used for packages that are not being tracked.
4433
This means that coverage testing (the default for `julia-actions/julia-runtest`) will by default use
4534
pkgimage caches for all other packages than the package being tested, likely meaning faster test
46-
execution. ([#52123])
47-
35+
execution ([#52123]).
4836
* Specifying a path in `JULIA_DEPOT_PATH` now results in the expansion of empty strings to
4937
omit the default user depot ([#51448]).
5038

5139
Compiler/Runtime improvements
5240
-----------------------------
41+
5342
* Updated GC heuristics to count allocated pages instead of individual objects ([#50144]).
54-
* A new `LazyLibrary` type is exported from `Libdl` for use in building chained lazy library
55-
loads, primarily to be used within JLLs ([#50074]).
5643
* Added support for annotating `Base.@assume_effects` on code blocks ([#52400]).
57-
* The libuv library has been updated from a base of v1.44.2 to v1.48.0 ([#49937]).
5844

5945
Command-line option changes
6046
---------------------------
6147

6248
* The entry point for Julia has been standardized to `Main.main(ARGS)`. This must be explicitly opted into using the `@main` macro
63-
(see the docstring for further details). When opted-in, and julia is invoked to run a script or expression
64-
(i.e. using `julia script.jl` or `julia -e expr`), julia will subsequently run the `Main.main` function automatically.
65-
This is intended to unify script and compilation workflows, where code loading may happen
66-
in the compiler and execution of `Main.main` may happen in the resulting executable. For interactive use, there is no semantic
67-
difference between defining a `main` function and executing the code directly at the end of the script ([50974]).
49+
(see the docstring for further details). When opted-in, and `julia` is invoked to run a script or expression
50+
(i.e. using `julia script.jl` or `julia -e expr`), `julia` will subsequently run the `Main.main` function automatically.
51+
This is intended to unify script and compilation workflows, where code loading may happen
52+
in the compiler and execution of `Main.main` may happen in the resulting executable. For interactive use, there is no semantic
53+
difference between defining a `main` function and executing the code directly at the end of the script ([#50974]).
6854
* The `--compiled-modules` and `--pkgimages` flags can now be set to `existing`, which will
69-
cause Julia to consider loading existing cache files, but not to create new ones ([#50586]
70-
and [#52573]).
55+
cause Julia to consider loading existing cache files, but not to create new ones ([#50586], [#52573]).
7156

7257
Multi-threading changes
7358
-----------------------
7459

7560
* `Threads.@threads` now supports the `:greedy` scheduler, intended for non-uniform workloads ([#52096]).
7661
* A new exported struct `Lockable{T, L<:AbstractLock}` makes it easy to bundle a resource and its lock together ([#52898]).
7762

78-
Build system changes
79-
--------------------
80-
8163
New library functions
8264
---------------------
8365

84-
* `in!(x, s::AbstractSet)` will return whether `x` is in `s`, and insert `x` in `s` if not.
66+
* Three new types around the idea of text with "annotations" (`Pair{Symbol, Any}`
67+
entries, e.g. `:lang => "en"` or `:face => :magenta`). These annotations
68+
are preserved across operations (e.g. string concatenation with `*`) when
69+
possible.
70+
* `AnnotatedString` is a new `AbstractString` type. It wraps an underlying
71+
string and allows for annotations to be attached to regions of the string.
72+
This type is used extensively in the new `StyledStrings` standard library to
73+
hold styling information.
74+
* `AnnotatedChar` is a new `AbstractChar` type. It wraps another char and
75+
holds a list of annotations that apply to it.
76+
* `AnnotatedIOBuffer` is a new `IO` type that mimics an `IOBuffer`, but has
77+
specialised `read`/`write` methods for annotated content. This can be
78+
thought of both as a "string builder" of sorts and also as glue between
79+
annotated and unannotated content.
80+
* `in!(x, s::AbstractSet)` will return whether `x` is in `s`, and insert `x` in `s` if not ([#45156], [#51636]).
8581
* The new `Libc.mkfifo` function wraps the `mkfifo` C function on Unix platforms ([#34587]).
8682
* `copyuntil(out, io, delim)` and `copyline(out, io)` copy data into an `out::IO` stream ([#48273]).
87-
* `eachrsplit(string, pattern)` iterates split substrings right to left.
83+
* `eachrsplit(string, pattern)` iterates split substrings right to left ([#51646]).
8884
* `Sys.username()` can be used to return the current user's username ([#51897]).
8985
* `wrap(Array, m::Union{MemoryRef{T}, Memory{T}}, dims)` is the safe counterpart to `unsafe_wrap` ([#52049]).
9086
* `GC.logging_enabled()` can be used to test whether GC logging has been enabled via `GC.enable_logging` ([#51647]).
9187
* `IdSet` is now exported from Base and considered public ([#53262]).
88+
* `@time` now reports a count of any lock conflicts where a `ReentrantLock` had to wait, plus a new macro
89+
`@lock_conflicts` which returns that count ([#52883]).
90+
* The new macro `Base.Cartesian.@ncallkw` is analogous to `Base.Cartesian.@ncall`,
91+
but allows adding keyword arguments to the function call ([#51501]).
92+
* New function `Docs.hasdoc(module, symbol)` tells whether a name has a docstring ([#52139]).
93+
* New function `Docs.undocumented_names(module)` returns a module's undocumented public names ([#52413]).
9294

9395
New library features
9496
--------------------
@@ -99,24 +101,28 @@ New library features
99101
write the output to a stream rather than returning a string ([#48625]).
100102
* New methods `allequal(f, itr)` and `allunique(f, itr)` taking a predicate function ([#47679]).
101103
* `sizehint!(s, n)` now supports an optional `shrink` argument to disable shrinking ([#51929]).
102-
* New function `Docs.hasdoc(module, symbol)` tells whether a name has a docstring ([#52139]).
103-
* New function `Docs.undocumented_names(module)` returns a module's undocumented public names ([#52413]).
104104
* Passing an `IOBuffer` as a stdout argument for `Process` spawn now works as
105105
expected, synchronized with `wait` or `success`, so a `Base.BufferStream` is
106106
no longer required there for correctness to avoid data races ([#52461]).
107107
* After a process exits, `closewrite` will no longer be automatically called on
108108
the stream passed to it. Call `wait` on the process instead to ensure the
109109
content is fully written, then call `closewrite` manually to avoid
110-
data-races. Or use the callback form of `open` to have all that handled
111-
automatically.
112-
* `@timed` now additionally returns the elapsed compilation and recompilation time ([#52889])
110+
data races, or use the callback form of `open` to have all that handled
111+
automatically ([#52461]).
112+
* `@timed` now additionally returns the elapsed compilation and recompilation time ([#52889]).
113113
* `filter` can now act on a `NamedTuple` ([#50795]).
114-
* `Iterators.cycle(iter, n)` runs over `iter` a fixed number of times, instead of forever ([#47354])
114+
* `Iterators.cycle(iter, n)` runs over `iter` a fixed number of times, instead of forever ([#47354]).
115115
* `zero(::AbstractArray)` now applies recursively, so `zero([[1,2],[3,4,5]])` now produces the additive identity `[[0,0],[0,0,0]]` rather than erroring ([#38064]).
116116

117117
Standard library changes
118118
------------------------
119119

120+
* The fallback method `write(::IO, ::AbstractArray)` used to recursively call `write` on each element,
121+
but now writes the in-memory representation of each value. For example, `write(io, 'a':'b')` now
122+
writes 4 bytes for each character, instead of writing the UTF-8 representation of each character.
123+
The new format is compatible with that used by `Array`, making it possible to use `read!` to get
124+
the data back ([#42593]).
125+
120126
#### StyledStrings
121127

122128
* A new standard library for handling styling in a more comprehensive and structured way ([#49586]).
@@ -134,9 +140,13 @@ Standard library changes
134140
uses `JuliaSyntax` and `StyledStrings` to implement a `highlight` function
135141
that creates an `AnnotatedString` with syntax highlighting applied.
136142

137-
#### Package Manager
143+
#### Libdl
144+
145+
* A new `LazyLibrary` type is exported from `Libdl` for use in building chained lazy library
146+
loads, primarily to be used within JLLs ([#50074]).
138147

139148
#### LinearAlgebra
149+
140150
* `cbrt(::AbstractMatrix{<:Real})` is now defined and returns real-valued matrix cube roots of real-valued matrices ([#50661]).
141151
* `eigvals/eigen(A, bunchkaufman(B))` and `eigvals/eigen(A, lu(B))`, which utilize the Bunchkaufman (LDL) and LU decomposition of `B`,
142152
respectively, now efficiently compute the generalized eigenvalues (`eigen`: and eigenvectors) of `A` and `B`. Note: The second
@@ -148,15 +158,13 @@ Standard library changes
148158
* `lu` and `issuccess(::LU)` now accept an `allowsingular` keyword argument. When set to `true`, a valid factorization with rank-deficient U factor will be treated as success instead of throwing an error. Such factorizations are now shown by printing the factors together with a "rank-deficient" note rather than printing a "Failed Factorization" message ([#52957]).
149159

150160
#### Logging
161+
151162
* New `@create_log_macro` macro for creating new log macros like `@info`, `@warn` etc. For instance
152163
`@create_log_macro MyLog 1500 :magenta` will create `@mylog` to be used like `@mylog "hello"` which
153-
will show as `┌ MyLog: hello` etc. ([#52196])
154-
155-
#### Printf
156-
157-
#### Profile
164+
will show as `┌ MyLog: hello` etc. ([#52196]).
158165

159166
#### Random
167+
160168
* `rand` now supports sampling over `Tuple` types ([#35856], [#50251]).
161169
* `rand` now supports sampling over `Pair` types ([#28705]).
162170
* When seeding RNGs provided by `Random`, negative integer seeds can now be used ([#51416]).
@@ -175,18 +183,11 @@ Standard library changes
175183
end
176184
``` ([#51229]).
177185
* Meta-M with an empty prompt now toggles the contextual module between the previous non-Main
178-
contextual module and Main so that switching back and forth is simple. ([#51616], [#52670])
179-
180-
#### SuiteSparse
181-
182-
183-
#### SparseArrays
184-
185-
#### Test
186+
contextual module and Main so that switching back and forth is simple ([#51616], [#52670]).
186187
187188
#### Dates
188189
189-
The undocumented function `adjust` is no longer exported but is now documented
190+
The undocumented function `adjust` is no longer exported but is now documented ([#53092]).
190191
191192
#### Statistics
192193
@@ -196,23 +197,16 @@ The undocumented function `adjust` is no longer exported but is now documented
196197
197198
* `pmap` now defaults to using a `CachingPool` ([#33892]).
198199
199-
#### Unicode
200-
201-
202-
#### DelimitedFiles
203-
204-
205-
#### InteractiveUtils
206-
207200
Deprecated or removed
208201
---------------------
209202
210203
* `Base.map`, `Iterators.map`, and `foreach` lost their single-argument methods ([#52631]).
211204
212-
213205
External dependencies
214206
---------------------
215-
* `tput` is no longer called to check terminal capabilities, it has been replaced with a pure-Julia terminfo parser ([#50797]).
207+
208+
* The libuv library has been updated from a base of v1.44.2 to v1.48.0 ([#49937]).
209+
* `tput` is no longer called to check terminal capabilities; it has been replaced with a pure-Julia terminfo parser ([#50797]).
216210
217211
Tooling Improvements
218212
--------------------
@@ -222,3 +216,65 @@ Tooling Improvements
222216
runs on PRs that edit those same files ([#51704]).
223217
224218
<!--- generated by NEWS-update.jl: -->
219+
[#28705]: https://github.com/JuliaLang/julia/issues/28705
220+
[#33892]: https://github.com/JuliaLang/julia/issues/33892
221+
[#34587]: https://github.com/JuliaLang/julia/issues/34587
222+
[#35856]: https://github.com/JuliaLang/julia/issues/35856
223+
[#38064]: https://github.com/JuliaLang/julia/issues/38064
224+
[#42593]: https://github.com/JuliaLang/julia/issues/42593
225+
[#43845]: https://github.com/JuliaLang/julia/issues/43845
226+
[#45156]: https://github.com/JuliaLang/julia/issues/45156
227+
[#46501]: https://github.com/JuliaLang/julia/issues/46501
228+
[#47354]: https://github.com/JuliaLang/julia/issues/47354
229+
[#47679]: https://github.com/JuliaLang/julia/issues/47679
230+
[#48273]: https://github.com/JuliaLang/julia/issues/48273
231+
[#48625]: https://github.com/JuliaLang/julia/issues/48625
232+
[#49546]: https://github.com/JuliaLang/julia/issues/49546
233+
[#49586]: https://github.com/JuliaLang/julia/issues/49586
234+
[#49937]: https://github.com/JuliaLang/julia/issues/49937
235+
[#50074]: https://github.com/JuliaLang/julia/issues/50074
236+
[#50105]: https://github.com/JuliaLang/julia/issues/50105
237+
[#50144]: https://github.com/JuliaLang/julia/issues/50144
238+
[#50251]: https://github.com/JuliaLang/julia/issues/50251
239+
[#50471]: https://github.com/JuliaLang/julia/issues/50471
240+
[#50586]: https://github.com/JuliaLang/julia/issues/50586
241+
[#50661]: https://github.com/JuliaLang/julia/issues/50661
242+
[#50795]: https://github.com/JuliaLang/julia/issues/50795
243+
[#50797]: https://github.com/JuliaLang/julia/issues/50797
244+
[#50958]: https://github.com/JuliaLang/julia/issues/50958
245+
[#50974]: https://github.com/JuliaLang/julia/issues/50974
246+
[#51229]: https://github.com/JuliaLang/julia/issues/51229
247+
[#51319]: https://github.com/JuliaLang/julia/issues/51319
248+
[#51416]: https://github.com/JuliaLang/julia/issues/51416
249+
[#51448]: https://github.com/JuliaLang/julia/issues/51448
250+
[#51487]: https://github.com/JuliaLang/julia/issues/51487
251+
[#51501]: https://github.com/JuliaLang/julia/issues/51501
252+
[#51527]: https://github.com/JuliaLang/julia/issues/51527
253+
[#51616]: https://github.com/JuliaLang/julia/issues/51616
254+
[#51636]: https://github.com/JuliaLang/julia/issues/51636
255+
[#51646]: https://github.com/JuliaLang/julia/issues/51646
256+
[#51647]: https://github.com/JuliaLang/julia/issues/51647
257+
[#51704]: https://github.com/JuliaLang/julia/issues/51704
258+
[#51799]: https://github.com/JuliaLang/julia/issues/51799
259+
[#51897]: https://github.com/JuliaLang/julia/issues/51897
260+
[#51929]: https://github.com/JuliaLang/julia/issues/51929
261+
[#52049]: https://github.com/JuliaLang/julia/issues/52049
262+
[#52096]: https://github.com/JuliaLang/julia/issues/52096
263+
[#52123]: https://github.com/JuliaLang/julia/issues/52123
264+
[#52139]: https://github.com/JuliaLang/julia/issues/52139
265+
[#52180]: https://github.com/JuliaLang/julia/issues/52180
266+
[#52196]: https://github.com/JuliaLang/julia/issues/52196
267+
[#52400]: https://github.com/JuliaLang/julia/issues/52400
268+
[#52413]: https://github.com/JuliaLang/julia/issues/52413
269+
[#52461]: https://github.com/JuliaLang/julia/issues/52461
270+
[#52480]: https://github.com/JuliaLang/julia/issues/52480
271+
[#52573]: https://github.com/JuliaLang/julia/issues/52573
272+
[#52631]: https://github.com/JuliaLang/julia/issues/52631
273+
[#52670]: https://github.com/JuliaLang/julia/issues/52670
274+
[#52837]: https://github.com/JuliaLang/julia/issues/52837
275+
[#52883]: https://github.com/JuliaLang/julia/issues/52883
276+
[#52889]: https://github.com/JuliaLang/julia/issues/52889
277+
[#52898]: https://github.com/JuliaLang/julia/issues/52898
278+
[#52957]: https://github.com/JuliaLang/julia/issues/52957
279+
[#53092]: https://github.com/JuliaLang/julia/issues/53092
280+
[#53262]: https://github.com/JuliaLang/julia/issues/53262

0 commit comments

Comments
 (0)