Crystal 1.12.0 已发布!

  • New Crystal Release: Announced with several new features and bug fixes. Pre-built packages available on GitHub Releases and official distribution channels. See crystal-lang.org/install for instructions.

  • Breaking Changes: Respect alignments above alignof(Void*) inside union values. This is an ABI breaking change. Most users won't be affected. Thanks @HertzDevil.
  • Process Termination Handler: Process.on_terminate replaces Process.on_interrupt. It responds to more termination triggers and passes an instance of Process::ExitReason to the handler block. Thanks @stakach.
  • Concurrency Improvements:

    • Backtraces for unhandled exceptions in spawn are printed once in multi-threading mode.
    • It's now possible to disable blocking mode when opening a File.
    • Some issues with atomics and locks were fixed and Atomic operations now receive an optional parameter. New macro Atomic.fence adds explicit memory barriers. Thread got a name property. Init schedulers before spawning fibers and use per-scheduler stack pools. Thanks @ysbaddaden, @jgaskins.
  • Libraries: Enabled support for OpenSSL 3.2 by fixing a bug. Our own LLVM extension library libllvm_ext is no longer required when linking LLVM >= 18. Thanks @ysbaddaden, @HertzDevil.
  • Numeric: Added BigRational#%, #tdiv, #remainder. Thanks @HertzDevil.
  • Operators with = suffix: Operators ending with = can now receive multiple parameters and blocks and are properly forwarded by the delegate. The operator #[]= can be called with a block using method syntax. Thanks @HertzDevil.
  • Windows progress: Handled invalid parameter error in MSVC calls, installed system dependencies in the Windows GUI installer, automatically detected MSVC tools on Windows interpreter, supported @[Link]'s DLL search order in the interpreter, reserved stack space on non-main threads for crash recovery, and FileUtils.mv works across filesystems. Thanks @HertzDevil.
  • Misc: Added time zone identifier Etc/UTC as an implicit alias to UTC. Crystal::System::FileDescriptor::Handle is a generic alias. Hash#update and Hash#put_if_absent no longer put duplicate keys. New method Signal#trap_handler?. Added macro methods to several AST node types. Thanks @femto, @straight-shoota, @HertzDevil.
  • Compiler: Added CRYSTAL_CONFIG_CC compiler config variable. Supported NO_COLOR, --static on Windows, --single-module and --threads for eval and spec. Preliminary support for Solaris/illumos landed. New CLI option --frame-pointers. short_reference for top-level macros was changed. Thanks @straight-shoota, @HertzDevil, @refi64, @femto.
  • Compiler Dependencies: Managed with shards. The source code in lib/ stays vendored. Only used for updating dependencies. Thanks @straight-shoota.
  • crystal tool flags: A new compiler tool that prints all values passed to calls to macro flag?. Thanks @straight-shoota.
  • Formatter Enhancements: Improved formatter for ProcLiterals, asm with comments, white space in a.[b] syntax, calls without parentheses followed by doc comment, and whitespace in foo (). Thanks @HertzDevil, @straight-shoota.
  • Shards 0.18.0: Bundled shards release updated. Brought enhancements for Windows support, such as more cache directories, detection of symlink creation capability, and more improvements on internal tooling. Starting with this release, shards' output is only colored if stdout is a TTY. Thanks @HertzDevil, @straight-shoota.
  • Experimental: ReferenceStorage: Improved implementation with no compatibility issues. Represents a static buffer for a reference allocation. These APIs are still experimental. Thanks @HertzDevil.
  • Deprecations: Setter methods for timeouts with Number parameter, compile time flag openbsd6.2 got removed, and the spec runner's state moved into Spec::CLI.
  • Thanks: Thanks to 84codes and every other sponsor. Reach out to crystal@manas.tech for sponsorship or other support.
阅读 10
0 条评论