Releases: crystal-lang/crystal
Releases · crystal-lang/crystal
1.14.0
Features
lang
- Allow
^
in constant numeric expressions (#14951, thanks @HertzDevil)
stdlib
- Add support for Windows on aarch64 (#14911, thanks @HertzDevil)
- (collection) [breaking] Add support for negative start index in
Slice#[start, count]
(#14778, thanks @ysbaddaden) - (collection) Add
Slice#same?
(#14728, thanks @straight-shoota) - (concurrency) Add
WaitGroup.wait
andWaitGroup#spawn
(#14837, thanks @jgaskins) - (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)
- (crypto) Update
LibCrypto
bindings for LibreSSL 3.5+ (#14872, thanks @straight-shoota) - (llvm) Expose LLVM instruction builder for
neg
andfneg
(#14774, thanks @JarnaChao09) - (llvm) [experimental] Add minimal LLVM OrcV2 bindings (#14887, thanks @HertzDevil)
- (llvm) Add
LLVM::Builder#finalize
(#14892, thanks @JarnaChao09) - (llvm) Support LLVM 19.1 (#14842, thanks @HertzDevil)
- (macros) Add
Crystal::Macros::TypeNode#has_inner_pointers?
(#14847, thanks @HertzDevil) - (macros) Add
HashLiteral#has_key?
andNamedTupleLiteral#has_key?
(#14890, thanks @kamil-gwozdz) - (numeric) Implement floating-point manipulation functions for
BigFloat
(#11007, thanks @HertzDevil) - (runtime) Stop & start the world (undocumented API) (#14729, thanks @ysbaddaden)
- (runtime) Add
Pointer::Appender#to_slice
(#14874, thanks @straight-shoota) - (serialization) Add
URI.from_json_object_key?
andURI#to_json_object_key
(#14834, thanks @nobodywasishere) - (serialization) Add
URI::Params::Serializable
(#14684, thanks @Blacksmoke16) - (system) Enable full backtrace for exception in process spawn (#14796, thanks @straight-shoota)
- (system) Implement
System::User
on Windows (#14933, thanks @HertzDevil) - (system) Implement
System::Group
on Windows (#14945, thanks @HertzDevil) - (system) Add methods to
Crystal::EventLoop
(#14977, thanks @ysbaddaden) - (text) Add
underscore_to_space
option toString#titleize
(#14822, thanks @Blacksmoke16) - (text) Support Unicode 16.0.0 (#14997, thanks @HertzDevil)
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
- Fix
Slice.literal
for multiple calls with identical signature (#15009, thanks @HertzDevil) - (macros) Add location info to some
MacroIf
nodes (#14885, thanks @Blacksmoke16)
stdlib
- (collection) Fix
Range#size
return type toInt32
(#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
andIO::FileDescriptor
(#14882, thanks @straight-shoota) - (files) Make
IO::Buffered#buffer_size=
idempotent (#14855, thanks @jgaskins) - (macros) Implement
#sort_by
inside macros usingEnumerable#sort_by
(#14895, thanks @HertzDevil) - (macros) Fix internal error when calling
#is_a?
onExternal
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
Proc
s 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 existingClassDef
type to current scope ([#15067], thanks @straight-shoota)
[#1...
1.13.3
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
forChar::REPLACEMENT
(#14937, thanks @HertzDevil)
Infrastructure
- Changelog for 1.13.3 (#14991, thanks @straight-shoota)
- (ci) Enable runners from
runs-on.com
for Aarch64 CI (#15007, thanks @straight-shoota)
1.13.2
1.13.2 (2024-08-20)
Bugfixes
stdlib
- (collection) Fix explicitly clear deleted
Hash::Entry
(#14862, thanks @HertzDevil)
compiler
- (codegen) Fix
ReferenceStorage(T)
atomic ifT
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
- Changelog for 1.13.2 (#14914, thanks @straight-shoota)
1.13.1
1.13.1 (2024-07-12)
Bugfixes
stdlib
- (serialization) [regression] Revert "Optimize JSON parsing a bit" (#14804, thanks @straight-shoota)
Infrastructure
- Changelog for 1.13.1 (#14806, thanks @straight-shoota)
1.13.0
1.13.0 (2024-07-09)
Features
lang
- Allow rescuing exceptions that include a module (#14553, thanks @Blacksmoke16)
- (macros) Allow assignment to
_
inside macro expressions (#14452, thanks @HertzDevil)
stdlib
- (collection) Add
Array#insert_all
(#14486, thanks @summer-alice) - (collection) Improve compile time error for
#sort(&block : T, T -> U)
(#14693, thanks @beta-ziliani) - (concurrency) Add
WaitGroup
synchronization primitive (#14167, thanks @ysbaddaden) - (concurrency) Allow
Atomic
s of pointer types (#14401, thanks @HertzDevil) - (concurrency) Add
Thread.new
yields itself (#14543, thanks @ysbaddaden) - (concurrency) Add support for
Atomic(Bool)
(#14532, thanks @ysbaddaden) - (concurrency) Add
Thread.sleep(Time::Span)
(#14715, thanks @ysbaddaden) - (files) Implement
IO#tty?
in Win32 (#14421, thanks @HertzDevil) - (files) Implement
File.readable?
and.writable?
in Win32 (#14420, thanks @HertzDevil) - (files) Make
File.readable?
and.writable?
follow symlinks on Windows (#14514, thanks @HertzDevil) - (llvm) Add some missing
LLVM::Context
bindings (#14612, thanks @ysbaddaden) - (llvm) Do not strip the macOS target triple (#14466, thanks @hovsater)
- (log) Support
UInt32
andUInt64
in Log Context (#14459, thanks @toddsundsted) - (macros) Add AST node methods for macro-related nodes (#14492, thanks @HertzDevil)
- (macros) Support short blocks in
#[]
operator call's macro interpolation (#14523, thanks @HertzDevil) - (macros) Add macro methods for
Select
(#14600, thanks @HertzDevil) - (macros) Add
TypeNode#private?
,#public?
and#visibility
(#11696, thanks @Hadeweka) - (macros) Add
StringLiteral#to_utf16
(#14676, thanks @ysbaddaden) - (networking) Relax type restriction of handlers in
HTTP::Server.new
toIndexable(HTTP::Handler)
(#14413, thanks @hugopl) - (networking) [security] OpenSSL: don't change default cipher suites (#14655, thanks @ysbaddaden)
- (networking) Allow parsing cookies with space in the value (#14455, thanks @anton7c3)
- (runtime) Add
EventLoop::Socket
module (#14643, thanks @straight-shoota) - (runtime) Add
EventLoop::FileDescriptor
module (#14639, thanks @straight-shoota) - (runtime) Add
Crystal::Tracing
for runtime tracing (#14659, thanks @ysbaddaden) - (system) [security] [breaking] Disable implicit execution of batch files on Windows (#14557, thanks @straight-shoota)
- (system) Add
EventLoop#run(blocking)
andEventLoop#interrupt
(#14568, thanks @ysbaddaden) - (system) Add
Crystal::System::Time.ticks
(#14620, thanks @ysbaddaden) - (system) Add
Crystal::System::Thread.current_thread?
,#scheduler?
(#14660, thanks @ysbaddaden) - (system) Protect fork/exec on targets that don't support atomic CLOEXEC (#14674, thanks @ysbaddaden)
- (system) Add
Crystal::System.panic
(#14733, thanks @ysbaddaden) - (text) Add
Regex::MatchOptions
overload forString#index!
(#14462, thanks @HertzDevil) - (text) Add
StringPool#get?
(#14508, thanks @HertzDevil) - (text) Add
pkg_config
names forpcre2
andpcre
(#14584, thanks @straight-shoota) - (text) Add UUID v7 (#14732, thanks @jgaskins)
- (time) Add
Time::Error
(#14743, thanks @Blacksmoke16)
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
andEnumerable#tally
properly retain return type ofT
([#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_*
onIO::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
withFD_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")
andprintf("%g")
([#14695], thanks @straight-shoota) - (runtime) Fix enable docs for builtin constants ([#14571], thanks @straight-shoota)
- (runtime) Fi...
1.12.2
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
andThread.unsafe_each
(#14635, thanks @ysbaddaden)
Infrastructure
- Changelog for 1.12.2 (#14640, thanks @straight-shoota)
1.12.1
1.12.1 (2024-04-11)
Bugfixes
tools
- (formatter) [regression] Fix formatter with whitespace before closing parenthesis (#14471, thanks @straight-shoota)
Infrastructure
- Changelog for 1.12.1 (#14472, thanks @straight-shoota)
1.12.0
1.12.0 (2024-04-09)
Features
lang
- Allow multiple parameters and blocks for operators ending in
=
(#14159, thanks @HertzDevil)
stdlib
- (concurrency) MT: reduce interleaved backtraces in spawn unhandled exceptions (#14220, thanks @ysbaddaden)
- (concurrency) Fix: opening/reading from fifo/chardev files are blocking the thread (#14255, thanks @ysbaddaden)
- (concurrency) Fix: Atomics and Locks (ARM, AArch64, X86) (#14293, thanks @ysbaddaden)
- (files) Add
IO::FileDescriptor::Handle
(#14390, thanks @straight-shoota) - (macros) Add macro methods for lib-related nodes (#14218, thanks @HertzDevil)
- (macros) Add macro methods for
Primitive
(#14263, thanks @HertzDevil) - (macros) Add macro methods for
TypeOf
(#14262, thanks @HertzDevil) - (macros) Add macro methods for
Alias
(#14261, thanks @HertzDevil) - (macros) Add macro methods for
Asm
andAsmOperand
(#14268, thanks @HertzDevil) - (macros) Relax
delegate
's setter detection (#14282, thanks @HertzDevil) - (numeric) Add
BigRational#%
,#tdiv
,#remainder
(#14306, thanks @HertzDevil) - (runtime) [experimental] Add
ReferenceStorage
for manual allocation of references (#14270, thanks @HertzDevil) - (runtime) Add MSVC invalid parameter handler (#14313, thanks @HertzDevil)
- (system) Add
Signal#trap_handler?
(#14126, thanks @stakach) - (system) Thread: set name (#14257, thanks @ysbaddaden)
- (system) Add
Process.on_terminate
(#13694, thanks @stakach) - (time) Add support for
Etc/UTC
time zone identifier without tzdb (#14185, thanks @femto)
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
foreval
andspec
(#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
- Add
crystal tool flags
(#14234, thanks @straight-shoota) - (formatter) Add more whitespace around
ProcLiteral
s (#14209, thanks @HertzDevil)
Bugfixes
lang
- (macros) Remove extra newline in top-level
FunDef
's string representation (#14212, thanks @HertzDevil) - (macros) Remove
T*
andT[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 theBig*
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 toString::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
andExternal
nodes ([#14267], thanks @HertzDevil) - (parser) Fix end locations of
Alias
nodes ([#14271], thanks @HertzDevil)
...
1.11.2
Bugfixes
stdlib
- (files) Fix missing
cause
parameter fromIO::Error#initialize
(#14242, thanks @straight-shoota) - (runtime) Always use
%p
for pointers inCrystal::System.print_error
(#14186, thanks @HertzDevil) - (runtime) Fixup for always use
%p
for pointers inCrystal::System.print_error
(#14221, thanks @HertzDevil)
Infrastructure
- Changelog for 1.11.2 (#14249, thanks @straight-shoota)
1.11.1
Bugfixes
stdlib
- (crypto) Revert "Fix OpenSSL error handling for EOF (support for OpenSSL 3.2) (#14169)" (#14217, thanks @straight-shoota)
compiler
- (interpreter) Remove pkg-config name for libgc as workaround for interpreter loader (#14198, thanks @straight-shoota)
- (semantic) Revert "Add
ReferenceStorage
for manual allocation of references (#14106)" (#14207, thanks @straight-shoota)
Infrastructure
- Changelog for 1.11.1 (#14208, thanks @straight-shoota)
- Bump VERSION to 1.11.1-dev (#14197, thanks @straight-shoota)