github crystal-lang/crystal 1.17.0

latest release: 1.17.1
one month ago

Breaking changes

stdlib

Features

lang

stdlib

compiler

tools

Bugfixes

lang

  • [experimental] Do not use private linkage for slice literal buffers (#15746, thanks @HertzDevil)

stdlib

  • Require NO_COLOR to be non-empty (#15880, thanks @HertzDevil)
  • (benchmark) Use UInt64 to track iteration count during warm-up calculation in Benchmark::IPS (#15780, thanks @syeopite)
  • (collection) Fix Array#| for different item types (#15756, thanks @straight-shoota)
  • (concurrency) Fix calling Fiber::ExecutionContext#enqueue from bare Thread (#15767, thanks @ysbaddaden)
  • (concurrency) Simplify Crystal::System::Fiber::RESERVED_STACK_SIZE initializer on Windows (#15820, thanks @HertzDevil)
  • (concurrency) Do not print adjacent nodes in Thread::LinkedList#inspect (#15829, thanks @HertzDevil)
  • (files) Fix async append to file in IOCP (#15681, thanks @ysbaddaden)
  • (numeric) [regression] Fix BigFloat#format not compiling (#15796, thanks @HertzDevil)
  • (numeric) Never output exponent in BigDecimal#format (#15795, thanks @HertzDevil)
  • (numeric) Preserve precision when passing BigDecimal or BigFloat to sprintf %i (#15808, thanks @HertzDevil)
  • (numeric) Fix Float32#abs for signed zeros (#15814, thanks @HertzDevil)
  • (numeric) Ensure unary Float32#- and Float64#- flip sign bit (#15857, thanks @HertzDevil)
  • (runtime) reopen async File passed to Process.exec and .run (win32) (#15703, thanks @ysbaddaden)
  • (runtime) raise on manual fiber resume from sleep (#15744, thanks @ysbaddaden)
  • (runtime) race condition in Fiber::ExecutionContext::Isolated#wait (#15872, thanks @ysbaddaden)
  • (runtime) Prevent leaking memory when exec_recursive's block raises (#15893, thanks @straight-shoota)
  • (runtime) thread specs must test Thread, not Fiber::ExecutionContext::Isolated (#15909, thanks @ysbaddaden)
  • (system) Fix Path#relative_to for non-normalized anchor (#15737, thanks @straight-shoota)
  • (system) [regression] Skip src/termios.cr on Windows (#15852, thanks @HertzDevil)
  • (system) Suspend Windows processes until job objects are set up (#15850, thanks @HertzDevil)
  • (time) Fix Time::Location::InvalidTZDataError dropping default message (#15824, thanks @HertzDevil)
  • (time) Fix IANA time zone names for Windows system time zones (#15914, thanks @HertzDevil)

compiler

  • (codegen) Add file name to file-private virtual types during codegen (#15897, thanks @HertzDevil)
  • (codegen) Clear debug location of top-level implicit return (#15972, thanks @HertzDevil)
  • (codegen) Add file name to file-private generic instance metaclass types during codegen (#15974, thanks @HertzDevil)
  • (codegen) Add debug locations to metaclass nodes and typeof (#15971, thanks @HertzDevil)
  • (interpreter) Fix interpreter guard clauses for signal handling (#15892, thanks @straight-shoota)
  • (parser) Add end locations for Case, Asm, and Select (#15452, thanks @FnControlOption)
  • (parser) [regression] Fix stringification of Not as call receiver (#15801, thanks @Blacksmoke16)
  • (semantic) Fix cleanup of one-to-many assignment with untyped RHS (#15755, thanks @HertzDevil)
  • (semantic) Do not consider type in Crystal::Var#== (#15884, thanks @HertzDevil)

tools

  • (docs-generator) Handle doc locations when file is in parent directory (#15898, thanks @Blacksmoke16)
  • (macro-code-coverage) Better handle coverage reporting of MacroIf nodes with only MacroLiteral bodies (#15938, thanks @Blacksmoke16)

Chores

stdlib

compiler

other

Performance

lang

  • [experimental] Optimize slice literal codegen on LLVM 21 (#15803, thanks @HertzDevil)

stdlib

compiler

  • Apply performance improvement suggestions from ameba (#15839, thanks @straight-shoota)
  • (codegen) Simplify codegen of mixed-type checked integer addition and subtraction (#15878, thanks @HertzDevil)

Refactor

stdlib

  • (collection) Make offset a required parameter in Indexable#find (#15671, thanks @straight-shoota)
  • (crypto) Add extra Digest.update overloads for Bytes (#15736, thanks @straight-shoota)
  • (crypto) [experimental] Use Slice literals in Crypto::Bcrypt (#15781, thanks @HertzDevil)
  • (files) Ask system to decide non-blocking IO::FileDescriptor (win32) (#15753, thanks @ysbaddaden)
  • (files) Crystal::EventLoop::FileDescriptor#open now sets the non/blocking flag (#15754, thanks @ysbaddaden)
  • (networking) Use relative requires for http/ files (#15675, thanks @straight-shoota)
  • (networking) Split StaticFileHandler#call into structured components (#15678, thanks @straight-shoota)
  • (numeric) [experimental] Use Slice.literal for fast_float when supported (#15667, thanks @HertzDevil)
  • (numeric) Combine the decimal number printing implementations (#15815, thanks @HertzDevil)
  • (runtime) Extract bindings for LibC errno to src/lib_c/ (#15565, thanks @ysbaddaden)
  • (runtime) Extract Exception::CallStack.decode_backtrace_frame helper (#15615, thanks @ysbaddaden)
  • (runtime) Let Crystal::EventLoop#close do the actual close (not just cleanup) (#15641, thanks @ysbaddaden)
  • (serialization) Replace deprecated LibXML.xmlGcMemSetup with .xmlMemSetup (#15626, thanks @straight-shoota)
  • (serialization) XML: modernize API when available & workaround issues with legacy versions (#15899, thanks @ysbaddaden)
  • (specs) Support arbitrary IOs in Spec::CLI (#15882, thanks @HertzDevil)
  • (specs) Replace some lookup hashes in Spec with exhaustive cases (#15879, thanks @HertzDevil)
  • (text) [experimental] Use slice literals for String::CHAR_TO_DIGIT and CHAR_TO_DIGIT62 (#15745, thanks @HertzDevil)
  • (text) Replace some uses of String#% with justification methods (#15821, thanks @HertzDevil)
  • (text) Avoid calling chars.size on Strings (#15822, thanks @HertzDevil)
  • (time) Move most POSIX TZ string functionality to a module (#15866, thanks @HertzDevil)

compiler

  • (codegen) Replace type-id function with lookup table (#15904, thanks @BlobCodes)

Documentation

stdlib

  • (crypto) Add type restrictions to Digest (#15696, thanks @Vici37)
  • (crypto) Add documentation for Crypto::Bcrypt::Password#to_s (#15935, thanks @hugopl)
  • (crypto) Improve docs for OpenSSL::Cipher (#15964, thanks @Fijxu)
  • (macros) [experimental] Document Crystal::Macros::StringLiteral#to_utf16 (#15748, thanks @HertzDevil)
  • (runtime) Document GC::Stats properties (#15676, thanks @ysbaddaden)
  • (runtime) Add links to language specification in docs for pseudo methods (#15864, thanks @straight-shoota)
  • (runtime) Fix unclosed codeblock in __crystal_pseudo_alignof docs (#15945, thanks @syeopite)
  • (serialization) Add type restrictions to CSV (#15695, thanks @Vici37)
  • (specs) Clarify docs in regards to what be_nil expectation does (#15954, thanks @Blacksmoke16)
  • (system) Add type restrictions to Dir (#15697, thanks @Vici37)
  • (system) Improve docs for Socket and IO::FileDescriptor handles (#15977, thanks @straight-shoota)
  • (text) Improve docs for String#lines and #each_line (#15894, thanks @straight-shoota)

compiler

  • (parser) Improve examples for the syntax highlighter documentation (#15699, thanks @tamdaz)

Specs

stdlib

compiler

tools

Infrastructure

Don't miss a new crystal release

NewReleases is sending notifications on new releases.