From 7931d126bdc6ed561f556a69fed1846af23ca315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Thu, 19 Sep 2024 22:51:54 +0200 Subject: [PATCH 01/15] Release 1.14.0 --- _releases/2024-10-09-1.14.0-released.md | 176 ++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 _releases/2024-10-09-1.14.0-released.md diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md new file mode 100644 index 00000000..1910023e --- /dev/null +++ b/_releases/2024-10-09-1.14.0-released.md @@ -0,0 +1,176 @@ +--- +title: Crystal 1.14.0 is released! +version: 1.14.0 +date: 2024-10-09 +author: straight-shoota +--- +We are announcing a new Crystal release with several new features and bug fixes. + +Pre-built packages are available on [GitHub Releases](https://github.com/crystal-lang/crystal/releases/tag/1.14.0) +and our official distribution channels. +See [crystal-lang.org/install](https://crystal-lang.org/install/) for +installation instructions. + +## Stats + +This release includes [❓ changes since 1.13.3](https://github.com/crystal-lang/crystal/pulls?q=is%3Apr+milestone%3A1.14.0) +by ❓ contributors. We thank all the contributors for all the effort put into +improving the language! ❤️ + +## Advances in multi-threading support + +As part of the [project to improve multi-threading support](/2024/02/09/84codes-manas-mt) with the help of [84codes], +this release includes several improvements and refactors related to concurrency and the event loop. So far, these have been mostly internal changes with minor relevance from a user's point of view. We expect more significant changes in the next release. + +A preview of the upcoming execution context ([RFC](https://github.com/crystal-lang/rfcs/pull/2)) is available as a standalone shard: [`ysbaddaden/execution_context`](https://github.com/ysbaddaden/execution_context). It's available for testing by eager developers. This library is expected to be part of the compiler once we are certain it's ready. + +## Changes + +Below we list the most remarkable changes in the language, compiler and stdlib. +For more details, visit the [full changelog](https://github.com/crystal-lang/crystal/releases/tag/1.14.0). + +### Breaking + +`Slice#[start, count]` accepts a negative index for `start`, like similar methods already do. +This would break existing code that depends on the current behaviou that a negative start index raises `IndexError` ([#14778], thanks @ysbaddaden). +[#14778]: https://github.com/crystal-lang/crystal/pull/14778 + +Finalizers for `Socket` and `IO::FileDescriptor` do no longer flush. +Flushing is too heavy for a finalizer, as it might involve the event loop and even memory allocations which must be strictly avoided in a finalizer. +Be sure to always flush before letting a stream go out of scope, ideally with an explicit `#close` ([#14882], thanks @straight-shoota). +[#14882]: https://github.com/crystal-lang/crystal/pull/14882 + +`XML::Error.errors` had been deprecated since [1.7.0](/releases/2023-01-09-1.7.0-released.md), but continued to work. +This unconditioned availability causes a serious memory leak, which cannot be fixed without disabling `XML::Error.errors`. +In order to make this obvious, calling the method causes a compile time error now. ([#14936], thanks @straight-shoota) +[#14936]: https://github.com/crystal-lang/crystal/pull/14936 + +`Hash::Entry` has been removed from public API docs. It was never intended to be a public type. ([#14881], thanks @Blacksmoke16) +[#14881]: https://github.com/crystal-lang/crystal/pull/14881 + +### Language features + +Allow `^` in constant numeric expressions ([#14951], thanks @HertzDevil). + +[#14951]: https://github.com/crystal-lang/crystal/pull/14951 + +`HashLiteral` and `NamedTupleLiteral` respond to `#has_key?`, just like their regular counterparts `Hash` and `NamedTuple` ([#14890], thanks @kamil-gwozdz) + +### Standard library + +- Support ARM64 Windows ([#14911], thanks @HertzDevil) + + +[#14911]: https://github.com/crystal-lang/crystal/pull/14911 + + +- *(collection)* Add `Slice#same?` ([#14728], thanks @straight-shoota) +[#14728]: https://github.com/crystal-lang/crystal/pull/14728 +- *(runtime)* Add `Pointer::Appender#to_slice` ([#14874], thanks @straight-shoota) +[#14874]: https://github.com/crystal-lang/crystal/pull/14874 + +- *(concurrency)* Add `WaitGroup.wait` and `WaitGroup#spawn` ([#14837], thanks @jgaskins) +[#14837]: https://github.com/crystal-lang/crystal/pull/14837 + +- *(codegen)* Fix avoid linking `libpcre` when unused ([#14891], thanks @kojix2) +[#14891]: https://github.com/crystal-lang/crystal/pull/14891 + +### Windows + +- *(concurrency)* Open non-blocking regular files as overlapped on Windows ([#14921], thanks @HertzDevil) +- *(concurrency)* Support non-blocking `File#read` and `#write` on Windows ([#14940], thanks @HertzDevil) +- *(concurrency)* Support non-blocking `File#read_at` on Windows ([#14958], thanks @HertzDevil) +- *(concurrency)* Support non-blocking `Process.run` standard streams on Windows ([#14941], thanks @HertzDevil) +- *(concurrency)* Support `IO::FileDescriptor#flock_*` on non-blocking files on Windows ([#14943], thanks @HertzDevil) +- *(concurrency)* Emulate non-blocking `STDIN` console on Windows ([#14947], thanks @HertzDevil) +- *(concurrency)* Async DNS resolution on Windows ([#14979], thanks @HertzDevil) +- *(system)* Implement `System::User` on Windows ([#14933], thanks @HertzDevil) +- *(system)* Implement `System::Group` on Windows ([#14945], thanks @HertzDevil) + +[#14921]: https://github.com/crystal-lang/crystal/pull/14921 +[#14940]: https://github.com/crystal-lang/crystal/pull/14940 +[#14958]: https://github.com/crystal-lang/crystal/pull/14958 +[#14941]: https://github.com/crystal-lang/crystal/pull/14941 +[#14943]: https://github.com/crystal-lang/crystal/pull/14943 +[#14947]: https://github.com/crystal-lang/crystal/pull/14947 +[#14979]: https://github.com/crystal-lang/crystal/pull/14979 +[#14933]: https://github.com/crystal-lang/crystal/pull/14933 +[#14945]: https://github.com/crystal-lang/crystal/pull/14945 + +- *(interpreter)* Enable the interpreter on Windows ([#14964], thanks @HertzDevil) +[#14964]: https://github.com/crystal-lang/crystal/pull/14964 + +### `URI::Params` + +- *(serialization)* Add `URI.from_json_object_key?` and `URI#to_json_object_key` ([#14834], thanks @nobodywasishere) +- *(serialization)* Add `URI::Params::Serializable` ([#14684], thanks @Blacksmoke16) +[#14834]: https://github.com/crystal-lang/crystal/pull/14834 +[#14684]: https://github.com/crystal-lang/crystal/pull/14684 + +### Compiler tools + +- *(cli)* Adds initial support for external commands ([#14953], thanks @bcardiff) +[#14953]: https://github.com/crystal-lang/crystal/pull/14953 + +- *(docs-generator)* Add nodoc filter to doc type methods ([#14910], thanks @spuun) + +[#14910]: https://github.com/crystal-lang/crystal/pull/14910 + +### Performance + + +- *(codegen)* Reduce calls to `Crystal::Type#remove_indirection` in module dispatch ([#14992], thanks @HertzDevil) + +[#14992]: https://github.com/crystal-lang/crystal/pull/14992 + +- Avoid unwinding the stack on hot path in method call lookups ([#15002], thanks @ggiraldez) +- *(codegen)* Compiler: enable parallel codegen with MT ([#14748], thanks @ysbaddaden) + +[#15002]: https://github.com/crystal-lang/crystal/pull/15002 +[#14748]: https://github.com/crystal-lang/crystal/pull/14748 + +### Dependencies + +- *(crypto)* Update `LibCrypto` bindings for LibreSSL 3.5+ ([#14872], thanks @straight-shoota) +[#14872]: https://github.com/crystal-lang/crystal/pull/14872 +- *(text)* Support Unicode 16.0.0 ([#14997], thanks @HertzDevil) +[#14997]: https://github.com/crystal-lang/crystal/pull/14997 +- *(interpreter:repl)* Update REPLy version ([#14950], thanks @HertzDevil) + +[#14950]: https://github.com/crystal-lang/crystal/pull/14950 + +## Deprecations + +- +- *(runtime)* **[deprecation]** Deprecate `Pointer.new(Int)` ([#14875], thanks @straight-shoota) + +[#14875]: https://github.com/crystal-lang/crystal/pull/14875 +- **[deprecation]** Use `Time::Span` in `Benchmark.ips` ([#14805], thanks @HertzDevil) +[#14805]: https://github.com/crystal-lang/crystal/pull/14805 + +- **[deprecation]** Deprecate `::sleep(Number)` ([#14962], thanks @HertzDevil) + +[#14962]: https://github.com/crystal-lang/crystal/pull/14962 + +--- + +> **THANKS:** +> We have been able to do all of this thanks to the continued support of [84codes](https://www.84codes.com/) and every other [sponsor](/sponsors). +> To maintain and increase the development pace, donations and sponsorships are +> essential. [OpenCollective](https://opencollective.com/crystal-lang) is +> available for that. +> +> Reach out to [crystal@manas.tech](mailto:crystal@manas.tech) +> if you’d like to become a direct sponsor or find other ways to support Crystal. +> We thank you in advance! + +[@ysbaddaden]: https://github.com/ysbaddaden +[@jgaskins]: https://github.com/jgaskins +[@HertzDevil]: https://github.com/HertzDevil +[@straight-shoota]: https://github.com/straight-shoota +[@Blacksmoke16]: https://github.com/Blacksmoke16 +[@hovsater]: https://github.com/hovsater +[@summer-alice]: https://github.com/summer-alice +[@meatball133]: https://github.com/meatball133 +[@Hadeweka]: https://github.com/@Hadeweka +[84codes]: https://www.84codes.com/ From 8229ac0b192290d11831ea1bf96fc538f0176d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Mon, 23 Sep 2024 15:41:15 +0200 Subject: [PATCH 02/15] update --- _releases/2024-10-09-1.14.0-released.md | 192 ++++++++++++++++++------ 1 file changed, 142 insertions(+), 50 deletions(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index 1910023e..e7402fe3 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -22,7 +22,7 @@ improving the language! ❤️ As part of the [project to improve multi-threading support](/2024/02/09/84codes-manas-mt) with the help of [84codes], this release includes several improvements and refactors related to concurrency and the event loop. So far, these have been mostly internal changes with minor relevance from a user's point of view. We expect more significant changes in the next release. -A preview of the upcoming execution context ([RFC](https://github.com/crystal-lang/rfcs/pull/2)) is available as a standalone shard: [`ysbaddaden/execution_context`](https://github.com/ysbaddaden/execution_context). It's available for testing by eager developers. This library is expected to be part of the compiler once we are certain it's ready. +A preview of the upcoming execution context ([RFC 2](https://github.com/crystal-lang/rfcs/pull/2)) is available as a standalone shard: [`ysbaddaden/execution_context`](https://github.com/ysbaddaden/execution_context). It's available for testing by eager developers. This library is expected to be part of the compiler once we are certain it's ready. ## Changes @@ -31,62 +31,103 @@ For more details, visit the [full changelog](https://github.com/crystal-lang/cry ### Breaking -`Slice#[start, count]` accepts a negative index for `start`, like similar methods already do. -This would break existing code that depends on the current behaviou that a negative start index raises `IndexError` ([#14778], thanks @ysbaddaden). +⚠️ `Slice#[start, count]` now accepts a negative index for `start`, like similar methods already do. +This would break existing code that depends on the current behaviour that a negative start index raises `IndexError` ([#14778]). + [#14778]: https://github.com/crystal-lang/crystal/pull/14778 -Finalizers for `Socket` and `IO::FileDescriptor` do no longer flush. +⚠️ Finalizers for `Socket` and `IO::FileDescriptor` do no longer flush. Flushing is too heavy for a finalizer, as it might involve the event loop and even memory allocations which must be strictly avoided in a finalizer. -Be sure to always flush before letting a stream go out of scope, ideally with an explicit `#close` ([#14882], thanks @straight-shoota). +Be sure to always flush before letting a stream go out of scope, ideally with an explicit `#close` ([#14882]). + [#14882]: https://github.com/crystal-lang/crystal/pull/14882 -`XML::Error.errors` had been deprecated since [1.7.0](/releases/2023-01-09-1.7.0-released.md), but continued to work. +⚠️ `XML::Error.errors` had been deprecated since [1.7.0](/releases/2023-01-09-1.7.0-released.md), but continued to work. This unconditioned availability causes a serious memory leak, which cannot be fixed without disabling `XML::Error.errors`. -In order to make this obvious, calling the method causes a compile time error now. ([#14936], thanks @straight-shoota) +In order to make this obvious, calling the method causes a compile time error now. ([#14936]). + [#14936]: https://github.com/crystal-lang/crystal/pull/14936 -`Hash::Entry` has been removed from public API docs. It was never intended to be a public type. ([#14881], thanks @Blacksmoke16) +⚠️ `Hash::Entry` has been removed from public API docs. It was never intended to be a public type. ([#14881]). + +*Thanks [@ysbaddaden], [@straight-shoota] and [@Blacksmoke16]* + [#14881]: https://github.com/crystal-lang/crystal/pull/14881 ### Language features -Allow `^` in constant numeric expressions ([#14951], thanks @HertzDevil). +Allow `^` in constant numeric expressions ([#14951]). This operator was oddly missing even though `|` and `&` were already supported. + +*Thanks [@HertzDevil]* [#14951]: https://github.com/crystal-lang/crystal/pull/14951 -`HashLiteral` and `NamedTupleLiteral` respond to `#has_key?`, just like their regular counterparts `Hash` and `NamedTuple` ([#14890], thanks @kamil-gwozdz) +`HashLiteral` and `NamedTupleLiteral` respond to `#has_key?`, just like their regular counterparts `Hash` and `NamedTuple` ([#14890]). + +*Thanks [@kamil-gwozdz]* ### Standard library -- Support ARM64 Windows ([#14911], thanks @HertzDevil) +The `WaitGroup` concurrency primitive gains some convenience methods, +`WaitGroup.wait` and `WaitGroup#spawn` ([#14837]). +```crystal +require "wait_group" +WaitGroup.wait do |wg| + 10.times do + wg.spawn do + sleep 5.seconds + end + end +end +``` -[#14911]: https://github.com/crystal-lang/crystal/pull/14911 +*Thanks [@jgaskins]* + +[#14837]: https://github.com/crystal-lang/crystal/pull/14837 +There are two new methods for working with slices: `Slice#same?`checks +if two slices point to the same memory ([#14728]). +And `Pointer::Appender#to_slice` ([#14874]) makes it easy to create a slice +containing the items from an appender. -- *(collection)* Add `Slice#same?` ([#14728], thanks @straight-shoota) [#14728]: https://github.com/crystal-lang/crystal/pull/14728 -- *(runtime)* Add `Pointer::Appender#to_slice` ([#14874], thanks @straight-shoota) [#14874]: https://github.com/crystal-lang/crystal/pull/14874 -- *(concurrency)* Add `WaitGroup.wait` and `WaitGroup#spawn` ([#14837], thanks @jgaskins) -[#14837]: https://github.com/crystal-lang/crystal/pull/14837 +*Thanks [@straight-shoota]* + +A minor fix turning an eager class getter into a lazy one avoids linking `libpcre` +for programs that do not use `Regex` ([#14891]). + +*Thanks [@kojix2]* -- *(codegen)* Fix avoid linking `libpcre` when unused ([#14891], thanks @kojix2) [#14891]: https://github.com/crystal-lang/crystal/pull/14891 ### Windows -- *(concurrency)* Open non-blocking regular files as overlapped on Windows ([#14921], thanks @HertzDevil) -- *(concurrency)* Support non-blocking `File#read` and `#write` on Windows ([#14940], thanks @HertzDevil) -- *(concurrency)* Support non-blocking `File#read_at` on Windows ([#14958], thanks @HertzDevil) -- *(concurrency)* Support non-blocking `Process.run` standard streams on Windows ([#14941], thanks @HertzDevil) -- *(concurrency)* Support `IO::FileDescriptor#flock_*` on non-blocking files on Windows ([#14943], thanks @HertzDevil) -- *(concurrency)* Emulate non-blocking `STDIN` console on Windows ([#14947], thanks @HertzDevil) -- *(concurrency)* Async DNS resolution on Windows ([#14979], thanks @HertzDevil) -- *(system)* Implement `System::User` on Windows ([#14933], thanks @HertzDevil) -- *(system)* Implement `System::Group` on Windows ([#14945], thanks @HertzDevil) +Windows support is making good progress. +The interpreter runs on Windows ([#14964]). There is still a limitation: +networking does not work due to [#12495]. + +And Crystal runs on ARM64 Windows, i.e. the `aarch64-windows-msvc` target. +Both standard library and the compiler should work. It's not 100% polished, but +looking pretty well. Read [#14911] for details on how to test it out. + +Starting with this release, DNS requests resolve asynchronously on Windows ([#14979]). +It's actually the first platform to support that. + +There are also a number of improvements regarding non-blocking IO: + +- Support non-blocking `File#read` and `#write` ([#14940]), `File#read_at` ([#14958]), `Process.run` standard streams ([#14941]), `IO::FileDescriptor#flock_*` ([#14943]). +- Emulate non-blocking `STDIN` console ([#14947]). +- Open non-blocking regular files as overlapped ([#14921]). + +And we add implementations of `System::User` ([#14933]) and `System::Group` on Windows ([#14945]). + +*Thanks [@HertzDevil]* + +[#14911]: https://github.com/crystal-lang/crystal/pull/14911 [#14921]: https://github.com/crystal-lang/crystal/pull/14921 [#14940]: https://github.com/crystal-lang/crystal/pull/14940 [#14958]: https://github.com/crystal-lang/crystal/pull/14958 @@ -96,60 +137,109 @@ Allow `^` in constant numeric expressions ([#14951], thanks @HertzDevil). [#14979]: https://github.com/crystal-lang/crystal/pull/14979 [#14933]: https://github.com/crystal-lang/crystal/pull/14933 [#14945]: https://github.com/crystal-lang/crystal/pull/14945 - -- *(interpreter)* Enable the interpreter on Windows ([#14964], thanks @HertzDevil) [#14964]: https://github.com/crystal-lang/crystal/pull/14964 +[#12495]: https://github.com/crystal-lang/crystal/issues/12495 ### `URI::Params` -- *(serialization)* Add `URI.from_json_object_key?` and `URI#to_json_object_key` ([#14834], thanks @nobodywasishere) -- *(serialization)* Add `URI::Params::Serializable` ([#14684], thanks @Blacksmoke16) +`URI::Params::Serializable` is a new serialization API which works similar to +the JSON and YAML variants, but for the URI query parameters format ([#14684]). + +```crystal +require "uri/params/serializable" + +record Applicant, + first_name : String + last_name : String + qualities : Array(String) do + include URI::Params::Serializable +end + +applicant = Applicant.from_www_form "first_name=John&last_name=Doe&qualities=kind&qualities=smart" +applicant # => Applicant(@first_name="John", @last_name="Doe", @qualities=["kind", "smart"]) +applicant.to_www_form # => "first_name=John&last_name=Doe&qualities=kind&qualities=smart" +``` + +*Thanks [@Blacksmoke16]* + +In a related matter, `URI` is now applicable as a key in JSON objects via `URI.from_json_object_key?` and `URI#to_json_object_key` ([#14834]). + +*Thanks [@nobodywasishere]* + [#14834]: https://github.com/crystal-lang/crystal/pull/14834 [#14684]: https://github.com/crystal-lang/crystal/pull/14684 ### Compiler tools -- *(cli)* Adds initial support for external commands ([#14953], thanks @bcardiff) +The compiler binary can now execute external programs as subcommands. +This allows us to split the compiler binary into separate executables which helps +improve iteration speed ([#14953]). + +*Thanks [@bcardiff]* + [#14953]: https://github.com/crystal-lang/crystal/pull/14953 -- *(docs-generator)* Add nodoc filter to doc type methods ([#14910], thanks @spuun) +We fixed a bug where the doc generator referenced and linked undocumented types ([#14910]). + +*Thanks [@spuun]* [#14910]: https://github.com/crystal-lang/crystal/pull/14910 ### Performance +- *(codegen)* Reduce calls to `Crystal::Type#remove_indirection` in module dispatch ([#14992]). -- *(codegen)* Reduce calls to `Crystal::Type#remove_indirection` in module dispatch ([#14992], thanks @HertzDevil) +*Thanks [@HertzDevil]* [#14992]: https://github.com/crystal-lang/crystal/pull/14992 -- Avoid unwinding the stack on hot path in method call lookups ([#15002], thanks @ggiraldez) -- *(codegen)* Compiler: enable parallel codegen with MT ([#14748], thanks @ysbaddaden) +- Avoid unwinding the stack on hot path in method call lookups ([#15002]). + +*Thanks [@ggiraldez]* + +- *(codegen)* Compiler: enable parallel codegen with MT ([#14748]). + +*Thanks [@ysbaddaden]* [#15002]: https://github.com/crystal-lang/crystal/pull/15002 [#14748]: https://github.com/crystal-lang/crystal/pull/14748 ### Dependencies -- *(crypto)* Update `LibCrypto` bindings for LibreSSL 3.5+ ([#14872], thanks @straight-shoota) +- *(crypto)* Update `LibCrypto` bindings for LibreSSL 3.5+ ([#14872]). + +*Thanks [@straight-shoota]* + [#14872]: https://github.com/crystal-lang/crystal/pull/14872 -- *(text)* Support Unicode 16.0.0 ([#14997], thanks @HertzDevil) + +- *(text)* Support Unicode 16.0.0 ([#14997]). + +*Thanks [@HertzDevil]* + [#14997]: https://github.com/crystal-lang/crystal/pull/14997 -- *(interpreter:repl)* Update REPLy version ([#14950], thanks @HertzDevil) + +- *(interpreter:repl)* Update REPLy version ([#14950]). + +*Thanks [@HertzDevil]* [#14950]: https://github.com/crystal-lang/crystal/pull/14950 ## Deprecations -- -- *(runtime)* **[deprecation]** Deprecate `Pointer.new(Int)` ([#14875], thanks @straight-shoota) +- `Pointer.new(Int)` ([#14875]) was deprecated in favour of `Process.new(UInt64)`. + Deprecation warnings for argument type that autocast to `UInt64` can be ignored + or disabled by explicitly casting to `UInt64`. + +*Thanks [@straight-shoota]* [#14875]: https://github.com/crystal-lang/crystal/pull/14875 -- **[deprecation]** Use `Time::Span` in `Benchmark.ips` ([#14805], thanks @HertzDevil) -[#14805]: https://github.com/crystal-lang/crystal/pull/14805 -- **[deprecation]** Deprecate `::sleep(Number)` ([#14962], thanks @HertzDevil) +- We updated a couple of APIs that used `Number` to represent a time span. `Benchmark.ips` ([#14805]) + and `::sleep(Number)` ([#14962]) explicitly require `Time::Span`. You can convert bare numbers with `Number#seconds` to use the valid overload. + +*Thanks [@HertzDevil]* +[#14805]: https://github.com/crystal-lang/crystal/pull/14805 [#14962]: https://github.com/crystal-lang/crystal/pull/14962 --- @@ -164,13 +254,15 @@ Allow `^` in constant numeric expressions ([#14951], thanks @HertzDevil). > if you’d like to become a direct sponsor or find other ways to support Crystal. > We thank you in advance! -[@ysbaddaden]: https://github.com/ysbaddaden -[@jgaskins]: https://github.com/jgaskins +[@bcardiff]: https://github.com/bcardiff +[@Blacksmoke16]: https://github.com/Blacksmoke16 +[@ggiraldez]: https://github.com/ggiraldez [@HertzDevil]: https://github.com/HertzDevil +[@jgaskins]: https://github.com/jgaskins +[@kamil-gwozdz]: https://github.com/kamil-gwozdz +[@kojix2]: https://github.com/kojix2 +[@nobodywasishere]: https://github.com/nobodywasishere +[@spuun]: https://github.com/spuun [@straight-shoota]: https://github.com/straight-shoota -[@Blacksmoke16]: https://github.com/Blacksmoke16 -[@hovsater]: https://github.com/hovsater -[@summer-alice]: https://github.com/summer-alice -[@meatball133]: https://github.com/meatball133 -[@Hadeweka]: https://github.com/@Hadeweka +[@ysbaddaden]: https://github.com/ysbaddaden [84codes]: https://www.84codes.com/ From 3d97307be4e130342495959cdce51f23ab78af82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Thu, 3 Oct 2024 09:55:42 +0200 Subject: [PATCH 03/15] wip --- _releases/2024-10-09-1.14.0-released.md | 29 +++++++++---------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index e7402fe3..054a5ca0 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -204,38 +204,29 @@ We fixed a bug where the doc generator referenced and linked undocumented types [#15002]: https://github.com/crystal-lang/crystal/pull/15002 [#14748]: https://github.com/crystal-lang/crystal/pull/14748 -### Dependencies +### Dependency Updates -- *(crypto)* Update `LibCrypto` bindings for LibreSSL 3.5+ ([#14872]). +- `LibCrypto` bindings now support LibreSSL 3.5+ ([#14872]). +- Support for Unicode 16.0.0 ([#14997]). +- Support for LLVM 19.1 -*Thanks [@straight-shoota]* +*Thanks [@straight-shoota], [@HertzDevil]* [#14872]: https://github.com/crystal-lang/crystal/pull/14872 - -- *(text)* Support Unicode 16.0.0 ([#14997]). - -*Thanks [@HertzDevil]* - [#14997]: https://github.com/crystal-lang/crystal/pull/14997 -- *(interpreter:repl)* Update REPLy version ([#14950]). - -*Thanks [@HertzDevil]* - -[#14950]: https://github.com/crystal-lang/crystal/pull/14950 - ## Deprecations -- `Pointer.new(Int)` ([#14875]) was deprecated in favour of `Process.new(UInt64)`. - Deprecation warnings for argument type that autocast to `UInt64` can be ignored - or disabled by explicitly casting to `UInt64`. +`Pointer.new(Int)` ([#14875]) was deprecated in favour of `Process.new(UInt64)`. +Deprecation warnings for argument type that autocast to `UInt64` can be ignored +or disabled by explicitly casting to `UInt64`. *Thanks [@straight-shoota]* [#14875]: https://github.com/crystal-lang/crystal/pull/14875 -- We updated a couple of APIs that used `Number` to represent a time span. `Benchmark.ips` ([#14805]) - and `::sleep(Number)` ([#14962]) explicitly require `Time::Span`. You can convert bare numbers with `Number#seconds` to use the valid overload. +We updated a couple of APIs that used `Number` to represent a time span. `Benchmark.ips` ([#14805]) +and `::sleep(Number)` ([#14962]) explicitly require `Time::Span`. You can convert bare numbers with `Number#seconds` to use the valid overload. *Thanks [@HertzDevil]* From 766790520148139c15f8babba5d556e6057025e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Mon, 7 Oct 2024 18:15:49 +0200 Subject: [PATCH 04/15] Remove docs generator fix --- _releases/2024-10-09-1.14.0-released.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index 054a5ca0..e3e4fb0a 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -179,12 +179,6 @@ improve iteration speed ([#14953]). [#14953]: https://github.com/crystal-lang/crystal/pull/14953 -We fixed a bug where the doc generator referenced and linked undocumented types ([#14910]). - -*Thanks [@spuun]* - -[#14910]: https://github.com/crystal-lang/crystal/pull/14910 - ### Performance - *(codegen)* Reduce calls to `Crystal::Type#remove_indirection` in module dispatch ([#14992]). @@ -253,7 +247,6 @@ and `::sleep(Number)` ([#14962]) explicitly require `Time::Span`. You can conver [@kamil-gwozdz]: https://github.com/kamil-gwozdz [@kojix2]: https://github.com/kojix2 [@nobodywasishere]: https://github.com/nobodywasishere -[@spuun]: https://github.com/spuun [@straight-shoota]: https://github.com/straight-shoota [@ysbaddaden]: https://github.com/ysbaddaden [84codes]: https://www.84codes.com/ From 32b31c7b78361d7d429ab99f30335c0255bae6a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Mon, 7 Oct 2024 18:16:04 +0200 Subject: [PATCH 05/15] Add link for LLVM 19.1 support PR --- _releases/2024-10-09-1.14.0-released.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index e3e4fb0a..bdc7be7e 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -202,10 +202,11 @@ improve iteration speed ([#14953]). - `LibCrypto` bindings now support LibreSSL 3.5+ ([#14872]). - Support for Unicode 16.0.0 ([#14997]). -- Support for LLVM 19.1 +- Support for LLVM 19.1 ([#14842]) *Thanks [@straight-shoota], [@HertzDevil]* +[#14842]: https://github.com/crystal-lang/crystal/pull/14842 [#14872]: https://github.com/crystal-lang/crystal/pull/14872 [#14997]: https://github.com/crystal-lang/crystal/pull/14997 From 0bf99046c506b9290d86923aa348a1fee2aa2ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 9 Oct 2024 11:52:08 +0200 Subject: [PATCH 06/15] Fix link --- _releases/2024-10-09-1.14.0-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index bdc7be7e..227c9c91 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -42,7 +42,7 @@ Be sure to always flush before letting a stream go out of scope, ideally with an [#14882]: https://github.com/crystal-lang/crystal/pull/14882 -⚠️ `XML::Error.errors` had been deprecated since [1.7.0](/releases/2023-01-09-1.7.0-released.md), but continued to work. +⚠️ `XML::Error.errors` had been deprecated since [1.7.0](/_releases/2023-01-09-1.7.0-released.md), but continued to work. This unconditioned availability causes a serious memory leak, which cannot be fixed without disabling `XML::Error.errors`. In order to make this obvious, calling the method causes a compile time error now. ([#14936]). From aefdcc0ff5897cf7f6d5002548f8c4097cab995a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 9 Oct 2024 12:03:05 +0200 Subject: [PATCH 07/15] Reword MT section --- _releases/2024-10-09-1.14.0-released.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index 227c9c91..4e89849d 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -19,10 +19,15 @@ improving the language! ❤️ ## Advances in multi-threading support -As part of the [project to improve multi-threading support](/2024/02/09/84codes-manas-mt) with the help of [84codes], -this release includes several improvements and refactors related to concurrency and the event loop. So far, these have been mostly internal changes with minor relevance from a user's point of view. We expect more significant changes in the next release. +The [project to improve multi-threading support](/2024/02/09/84codes-manas-mt) with the help of [84codes] is still ongoing. +This release doesn't include any big changes. There are a couple of smaller concurrency improvements, though. -A preview of the upcoming execution context ([RFC 2](https://github.com/crystal-lang/rfcs/pull/2)) is available as a standalone shard: [`ysbaddaden/execution_context`](https://github.com/ysbaddaden/execution_context). It's available for testing by eager developers. This library is expected to be part of the compiler once we are certain it's ready. +We expect to roll out a major performance upgrade to the event loop for the 1.15 development cycle. +See [New Event Loop (UNIX): call for reviews & tests](https://forum.crystal-lang.org/t/new-event-loop-unix-call-for-reviews-tests/7207) +for a heads up. + +The upcoming execution contexts API from [RFC 2](https://github.com/crystal-lang/rfcs/pull/2) is available as a standalone shard for testing: +[`ysbaddaden/execution_context`](https://github.com/ysbaddaden/execution_context). ## Changes From ecb05eba58b8bf699736fadb808e0fc3f9e86d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 9 Oct 2024 12:29:13 +0200 Subject: [PATCH 08/15] Improve wording --- _releases/2024-10-09-1.14.0-released.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index 4e89849d..59b32aee 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -42,7 +42,7 @@ This would break existing code that depends on the current behaviour that a nega [#14778]: https://github.com/crystal-lang/crystal/pull/14778 ⚠️ Finalizers for `Socket` and `IO::FileDescriptor` do no longer flush. -Flushing is too heavy for a finalizer, as it might involve the event loop and even memory allocations which must be strictly avoided in a finalizer. +We realized that flushing is too heavy for a finalizer, as it might involve the event loop and even memory allocations which must be strictly avoided in a finalizer. Be sure to always flush before letting a stream go out of scope, ideally with an explicit `#close` ([#14882]). [#14882]: https://github.com/crystal-lang/crystal/pull/14882 @@ -115,7 +115,7 @@ Windows support is making good progress. The interpreter runs on Windows ([#14964]). There is still a limitation: networking does not work due to [#12495]. -And Crystal runs on ARM64 Windows, i.e. the `aarch64-windows-msvc` target. +And Crystal now runs on ARM64 Windows, i.e. the `aarch64-windows-msvc` target. Both standard library and the compiler should work. It's not 100% polished, but looking pretty well. Read [#14911] for details on how to test it out. @@ -176,7 +176,8 @@ In a related matter, `URI` is now applicable as a key in JSON objects via `URI.f ### Compiler tools -The compiler binary can now execute external programs as subcommands. +The compiler binary can now execute external programs as subcommands: +`crystal foo` tries to run `crystal-foo` if `foo` is not an internal command. This allows us to split the compiler binary into separate executables which helps improve iteration speed ([#14953]). From 9b591680d2f196d8d415fbe298b2a84466eff030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 9 Oct 2024 12:29:49 +0200 Subject: [PATCH 09/15] Fix references --- _releases/2024-10-09-1.14.0-released.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index 59b32aee..e0ef015c 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -167,7 +167,7 @@ applicant.to_www_form # => "first_name=John&last_name=Doe&qualities=kind&qualiti *Thanks [@Blacksmoke16]* -In a related matter, `URI` is now applicable as a key in JSON objects via `URI.from_json_object_key?` and `URI#to_json_object_key` ([#14834]). +In a related matter, `URI` is now applicable as a key in JSON objects via `URI.from_json_object_key?` ([#14834]). *Thanks [@nobodywasishere]* @@ -218,7 +218,7 @@ improve iteration speed ([#14953]). ## Deprecations -`Pointer.new(Int)` ([#14875]) was deprecated in favour of `Process.new(UInt64)`. +`Pointer.new(Int)` was deprecated in favour of `Pointer.new(UInt64)` ([#14875]). Deprecation warnings for argument type that autocast to `UInt64` can be ignored or disabled by explicitly casting to `UInt64`. @@ -226,8 +226,10 @@ or disabled by explicitly casting to `UInt64`. [#14875]: https://github.com/crystal-lang/crystal/pull/14875 -We updated a couple of APIs that used `Number` to represent a time span. `Benchmark.ips` ([#14805]) -and `::sleep(Number)` ([#14962]) explicitly require `Time::Span`. You can convert bare numbers with `Number#seconds` to use the valid overload. +We updated a couple of APIs that receive a time span argument. +`Benchmark.ips` ([#14805]) and `::sleep` ([#14962]) now explicitly require +`Time::Span`. The overloads with `Number` are deprecated. +You can convert bare numbers with `Int#seconds` to use the valid overload. *Thanks [@HertzDevil]* From dc3311a4fbd6adaf9ae750470706aeb2ded06f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 9 Oct 2024 12:30:00 +0200 Subject: [PATCH 10/15] Shorten *Performance* section --- _releases/2024-10-09-1.14.0-released.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index e0ef015c..0b322d1f 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -187,21 +187,13 @@ improve iteration speed ([#14953]). ### Performance -- *(codegen)* Reduce calls to `Crystal::Type#remove_indirection` in module dispatch ([#14992]). +This release includes some minor performance improvements, particularly in the +compiler ([#14748], [#14992], [#15002]). -*Thanks [@HertzDevil]* - -[#14992]: https://github.com/crystal-lang/crystal/pull/14992 - -- Avoid unwinding the stack on hot path in method call lookups ([#15002]). - -*Thanks [@ggiraldez]* - -- *(codegen)* Compiler: enable parallel codegen with MT ([#14748]). - -*Thanks [@ysbaddaden]* +*Thanks [@ysbaddaden], [@HertzDevil], [@ggiraldez]* [#15002]: https://github.com/crystal-lang/crystal/pull/15002 +[#14992]: https://github.com/crystal-lang/crystal/pull/14992 [#14748]: https://github.com/crystal-lang/crystal/pull/14748 ### Dependency Updates From 69ceec6ab965b596dc29e01178722502efcd4cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 9 Oct 2024 12:34:00 +0200 Subject: [PATCH 11/15] Add missing reference --- _releases/2024-10-09-1.14.0-released.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index 0b322d1f..f55f777d 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -71,6 +71,8 @@ Allow `^` in constant numeric expressions ([#14951]). This operator was oddly mi *Thanks [@kamil-gwozdz]* +[#14890]: https://github.com/crystal-lang/crystal/pull/14890 + ### Standard library The `WaitGroup` concurrency primitive gains some convenience methods, From 405a8ece23bbb858cbb983e116cba18df7368c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 9 Oct 2024 14:52:24 +0200 Subject: [PATCH 12/15] Clarify ARM64 Windows compiler status --- _releases/2024-10-09-1.14.0-released.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index f55f777d..2934d5fe 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -117,9 +117,9 @@ Windows support is making good progress. The interpreter runs on Windows ([#14964]). There is still a limitation: networking does not work due to [#12495]. -And Crystal now runs on ARM64 Windows, i.e. the `aarch64-windows-msvc` target. -Both standard library and the compiler should work. It's not 100% polished, but -looking pretty well. Read [#14911] for details on how to test it out. +And the compiler can now target ARM64 Windows, i.e. `aarch64-windows-msvc`. +It's not 100% polished, but looking pretty well. Read [#14911] for details on how to test it out. +Currently we still need to cross-compile because the compiler itself does not run on ARM64 Windows yet. Starting with this release, DNS requests resolve asynchronously on Windows ([#14979]). It's actually the first platform to support that. From 89285e13c7fe8736216a9756a1e3f3a8c682ab2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 9 Oct 2024 14:53:25 +0200 Subject: [PATCH 13/15] Fill stats --- _releases/2024-10-09-1.14.0-released.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index 2934d5fe..f1fba803 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -13,8 +13,8 @@ installation instructions. ## Stats -This release includes [❓ changes since 1.13.3](https://github.com/crystal-lang/crystal/pulls?q=is%3Apr+milestone%3A1.14.0) -by ❓ contributors. We thank all the contributors for all the effort put into +This release includes [134 changes since 1.13.3](https://github.com/crystal-lang/crystal/pulls?q=is%3Apr+milestone%3A1.14.0) +by 31 contributors. We thank all the contributors for all the effort put into improving the language! ❤️ ## Advances in multi-threading support From 390d88f413a93bef077ab42a2d7089e04e4366f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 9 Oct 2024 14:53:42 +0200 Subject: [PATCH 14/15] fixup --- _releases/2024-10-09-1.14.0-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index f1fba803..986adf6b 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -14,7 +14,7 @@ installation instructions. ## Stats This release includes [134 changes since 1.13.3](https://github.com/crystal-lang/crystal/pulls?q=is%3Apr+milestone%3A1.14.0) -by 31 contributors. We thank all the contributors for all the effort put into +by 13 contributors. We thank all the contributors for all the effort put into improving the language! ❤️ ## Advances in multi-threading support From 1920d3072dedeed81d8cb18f4c28edef405d6127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 9 Oct 2024 13:47:11 +0200 Subject: [PATCH 15/15] Add API doc links --- _releases/2024-10-09-1.14.0-released.md | 49 +++++++++++++++++-------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/_releases/2024-10-09-1.14.0-released.md b/_releases/2024-10-09-1.14.0-released.md index 986adf6b..1682d385 100644 --- a/_releases/2024-10-09-1.14.0-released.md +++ b/_releases/2024-10-09-1.14.0-released.md @@ -36,29 +36,33 @@ For more details, visit the [full changelog](https://github.com/crystal-lang/cry ### Breaking -⚠️ `Slice#[start, count]` now accepts a negative index for `start`, like similar methods already do. +⚠️ [`Slice#[start, count]`][slice_accessor] now accepts a negative index for `start`, like similar methods already do. This would break existing code that depends on the current behaviour that a negative start index raises `IndexError` ([#14778]). +[slice_accessor]: https://crystal-lang.org/api/1.14.0/Slice.html#%5B%5D%28start%3AInt%2Ccount%3AInt%29%3ASlice%28T%29-instance-method [#14778]: https://github.com/crystal-lang/crystal/pull/14778 -⚠️ Finalizers for `Socket` and `IO::FileDescriptor` do no longer flush. +⚠️ Finalizers for [`Socket`] and [`IO::FileDescriptor`] do no longer flush. We realized that flushing is too heavy for a finalizer, as it might involve the event loop and even memory allocations which must be strictly avoided in a finalizer. Be sure to always flush before letting a stream go out of scope, ideally with an explicit `#close` ([#14882]). +[`Socket`]: https://crystal-lang.org/api/1.14.0/Socket.html +[`IO::FileDescriptor`]: https://crystal-lang.org/api/1.14.0/IO/FileDescriptor.html [#14882]: https://github.com/crystal-lang/crystal/pull/14882 -⚠️ `XML::Error.errors` had been deprecated since [1.7.0](/_releases/2023-01-09-1.7.0-released.md), but continued to work. +⚠️ [`XML::Error.errors`] had been deprecated since [1.7.0](/_releases/2023-01-09-1.7.0-released.md), but continued to work. This unconditioned availability causes a serious memory leak, which cannot be fixed without disabling `XML::Error.errors`. In order to make this obvious, calling the method causes a compile time error now. ([#14936]). +[`XML::Error.errors`]: https://crystal-lang.org/api/1.14.0/XML/Error.html#errors:Array(XML::Error)|Nil-class-method [#14936]: https://github.com/crystal-lang/crystal/pull/14936 ⚠️ `Hash::Entry` has been removed from public API docs. It was never intended to be a public type. ([#14881]). -*Thanks [@ysbaddaden], [@straight-shoota] and [@Blacksmoke16]* - [#14881]: https://github.com/crystal-lang/crystal/pull/14881 +*Thanks [@ysbaddaden], [@straight-shoota] and [@Blacksmoke16]* + ### Language features Allow `^` in constant numeric expressions ([#14951]). This operator was oddly missing even though `|` and `&` were already supported. @@ -75,8 +79,8 @@ Allow `^` in constant numeric expressions ([#14951]). This operator was oddly mi ### Standard library -The `WaitGroup` concurrency primitive gains some convenience methods, -`WaitGroup.wait` and `WaitGroup#spawn` ([#14837]). +The [`WaitGroup`] concurrency primitive gains some convenience methods, +[`WaitGroup.wait`] and [`WaitGroup#spawn`] ([#14837]). ```crystal require "wait_group" @@ -91,13 +95,18 @@ end *Thanks [@jgaskins]* +[`WaitGroup`]: https://crystal-lang.org/api/1.14.0/WaitGroup.html +[`WaitGroup.wait`]: https://crystal-lang.org/api/1.14.0/WaitGroup.html#wait%3ANil-instance-method +[`WaitGroup#spawn`]: https://crystal-lang.org/api/1.14.0/WaitGroup.html#spawn%28%26block%29%3AFiber-instance-method [#14837]: https://github.com/crystal-lang/crystal/pull/14837 -There are two new methods for working with slices: `Slice#same?`checks +There are two new methods for working with slices: [`Slice#same?`] checks if two slices point to the same memory ([#14728]). -And `Pointer::Appender#to_slice` ([#14874]) makes it easy to create a slice +And [`Pointer::Appender#to_slice`] ([#14874]) makes it easy to create a slice containing the items from an appender. +[`Slice#same?`]: https://crystal-lang.org/api/1.14.0/Slice.html#same?(other:self):Bool-instance-method +[`Pointer::Appender#to_slice`]: https://crystal-lang.org/api/1.14.0/Pointer/Appender.html#to_slice:Slice(T)-instance-method [#14728]: https://github.com/crystal-lang/crystal/pull/14728 [#14874]: https://github.com/crystal-lang/crystal/pull/14874 @@ -149,7 +158,7 @@ And we add implementations of `System::User` ([#14933]) and `System::Group` on W ### `URI::Params` -`URI::Params::Serializable` is a new serialization API which works similar to +[`URI::Params::Serializable`] is a new serialization API which works similar to the JSON and YAML variants, but for the URI query parameters format ([#14684]). ```crystal @@ -167,12 +176,16 @@ applicant # => Applicant(@first_name="John", @last_name="Doe", @qualities=["kind applicant.to_www_form # => "first_name=John&last_name=Doe&qualities=kind&qualities=smart" ``` +[`URI::Params::Serializable`]: https://crystal-lang.org/api/1.14.0/URI/Params/Serializable.html + *Thanks [@Blacksmoke16]* -In a related matter, `URI` is now applicable as a key in JSON objects via `URI.from_json_object_key?` ([#14834]). +In a related matter, `URI` is now applicable as a key in JSON objects via [`URI.from_json_object_key?`] ([#14834]). *Thanks [@nobodywasishere]* +[`URI.from_json_object_key?`]: https://crystal-lang.org/api/1.14.0/URI.html#from_json_object_key%3F%28key%3AString%29%3AURI%7CNil-class-method + [#14834]: https://github.com/crystal-lang/crystal/pull/14834 [#14684]: https://github.com/crystal-lang/crystal/pull/14684 @@ -212,24 +225,28 @@ compiler ([#14748], [#14992], [#15002]). ## Deprecations -`Pointer.new(Int)` was deprecated in favour of `Pointer.new(UInt64)` ([#14875]). +[`Pointer.new(Int)`] was deprecated in favour of `Pointer.new(UInt64)` ([#14875]). Deprecation warnings for argument type that autocast to `UInt64` can be ignored or disabled by explicitly casting to `UInt64`. *Thanks [@straight-shoota]* +[`Pointer.new(Int)`]: https://crystal-lang.org/api/1.14.0/Pointer.html#new(address:Int)-class-method [#14875]: https://github.com/crystal-lang/crystal/pull/14875 We updated a couple of APIs that receive a time span argument. -`Benchmark.ips` ([#14805]) and `::sleep` ([#14962]) now explicitly require -`Time::Span`. The overloads with `Number` are deprecated. -You can convert bare numbers with `Int#seconds` to use the valid overload. +[`Benchmark.ips`] ([#14805]) and [`::sleep`] ([#14962]) now explicitly require +[`Time::Span`]. The overloads with `Number` are deprecated. +You can convert bare numbers with [`Int#seconds`] to use the valid overload. *Thanks [@HertzDevil]* [#14805]: https://github.com/crystal-lang/crystal/pull/14805 [#14962]: https://github.com/crystal-lang/crystal/pull/14962 - +[`Benchmark.ips`]: https://crystal-lang.org/api/1.14.0/Benchmark.html#ips%28calculation%3ATime%3A%3ASpan%3D5.seconds%2Cwarmup%3ATime%3A%3ASpan%3D2.seconds%2Cinteractive%3ABool%3DSTDOUT.tty%3F%2C%26%29-instance-method +[`::sleep`]: https://crystal-lang.org/api/1.14.0/toplevel.html#sleep%28time%3ATime%3A%3ASpan%29%3ANil-class-method +[`Time::Span`]: https://crystal-lang.org/api/1.14.0/Time/Span.html +[`Int#seconds`]: https://crystal-lang.org/api/1.14.0/Int.html#seconds:Time::Span-instance-method --- > **THANKS:**