From f8d6a4ef577f518ecc2fbb62caf00bcc57d887b0 Mon Sep 17 00:00:00 2001 From: Crys <159441349+crysbot@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:56:14 +0200 Subject: [PATCH 01/10] Only set up Cygwin on Windows CI if truly required (#15661) (#15713) Co-authored-by: Quinton Miller --- .github/workflows/win.yml | 28 ++++++++++++++-------------- etc/win-ci/build-iconv.ps1 | 2 ++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 9548aa21bbaf..5cf959e0894d 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -23,13 +23,6 @@ jobs: - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - - name: Set up Cygwin - uses: cygwin/cygwin-install-action@f61179d72284ceddc397ed07ddb444d82bf9e559 # v5 - with: - packages: make - install-dir: C:\cygwin64 - add-to-path: false - - name: Download Crystal source uses: actions/checkout@v4 @@ -48,6 +41,13 @@ jobs: libs/yaml.lib libs/xml2.lib key: win-libs-${{ hashFiles('.github/workflows/win.yml', 'etc/win-ci/*.ps1') }}-msvc + - name: Set up Cygwin + if: steps.cache-libs.outputs.cache-hit != 'true' + uses: cygwin/cygwin-install-action@f61179d72284ceddc397ed07ddb444d82bf9e559 # v5 + with: + packages: make + install-dir: C:\cygwin64 + add-to-path: false - name: Build libgc if: steps.cache-libs.outputs.cache-hit != 'true' run: .\etc\win-ci\build-gc.ps1 -BuildTree deps\gc -Version 8.2.8 -AtomicOpsVersion 7.8.2 @@ -102,13 +102,6 @@ jobs: - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - - name: Set up Cygwin - uses: cygwin/cygwin-install-action@f61179d72284ceddc397ed07ddb444d82bf9e559 # v5 - with: - packages: make - install-dir: C:\cygwin64 - add-to-path: false - - name: Download Crystal source uses: actions/checkout@v4 @@ -136,6 +129,13 @@ jobs: dlls/yaml.dll dlls/libxml2.dll key: win-dlls-${{ hashFiles('.github/workflows/win.yml', 'etc/win-ci/*.ps1') }}-msvc + - name: Set up Cygwin + if: steps.cache-dlls.outputs.cache-hit != 'true' + uses: cygwin/cygwin-install-action@f61179d72284ceddc397ed07ddb444d82bf9e559 # v5 + with: + packages: make + install-dir: C:\cygwin64 + add-to-path: false - name: Build libgc if: steps.cache-dlls.outputs.cache-hit != 'true' run: .\etc\win-ci\build-gc.ps1 -BuildTree deps\gc -Version 8.2.8 -AtomicOpsVersion 7.8.2 -Dynamic diff --git a/etc/win-ci/build-iconv.ps1 b/etc/win-ci/build-iconv.ps1 index 541066c6327f..30c63565a137 100644 --- a/etc/win-ci/build-iconv.ps1 +++ b/etc/win-ci/build-iconv.ps1 @@ -14,6 +14,8 @@ rm libiconv.tar.gz Run-InDirectory $BuildTree { $env:CHERE_INVOKING = 1 + [System.IO.File]::WriteAllText("src\Makefile.in", [System.IO.File]::ReadAllText("src\Makefile.in").Replace("chmod 777 .", "true")) + & 'C:\cygwin64\bin\bash.exe' --login "$PSScriptRoot\cygwin-build-iconv.sh" "$Version" "$(if ($Dynamic) { 1 })" if (-not $?) { Write-Host "Error: Failed to build libiconv" -ForegroundColor Red From ac360a059fce15ea373d9dbbd1357913301078c8 Mon Sep 17 00:00:00 2001 From: Crys <159441349+crysbot@users.noreply.github.com> Date: Mon, 28 Apr 2025 15:23:37 +0200 Subject: [PATCH 02/10] Add `__crystal_raise_cast_failed` for non-interpreted code (#15708) (#15712) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Quinton Miller Co-authored-by: Johannes Müller --- src/compiler/crystal/codegen/codegen.cr | 116 ++++++++++++++++-------- src/raise.cr | 9 ++ 2 files changed, 88 insertions(+), 37 deletions(-) diff --git a/src/compiler/crystal/codegen/codegen.cr b/src/compiler/crystal/codegen/codegen.cr index 80c6cd2f9720..0e7aa7e60e98 100644 --- a/src/compiler/crystal/codegen/codegen.cr +++ b/src/compiler/crystal/codegen/codegen.cr @@ -7,15 +7,16 @@ require "./llvm_builder_helper" require "./abi/*" module Crystal - MAIN_NAME = "__crystal_main" - RAISE_NAME = "__crystal_raise" - RAISE_OVERFLOW_NAME = "__crystal_raise_overflow" - MALLOC_NAME = "__crystal_malloc64" - MALLOC_ATOMIC_NAME = "__crystal_malloc_atomic64" - REALLOC_NAME = "__crystal_realloc64" - GET_EXCEPTION_NAME = "__crystal_get_exception" - ONCE_INIT = "__crystal_once_init" - ONCE = "__crystal_once" + MAIN_NAME = "__crystal_main" + RAISE_NAME = "__crystal_raise" + RAISE_OVERFLOW_NAME = "__crystal_raise_overflow" + RAISE_CAST_FAILED_NAME = "__crystal_raise_cast_failed" + MALLOC_NAME = "__crystal_malloc64" + MALLOC_ATOMIC_NAME = "__crystal_malloc_atomic64" + REALLOC_NAME = "__crystal_realloc64" + GET_EXCEPTION_NAME = "__crystal_get_exception" + ONCE_INIT = "__crystal_once_init" + ONCE = "__crystal_once" class Program def run(code, filename : String? = nil, debug = Debug::Default) @@ -265,6 +266,7 @@ module Crystal @malloc_atomic_fun : LLVMTypedFunction? @realloc_fun : LLVMTypedFunction? @raise_overflow_fun : LLVMTypedFunction? + @raise_cast_failed_fun : LLVMTypedFunction? @c_malloc_fun : LLVMTypedFunction? @c_realloc_fun : LLVMTypedFunction? @@ -470,7 +472,7 @@ module Crystal case node.name when MALLOC_NAME, MALLOC_ATOMIC_NAME, REALLOC_NAME, RAISE_NAME, @codegen.personality_name, GET_EXCEPTION_NAME, RAISE_OVERFLOW_NAME, - ONCE_INIT, ONCE + RAISE_CAST_FAILED_NAME, ONCE_INIT, ONCE @codegen.accept node end @@ -1488,11 +1490,7 @@ module Crystal cond cmp, matches_block, doesnt_match_block position_at_end doesnt_match_block - - temp_var_name = @program.new_temp_var_name - context.vars[temp_var_name] = LLVMVar.new(last_value, obj_type, already_loaded: true) - accept type_cast_exception_call(obj_type, to_type, node, temp_var_name) - context.vars.delete temp_var_name + codegen_raise_cast_failed(type_id, to_type, node) position_at_end matches_block @last = downcast last_value, resulting_type, obj_type, true @@ -1548,28 +1546,6 @@ module Crystal false end - def type_cast_exception_call(from_type, to_type, node, var_name) - pieces = [ - StringLiteral.new("Cast from ").at(node), - Call.new(Var.new(var_name).at(node), "class").at(node), - StringLiteral.new(" to #{to_type} failed").at(node), - ] of ASTNode - - if location = node.location - pieces << StringLiteral.new(", at #{location.expanded_location}:#{location.line_number}").at(node) - end - - ex = Call.new(Path.global("TypeCastError").at(node), "new", StringInterpolation.new(pieces).at(node)).at(node) - call = Call.global("raise", ex).at(node) - call = @program.normalize(call) - - meta_vars = MetaVars.new - meta_vars[var_name] = MetaVar.new(var_name, type: from_type) - visitor = MainVisitor.new(@program, meta_vars) - @program.visit_main call, visitor: visitor - call - end - def cant_pass_closure_to_c_exception_call @cant_pass_closure_to_c_exception_call ||= begin call = Call.global("raise", StringLiteral.new("passing a closure to C is not allowed")).at(UNKNOWN_LOCATION) @@ -1579,6 +1555,63 @@ module Crystal end end + def codegen_raise_cast_failed(type_id, to_type, node) + location = node.location + set_current_debug_location(location) if location && @debug.line_numbers? + + func = crystal_raise_cast_failed_fun + call_args = [ + cast_to_void_pointer(type_id_to_class_name(type_id)), + cast_to_void_pointer(build_string_constant(to_type.to_s)), + location ? cast_to_void_pointer(build_string_constant(location.expanded_location.to_s)) : llvm_context.void_pointer.null, + ] of LLVM::Value + + if (rescue_block = @rescue_block) + invoke_out_block = new_block "invoke_out" + invoke func, call_args, invoke_out_block, rescue_block + position_at_end invoke_out_block + else + call func, call_args + end + + unreachable + end + + def type_id_to_class_name(type_id) + fun_name = "~type_id_to_class_name" + func = typed_fun?(@main_mod, fun_name) || create_type_id_to_class_name_fun(fun_name) + func = check_main_fun fun_name, func + call func, type_id + end + + # See also: `#create_metaclass_fun` + def create_type_id_to_class_name_fun(name) + in_main do + define_main_function(name, [llvm_context.int32], llvm_type(@program.string)) do |func| + set_internal_fun_debug_location(func, name) + + arg = func.params.first + + current_block = insert_block + + cases = {} of LLVM::Value => LLVM::BasicBlock + @program.llvm_id.@ids.each do |type, (_, type_id)| + block = new_block "type_#{type_id}" + cases[int32(type_id)] = block + position_at_end block + ret build_string_constant(type.to_s) + end + + otherwise = new_block "otherwise" + position_at_end otherwise + unreachable + + position_at_end current_block + @builder.switch arg, otherwise, cases + end + end + end + def visit(node : IsA) codegen_type_filter node, &.filter_by(node.const.type) end @@ -2315,6 +2348,15 @@ module Crystal end end + def crystal_raise_cast_failed_fun + @raise_cast_failed_fun ||= typed_fun?(@main_mod, RAISE_CAST_FAILED_NAME) + if raise_cast_failed_fun = @raise_cast_failed_fun + check_main_fun RAISE_CAST_FAILED_NAME, raise_cast_failed_fun + else + raise Error.new("Missing __crystal_raise_cast_failed function, either use std-lib's prelude or define it") + end + end + # Fallbacks to libc malloc and realloc when the expected __crystal_* # functions aren't defined (e.g. empty prelude). We only use them in tests # that don't require the prelude, so they don't require the GC. diff --git a/src/raise.cr b/src/raise.cr index 7ebb18f1320e..ab5d9a576fbf 100644 --- a/src/raise.cr +++ b/src/raise.cr @@ -301,4 +301,13 @@ end def __crystal_raise_cast_failed(obj, type_name : String, location : String) raise TypeCastError.new("Cast from #{obj.class} to #{type_name} failed, at #{location}") end +{% else %} + # :nodoc: + fun __crystal_raise_cast_failed(from_type : Void*, to_type : Void*, location : Void*) : NoReturn + if location + raise TypeCastError.new("Cast from #{from_type.as(String)} to #{to_type.as(String)} failed, at #{location.as(String)}") + else + raise TypeCastError.new("Cast from #{from_type.as(String)} to #{to_type.as(String)} failed") + end + end {% end %} From ec9cc9c849651cac273ca0837be8746d6660d549 Mon Sep 17 00:00:00 2001 From: Crys <159441349+crysbot@users.noreply.github.com> Date: Mon, 28 Apr 2025 15:23:53 +0200 Subject: [PATCH 03/10] Fix: CRYSTAL_LOAD_DEBUG_INFO=1 fails with -Dexecution_context (#15704) (#15715) Co-authored-by: Julien Portalier --- src/kernel.cr | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kernel.cr b/src/kernel.cr index 054705c55e5b..a9e372174d49 100644 --- a/src/kernel.cr +++ b/src/kernel.cr @@ -599,6 +599,12 @@ end {% end %} {% unless flag?(:interpreted) || flag?(:wasm32) %} + {% if flag?(:execution_context) %} + Fiber::ExecutionContext.init_default_context + {% else %} + Crystal::Scheduler.init + {% end %} + # load debug info on start up of the program is executed with CRYSTAL_LOAD_DEBUG_INFO=1 # this will make debug info available on print_frame that is used by Crystal's segfault handler # @@ -608,12 +614,6 @@ end Exception::CallStack.load_debug_info if ENV["CRYSTAL_LOAD_DEBUG_INFO"]? == "1" Exception::CallStack.setup_crash_handler - {% if flag?(:execution_context) %} - Fiber::ExecutionContext.init_default_context - {% else %} - Crystal::Scheduler.init - {% end %} - {% if flag?(:win32) %} Crystal::System::Process.start_interrupt_loop {% else %} From eb726d602e5b9b3c8593566d56f5b92e43578cf7 Mon Sep 17 00:00:00 2001 From: Crys <159441349+crysbot@users.noreply.github.com> Date: Mon, 28 Apr 2025 16:25:12 +0200 Subject: [PATCH 04/10] Fix show `unit_separator` in `#humanize_bytes` with empty prefix (#15683) (#15717) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Johannes Müller --- spec/std/humanize_spec.cr | 1 + src/humanize.cr | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/std/humanize_spec.cr b/spec/std/humanize_spec.cr index e4230540804d..1505bcab19d0 100644 --- a/spec/std/humanize_spec.cr +++ b/spec/std/humanize_spec.cr @@ -301,6 +301,7 @@ describe Int do it { assert_prints 1099511627776.humanize_bytes(format: Int::BinaryPrefixFormat::JEDEC), "1.0TB" } it { assert_prints 1125899906842624.humanize_bytes(format: Int::BinaryPrefixFormat::JEDEC), "1.0PB" } it { assert_prints 1152921504606846976.humanize_bytes(format: Int::BinaryPrefixFormat::JEDEC), "1.0EB" } + it { assert_prints 1.humanize_bytes(format: Int::BinaryPrefixFormat::JEDEC, unit_separator: '\u2009'), "1\u2009B" } it { assert_prints 1152921504606846976.humanize_bytes(format: Int::BinaryPrefixFormat::JEDEC, unit_separator: '\u2009'), "1.0\u2009EB" } it { assert_prints 1024.humanize_bytes(format: Int::BinaryPrefixFormat::IEC), "1.0kiB" } diff --git a/src/humanize.cr b/src/humanize.cr index e3e4ed4428c7..e0a5f3f17844 100644 --- a/src/humanize.cr +++ b/src/humanize.cr @@ -326,7 +326,7 @@ struct Int # # See `Number#humanize` for more details on the behaviour and arguments. def humanize_bytes(io : IO, precision : Int = 3, separator = '.', *, significant : Bool = true, unit_separator = nil, format : BinaryPrefixFormat = :IEC) : Nil - humanize(io, precision, separator, nil, base: 1024, significant: significant) do |magnitude| + humanize(io, precision, separator, nil, base: 1024, significant: significant, unit_separator: unit_separator) do |magnitude| magnitude = Number.prefix_index(magnitude) prefix = Number.si_prefix(magnitude) @@ -334,9 +334,9 @@ struct Int unit = "B" else if format.iec? - unit = "#{unit_separator}#{prefix}iB" + unit = "#{prefix}iB" else - unit = "#{unit_separator}#{prefix.upcase}B" + unit = "#{prefix.upcase}B" end end {magnitude, unit, magnitude > 0} From 4d2525fa0f51c595e843ea0d88ee6ec63c052888 Mon Sep 17 00:00:00 2001 From: Crys <159441349+crysbot@users.noreply.github.com> Date: Mon, 28 Apr 2025 16:25:42 +0200 Subject: [PATCH 05/10] Do not add `ReferenceStorage` to `Value`'s subclasses twice (#15706) (#15718) Co-authored-by: Quinton Miller --- spec/compiler/semantic/reference_storage_spec.cr | 10 ++++++++++ src/compiler/crystal/semantic/top_level_visitor.cr | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/spec/compiler/semantic/reference_storage_spec.cr b/spec/compiler/semantic/reference_storage_spec.cr index a0c0f2343260..15857169a6d5 100644 --- a/spec/compiler/semantic/reference_storage_spec.cr +++ b/spec/compiler/semantic/reference_storage_spec.cr @@ -69,4 +69,14 @@ describe "Semantic: ReferenceStorage" do MyRef(Foo).new.u CRYSTAL end + + it "adds ReferenceStorage to Value.subclasses once (#15677)" do + assert_type(<<-CRYSTAL) { bool } + @[Primitive(:ReferenceStorageType)] + struct ReferenceStorage(T) < Value + end + + {{ Value.subclasses.select(&.<=(ReferenceStorage)).size == 1 ? true : nil }} + CRYSTAL + end end diff --git a/src/compiler/crystal/semantic/top_level_visitor.cr b/src/compiler/crystal/semantic/top_level_visitor.cr index a7c4980f8139..1abbf1d81d1b 100644 --- a/src/compiler/crystal/semantic/top_level_visitor.cr +++ b/src/compiler/crystal/semantic/top_level_visitor.cr @@ -120,7 +120,7 @@ class Crystal::TopLevelVisitor < Crystal::SemanticVisitor when node.splat_index node.raise "BUG: Expected ReferenceStorageType to have no splat parameter" end - type = GenericReferenceStorageType.new @program, scope, name, @program.value, type_vars + type = GenericReferenceStorageType.new @program, scope, name, @program.value, type_vars, false type.declare_instance_var("@type_id", @program.int32) type.can_be_stored = false end From d2e773bb4ea0f604366bfe6de9d75f464b2e5611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Mon, 28 Apr 2025 16:29:51 +0200 Subject: [PATCH 06/10] [CI] Fix package shards on MinGW (#15719) --- .github/workflows/mingw-w64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mingw-w64.yml b/.github/workflows/mingw-w64.yml index bc4b4c26306c..d1a71f19f821 100644 --- a/.github/workflows/mingw-w64.yml +++ b/.github/workflows/mingw-w64.yml @@ -59,7 +59,7 @@ jobs: shell: msys2 {0} working-directory: ./shards run: | - make install PREFIX="$(pwd)/../crystal" + make install PREFIX="$(pwd)/../crystal" SHARDS=false # FIXME: remove after crystal-lang/shards#668 ldd bin/shards.exe | grep -iv ' => /c/windows/system32' | sed 's/.* => //; s/ (.*//' | xargs -t -i /usr/bin/install -m 0755 '{}' "$(pwd)/../crystal/bin/" From 1816faf407f7bce596042d0fa975b8bea3d01212 Mon Sep 17 00:00:00 2001 From: Crys <159441349+crysbot@users.noreply.github.com> Date: Mon, 28 Apr 2025 23:56:45 +0200 Subject: [PATCH 07/10] Fix `-Dtracing` raises math overflows on fiber sleep (#15722) (#15725) Co-authored-by: Julien Portalier --- src/crystal/tracing.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crystal/tracing.cr b/src/crystal/tracing.cr index af363182a3e9..7d853ed066bc 100644 --- a/src/crystal/tracing.cr +++ b/src/crystal/tracing.cr @@ -106,7 +106,7 @@ module Crystal end def write(value : Time::Span) : Nil - write(value.seconds * Time::NANOSECONDS_PER_SECOND + value.nanoseconds) + write(value.seconds &* Time::NANOSECONDS_PER_SECOND &+ value.nanoseconds) end def write(value : Bool) : Nil From 5454f2e5c4ca70579f88f7a324669cc250ecfca7 Mon Sep 17 00:00:00 2001 From: Crys <159441349+crysbot@users.noreply.github.com> Date: Tue, 29 Apr 2025 00:48:15 +0200 Subject: [PATCH 08/10] Fix `Fiber::ExecutionContext::Isolated#wait` must suspend fiber (#15720) (#15723) Co-authored-by: Julien Portalier --- src/fiber/execution_context/isolated.cr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fiber/execution_context/isolated.cr b/src/fiber/execution_context/isolated.cr index fe7698c70ef9..c15b6cafed53 100644 --- a/src/fiber/execution_context/isolated.cr +++ b/src/fiber/execution_context/isolated.cr @@ -191,9 +191,12 @@ module Fiber::ExecutionContext def wait : Nil if @running node = Fiber::PointerLinkedListNode.new(Fiber.current) + @mutex.synchronize do @wait_list.push(pointerof(node)) if @running end + + Fiber.suspend end if exception = @exception From 8ba2cafd0f93312490a8722af65f8a4b8ec37c6a Mon Sep 17 00:00:00 2001 From: Crys <159441349+crysbot@users.noreply.github.com> Date: Tue, 29 Apr 2025 00:55:40 +0200 Subject: [PATCH 09/10] Fix run win32 console reader in bare thread (#15724) (#15726) Co-authored-by: Julien Portalier --- src/crystal/system/win32/file_descriptor.cr | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/crystal/system/win32/file_descriptor.cr b/src/crystal/system/win32/file_descriptor.cr index 333f3c5a617d..8072ad54a3b6 100644 --- a/src/crystal/system/win32/file_descriptor.cr +++ b/src/crystal/system/win32/file_descriptor.cr @@ -519,11 +519,11 @@ private module ConsoleUtils @@read_requests = Deque(ReadRequest).new @@bytes_read = Deque(Int32).new @@mtx = ::Thread::Mutex.new - {% if flag?(:execution_context) %} - @@reader_thread = ::Fiber::ExecutionContext::Isolated.new("READER-LOOP") { reader_loop } - {% else %} - @@reader_thread = ::Thread.new { reader_loop } - {% end %} + + # Start a dedicated thread to block on reads from the console. Doesn't need an + # isolated execution context because there's no fiber communication (only + # thread communication) and only blocking I/O within the thread. + @@reader_thread = ::Thread.new { reader_loop } private def self.reader_loop while true From 84cb0b2a959db5d3e0381be54b690d8534100dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Tue, 29 Apr 2025 14:30:36 +0200 Subject: [PATCH 10/10] Changelog for 1.16.2 (#15716) --- CHANGELOG.md | 52 +++++++++++++++++++++++++++++++++++++++++++ shard.yml | 2 +- src/SOURCE_DATE_EPOCH | 2 +- src/VERSION | 2 +- 4 files changed, 55 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d14bccfb98ce..d7748fb35901 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,57 @@ # Changelog +## [1.16.2] (2025-04-29) + +[1.16.2]: https://github.com/crystal-lang/crystal/releases/1.16.2 + +### Bugfixes + +#### stdlib + +- *(numeric)* Fix show `unit_separator` in `#humanize_bytes` with empty prefix ([#15717], backported from [#15683], thanks @straight-shoota) +- *(runtime)* `CRYSTAL_LOAD_DEBUG_INFO=1` fails with `-Dexecution_context` ([#15715], backported from [#15704], thanks @ysbaddaden) +- *(runtime)* Fix `-Dtracing` raises math overflows on fiber sleep ([#15725], backported from [#15722], thanks @ysbaddaden) +- *(runtime)* Fix `Fiber::ExecutionContext::Isolated#wait` must suspend fiber ([#15723], backported from [#15720], thanks @ysbaddaden) +- *(runtime)* Fix run win32 console reader in bare thread ([#15726], backported from [#15724], thanks @ysbaddaden) + +[#15717]: https://github.com/crystal-lang/crystal/pull/15717 +[#15683]: https://github.com/crystal-lang/crystal/pull/15683 +[#15715]: https://github.com/crystal-lang/crystal/pull/15715 +[#15704]: https://github.com/crystal-lang/crystal/pull/15704 +[#15725]: https://github.com/crystal-lang/crystal/pull/15725 +[#15722]: https://github.com/crystal-lang/crystal/pull/15722 +[#15723]: https://github.com/crystal-lang/crystal/pull/15723 +[#15720]: https://github.com/crystal-lang/crystal/pull/15720 +[#15726]: https://github.com/crystal-lang/crystal/pull/15726 +[#15724]: https://github.com/crystal-lang/crystal/pull/15724 + +#### compiler + +- *(semantic)* Do not add `ReferenceStorage` to `Value`'s subclasses twice ([#15718], backported from [#15706], thanks @HertzDevil) + +[#15718]: https://github.com/crystal-lang/crystal/pull/15718 +[#15706]: https://github.com/crystal-lang/crystal/pull/15706 + +### Refactor + +#### compiler + +- *(codegen)* Add `__crystal_raise_cast_failed` for non-interpreted code ([#15712], backported from [#15708], thanks @HertzDevil) + +[#15712]: https://github.com/crystal-lang/crystal/pull/15712 +[#15708]: https://github.com/crystal-lang/crystal/pull/15708 + +### Infrastructure + +- Changelog for 1.16.2 ([#15716], thanks @straight-shoota) +- *(ci)* Fix package shards on MinGW ([#15719], thanks @straight-shoota) +- *(ci)* Only set up Cygwin on Windows CI if truly required ([#15713], backported from [#15661], thanks @HertzDevil) + +[#15716]: https://github.com/crystal-lang/crystal/pull/15716 +[#15719]: https://github.com/crystal-lang/crystal/pull/15719 +[#15713]: https://github.com/crystal-lang/crystal/pull/15713 +[#15661]: https://github.com/crystal-lang/crystal/pull/15661 + ## [1.16.1] (2025-04-16) [1.16.1]: https://github.com/crystal-lang/crystal/releases/1.16.1 diff --git a/shard.yml b/shard.yml index dc703dcf8cb0..45a4ed6266f8 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: crystal -version: 1.16.1 +version: 1.16.2 authors: - Crystal Core Team diff --git a/src/SOURCE_DATE_EPOCH b/src/SOURCE_DATE_EPOCH index bf217b0af061..5c266dc795fe 100644 --- a/src/SOURCE_DATE_EPOCH +++ b/src/SOURCE_DATE_EPOCH @@ -1 +1 @@ -1744761600 +1745884800 diff --git a/src/VERSION b/src/VERSION index 41c11ffb730c..4a02d2c3170b 100644 --- a/src/VERSION +++ b/src/VERSION @@ -1 +1 @@ -1.16.1 +1.16.2