Skip to content

Releases: crystal-lang/crystal

1.14.0

09 Oct 12:11
1.14.0
dacd97b
Compare
Choose a tag to compare

Features

lang

stdlib

compiler

  • (cli) Adds initial support for external commands (#14953, thanks @bcardiff)
  • (interpreter) Add Crystal::Repl::Value#runtime_type (#14156, thanks @bcardiff)
  • (interpreter) Implement Reference.pre_initialize in the interpreter (#14968, thanks @HertzDevil)
  • (interpreter) Enable the interpreter on Windows (#14964, thanks @HertzDevil)

Bugfixes

lang

stdlib

  • (collection) Fix Range#size return type to Int32 (#14588, thanks @straight-shoota)
  • (concurrency) Update DeallocationStack for Windows context switch (#15032, thanks @HertzDevil)
  • (concurrency) Fix race condition in pthread_create handle initialization (#15043, thanks @HertzDevil)
  • (files) [regression] Fix File#truncate and #lock for Win32 append-mode files (#14706, thanks @HertzDevil)
  • (files) [breaking] Avoid flush in finalizers for Socket and IO::FileDescriptor (#14882, thanks @straight-shoota)
  • (files) Make IO::Buffered#buffer_size= idempotent (#14855, thanks @jgaskins)
  • (macros) Implement #sort_by inside macros using Enumerable#sort_by (#14895, thanks @HertzDevil)
  • (macros) Fix internal error when calling #is_a? on External nodes (#14918, thanks @HertzDevil)
  • (networking) Use correct timeout for Socket#connect on Windows (#14961, thanks @HertzDevil)
  • (numeric) Fix handle empty string in String#to_f(whitespace: false) (#14902, thanks @Blacksmoke16)
  • (numeric) Fix exponent wrapping in Math.frexp(BigFloat) for very large values (#14971, thanks @HertzDevil)
  • (numeric) Fix exponent overflow in BigFloat#to_s for very large values (#14982, thanks @HertzDevil)
  • (numeric) Add missing @[Link(dll:)] annotation to MPIR (#15003, thanks @HertzDevil)
  • (runtime) Add missing return type of LibC.VirtualQuery (#15036, thanks @HertzDevil)
  • (runtime) Fix main stack top detection on musl-libc (#15047, thanks @HertzDevil)
  • (serialization) [breaking] Remove XML::Error.errors (#14936, thanks @straight-shoota)
  • (specs) [regression] Fix Expectations::Be for module type (#14926, thanks @straight-shoota)
  • (system) Fix return type restriction for ENV.fetch (#14919, thanks @straight-shoota)
  • (system) #file_descriptor_close should set @closed (UNIX) (#14973, thanks @ysbaddaden)
  • (system) reinit event loop first after fork (UNIX) (#14975, thanks @ysbaddaden)
  • (text) Fix avoid linking libpcre when unused (#14891, thanks @kojix2)
  • (text) Add type restriction to String#byte_index offset parameter (#14981, thanks @straight-shoota)

compiler

  • (cli) Add error handling for linker flag sub commands (#14932, thanks @straight-shoota)
  • (codegen) Allow returning Procs from top-level funs ([#14917], thanks @HertzDevil)
  • (codegen) Fix CRT static-dynamic linking conflict in specs with C sources ([#14970], thanks @HertzDevil)
  • (interpreter) Fix Linux getrandom failure in interpreted code ([#15035], thanks @HertzDevil)
  • (interpreter) Fix undefined behavior in interpreter mixed union upcast ([#15042], thanks @HertzDevil)
  • (semantic) Fix TopLevelVisitor adding existing ClassDef type to current scope ([#15067], thanks @straight-shoota)

[#1...

Read more

1.13.3

18 Sep 13:44
1.13.3
d14d045
Compare
Choose a tag to compare

Bugfixes

stdlib

  • [regression] Fix use global paths in macro bodies (#14965, thanks @straight-shoota)
  • (system) [regression] Fix Process.exec stream redirection on Windows (#14986, thanks @HertzDevil)
  • (text) [regression] Fix String#index and #rindex for Char::REPLACEMENT (#14937, thanks @HertzDevil)

Infrastructure

1.13.2

20 Aug 13:50
1.13.2
879ec12
Compare
Choose a tag to compare

1.13.2 (2024-08-20)

Bugfixes

stdlib

compiler

  • (codegen) Fix ReferenceStorage(T) atomic if T has no inner pointers (#14845, thanks @HertzDevil)
  • (codegen) Fix misaligned store in Bool to union upcasts (#14906, thanks @HertzDevil)
  • (interpreter) Fix misaligned stack access in the interpreter (#14843, thanks @HertzDevil)

Infrastructure

1.13.1

12 Jul 12:44
1.13.1
0cef61e
Compare
Choose a tag to compare

1.13.1 (2024-07-12)

Bugfixes

stdlib

Infrastructure

1.13.0

09 Jul 19:50
1.13.0
6831e44
Compare
Choose a tag to compare

1.13.0 (2024-07-09)

Features

lang

stdlib

compiler

  • (codegen) Add compiler flags -Os and -Oz to optimize binary size (#14463, thanks @ysbaddaden)
  • (codegen) Add compiler support for AVR architecture (Arduino) (#14393, thanks @ysbaddaden)

tools

  • (formatter) Allow new formatter styles for trailing comma and whitespace around proc literal (#14726, thanks @Blacksmoke16)

Bugfixes

lang

  • (macros) Fix parsing of non-trailing if bodies inside macro expressions (#14505, thanks @HertzDevil)
  • (macros) Drop parentheses around -> inside certain comma-separated lists (#14506, thanks @HertzDevil)
  • (macros) Fix indentation of Select nodes' macro interpolation (#14510, thanks @HertzDevil)
  • (macros) Fix indentation of parenthesized Expressions#to_s (#14511, thanks @HertzDevil)

stdlib

  • (collection) [regression] Ensure Enumerable#to_a and Enumerable#tally properly retain return type of T ([#14447], thanks @Blacksmoke16)
  • (collection) [breaking] Never raise IndexError in #[]?(Range) ([#14444], thanks @HertzDevil)
  • (collection) [breaking] Fix Set#to_a(&) ([#14519], thanks @meatball133)
  • (collection) Fix Hash#rehash to reset @first ([#14606], thanks @straight-shoota)
  • (collection) Fix macro interpolation in NamedTuple#from ([#14790], thanks @HertzDevil)
  • (collection) [regression] Fix regression with NamedTuple.new when using key with a hyphen ([#14785], thanks @Blacksmoke16)
  • (files) Allow #fsync and #flock_* on IO::FileDescriptor ([#14432], thanks @HertzDevil)
  • (files) Make IO::FileDescriptor#tty? return false for NUL on Windows ([#14509], thanks @HertzDevil)
  • (files) Fix blockless IO::FileDescriptor echo and raw mode methods ([#14529], thanks @HertzDevil)
  • (files) Remove target path's forward slashes in File.symlink on Windows ([#14522], thanks @HertzDevil)
  • (files) Fix IO#same_content? accepting prefix on second stream ([#14664], thanks @straight-shoota)
  • (files) Fix overflow in File#read_at for large offsets on Windows ([#14708], thanks @HertzDevil)
  • (files) Fix IO::FileDescriptor.new for closed fd ([#14697], thanks @straight-shoota)
  • (files) Fix IO::Delimited reading into limited slice with peek ([#14772], thanks @straight-shoota)
  • (files) Fix Compress::Gzip extra field ([#14550], thanks @kojix2)
  • (log) delete source from builder cache when finalize ([#14475], thanks @ysbaddaden)
  • (networking) Fix Socket#close error handling on Windows ([#14517], thanks @HertzDevil)
  • (networking) Set UTF-8 charset on directory listing in HTTP::StaticFileHandler ([#14546], thanks @alexkutsan)
  • (networking) Don't pass socket file descriptors to subprocesses on Unix (SOCK_CLOEXEC) ([#14632], thanks @carlhoerberg)
  • (networking) [security] OpenSSL: don't set default ECDH curve ([#14656], thanks @ysbaddaden)
  • (networking) [security] OpenSSL: deprecate Mozilla's TLS Server recommendation ([#14657], thanks @ysbaddaden)
  • (networking) use SOCK_CLOEXEC with FD_CLOEXEC fallback ([#14672], thanks @ysbaddaden)
  • (networking) [regression] Fix regression on Socket#connect timeout type restriction ([#14755], thanks @straight-shoota)
  • (networking) Drop default timeout for Socket#connect on Windows ([#14756], thanks @straight-shoota)
  • (networking) don't hardcode alpn protocol byte size (OpenSSL) ([#14769], thanks @ysbaddaden)
  • (numeric) Fix BigRational#format ([#14525], thanks @meatball133)
  • (numeric) [regression] Restore leading zero in exponent for printf("%e") and printf("%g") ([#14695], thanks @straight-shoota)
  • (runtime) Fix enable docs for builtin constants ([#14571], thanks @straight-shoota)
  • (runtime) Fi...
Read more

1.12.2

31 May 09:05
1.12.2
04998c0
Compare
Choose a tag to compare

1.12.2 (2024-05-31)

Patch release with a bug fix necessary for support of latest libgc

Bugfixes

stdlib

  • (runtime) Don't allocate in Fiber.unsafe_each and Thread.unsafe_each (#14635, thanks @ysbaddaden)

Infrastructure

1.12.1

11 Apr 12:33
1.12.1
4cea101
Compare
Choose a tag to compare

1.12.1 (2024-04-11)

Bugfixes

tools

  • (formatter) [regression] Fix formatter with whitespace before closing parenthesis (#14471, thanks @straight-shoota)

Infrastructure

1.12.0

09 Apr 13:12
1.12.0
aee9ab6
Compare
Choose a tag to compare

1.12.0 (2024-04-09)

Features

lang

  • Allow multiple parameters and blocks for operators ending in = (#14159, thanks @HertzDevil)

stdlib

compiler

  • Add CRYSTAL_CONFIG_CC compiler config (#14318, thanks @straight-shoota)
  • (cli) Respect NO_COLOR in the compiler (#14260, thanks @HertzDevil)
  • (cli) Respect --static on Windows (#14292, thanks @HertzDevil)
  • (cli) Allow --single-module and --threads for eval and spec (#14341, thanks @HertzDevil)
  • (codegen) Add --frame-pointers to control preservation of frame pointers (#13860, thanks @refi64)
  • (codegen) x86-64 Solaris / illumos support (#14343, thanks @HertzDevil)
  • (interpreter) Support @[Link]'s DLL search order in the interpreter on Windows (#14146, thanks @HertzDevil)
  • (interpreter) Automatically detect MSVC tools on Windows interpreter (#14391, thanks @HertzDevil)
  • (parser) Allow calling #[]= with a block using method syntax (#14161, thanks @HertzDevil)
  • (semantic) Change short_reference for top-level macros to ::foo (#14203, thanks @femto)

tools

Bugfixes

lang

  • (macros) Remove extra newline in top-level FunDef's string representation (#14212, thanks @HertzDevil)
  • (macros) Remove T* and T[N] macro interpolation behavior inside libs (#14215, thanks @HertzDevil)

stdlib

  • (collection) Fix Hash#update when default block also adds given key (#14417, thanks @HertzDevil)
  • (collection) Fix Hash#put_if_absent putting duplicate keys (#14427, thanks @HertzDevil)
  • (concurrency) Reserve stack space on non-main threads for crash recovery on Windows (#14187, thanks @HertzDevil)
  • (concurrency) Add memory barrier to Mutex#unlock on aarch64 (#14272, thanks @jgaskins)
  • (concurrency) init schedulers before we spawn fibers (#14339, thanks @ysbaddaden)
  • (files) Make FileUtils.mv work across filesystems on Windows (#14320, thanks @HertzDevil)
  • (llvm) Use correct string size for LLVM::Type#inline_asm (#14265, thanks @HertzDevil)
  • (llvm) Fix System V ABI for packed structs with misaligned fields (#14324, thanks @HertzDevil)
  • (networking) OpenSSL 3.x reports unexpected EOF as SSL error (#14219, thanks @ysbaddaden)
  • (numeric) Make equality between Complex and other numbers exact (#14309, thanks @HertzDevil)
  • (numeric) Fix #hash for the Big* number types (#14308, thanks @HertzDevil)
  • (runtime) Do not allocate memory in the segmentation fault signal handler (#14327, thanks @HertzDevil)
  • (runtime) Fix crash stack trace decoding on macOS (#14335, thanks @HertzDevil)
  • (runtime) Crystal::RWLock should be a struct (#14345, thanks @ysbaddaden)
  • (runtime) Fix min_by? in IOCP event loop #run_once (#14394, thanks @straight-shoota)
  • (serialization) XML::Reader: Disallow attributes containing null bytes (#14193, thanks @HertzDevil)
  • (serialization) Always call LibXML.xmlInitParser when requiring XML libraries (#14191, thanks @HertzDevil)
  • (system) Fix macro Crystal::LIBRARY_PATH.split when cross-compiling (#14330, thanks @HertzDevil)
  • (system) Add SA_RESTART flag to sigaction syscall (#14351, thanks @ysbaddaden)
  • (text) Add Nil return type restriction to String::Formatter#consume_substitution (#14430, thanks @straight-shoota)

compiler

  • (cli) build --no-codegen output file name error (#14239, thanks @apainintheneck)
  • (codegen) Do not handle inline assembly with "intel" flag as AT&T syntax ([#14264], thanks @HertzDevil)
  • (codegen) [breaking] Respect alignments above alignof(Void*) inside union values ([#14279], thanks @HertzDevil)
  • (codegen) Fix stack corruption in union-to-union casts ([#14289], thanks @HertzDevil)
  • (codegen) Don't copy DLL to output directory if file already exists ([#14315], thanks @HertzDevil)
  • (codegen) Fix Proc#call that takes and returns large extern structs by value ([#14323], thanks @HertzDevil)
  • (codegen) Never discard ivar initializer inside .allocate and .pre_initialize ([#14337], thanks @HertzDevil)
  • (codegen) Use separate names for constant and class variable internals ([#14445], thanks @HertzDevil)
  • (interpreter) fix fiber's resumable property ([#14252], thanks @ysbaddaden)
  • (interpreter) Ensure all constants only have one initializer in the interpreter ([#14381], thanks @HertzDevil)
  • (interpreter) Handle NaN comparisons in the interpreter ([#14441], thanks @HertzDevil)
  • (interpreter) Check UInt16#to_u8 for overflow in the interpreter ([#14436], thanks @HertzDevil)
  • (interpreter) Fix interpreter internal overflow for UInt128#to_f32 and #to_f32! ([#14437], thanks @HertzDevil)
  • (parser) Fix name locations of FunDef and External nodes ([#14267], thanks @HertzDevil)
  • (parser) Fix end locations of Alias nodes ([#14271], thanks @HertzDevil)

...

Read more

1.11.2

18 Jan 13:37
1.11.2
fda656c
Compare
Choose a tag to compare

Bugfixes

stdlib

  • (files) Fix missing cause parameter from IO::Error#initialize (#14242, thanks @straight-shoota)
  • (runtime) Always use %p for pointers in Crystal::System.print_error (#14186, thanks @HertzDevil)
  • (runtime) Fixup for always use %p for pointers in Crystal::System.print_error (#14221, thanks @HertzDevil)

Infrastructure

1.11.1

11 Jan 20:17
1.11.1
0aa3037
Compare
Choose a tag to compare

Bugfixes

stdlib

compiler

Infrastructure