Releases: crystal-lang/crystal
Releases · crystal-lang/crystal
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)
1.11.0
Features
lang
- [breaking] Support
alignof
andinstance_alignof
(#14087, thanks @HertzDevil) - (annotations) Support
dll
parameter in@[Link]
(#14131, thanks @HertzDevil) - (macros) Expose macro
Call
context via new@caller
macro ivar (#14048, thanks @Blacksmoke16)
stdlib
- (collection) Add
Enumerable#present?
(#13866, thanks @straight-shoota) - (collection) Add
Enumerable#each_step
andIterable#each_step
(#13610, thanks @baseballlover723) - (collection) Add
Enumerable(T)#to_set(& : T -> U) : Set(U) forall U
(#12654, thanks @caspiano) - (collection) Add
Enumerable(T)#to_a(& : T -> U) forall U
(#12653, thanks @caspiano) - (files) Add
IO::Error#target
(#13865, thanks @straight-shoota) - (llvm) Add
LLVM::OperandBundleDef#dispose
(#14095, thanks @HertzDevil) - (llvm) Windows: Use local configuration for LLVM when linking dynamically (#14101, thanks @HertzDevil)
- (macros) Add
CharLiteral#ord
(#13910, thanks @refi64) - (macros) Add macro methods for
MacroIf
andMacroFor
nodes (#13902, thanks @sbsoftware) - (macros) Expose doc comments on
ASTNode
when generating docs (#14050, thanks @Blacksmoke16) - (macros) Add macro methods for
ModuleDef
(#14063, thanks @HertzDevil) - (macros) Add macro methods for
Include
andExtend
(#14064, thanks @HertzDevil) - (macros) Add macro methods for
ClassDef
,EnumDef
,AnnotationDef
(#14072, thanks @HertzDevil) - (numeric) Implement
BigRational
's rounding modes (#13871, thanks @HertzDevil) - (numeric) Support full exponent range in
BigFloat#**(BigInt)
(#13881, thanks @HertzDevil) - (numeric) Add
Math.fma
(#13934, thanks @HertzDevil) - (numeric) Add
Number#integer?
(#13936, thanks @HertzDevil) - (numeric) Publish
Int::Primitive#abs_unsigned
and#neg_signed
(#13938, thanks @HertzDevil) - (numeric) Add
Int::Primitive#to_signed
,#to_signed!
,#to_unsigned
,#to_unsigned!
(#13960, thanks @HertzDevil) - (numeric) Support
BigFloat#**
for allInt::Primitive
arguments (#13971, thanks @HertzDevil) - (numeric) Add
Float32::MIN_SUBNORMAL
andFloat64::MIN_SUBNORMAL
(#13961, thanks @HertzDevil) - (numeric) Add
Float::Primitive.parse_hexfloat
,.parse_hexfloat?
,#to_hexfloat
(#14027, thanks @HertzDevil) - (numeric) Implement
sprintf "%f"
in Crystal using Ryu Printf (#14067, thanks @HertzDevil) - (numeric) Implement
sprintf "%e"
in Crystal (#14084, thanks @HertzDevil) - (numeric) Implement
sprintf "%a"
in Crystal (#14102, thanks @HertzDevil) - (numeric) Implement
sprintf "%g"
in Crystal (#14123, thanks @HertzDevil) - (runtime) Add
Crystal::HOST_TRIPLE
andTARGET_TRIPLE
(#13823, thanks @HertzDevil) - (runtime) [experimental] Add
Reference.pre_initialize
and.unsafe_construct
(#14108, thanks @HertzDevil) - (runtime) [experimental] Add
ReferenceStorage
for manual allocation of references (#14106, thanks @HertzDevil) - (serialization) Fix
StaticArray#to_json
(#14104, thanks @Vendicated) - (specs) Add
crystal spec --dry-run
(#13804, thanks @nobodywasishere) - (specs) Add
crystal spec --list-tags
(#13616, thanks @baseballlover723) - (system) Respect Windows
Path
directory separators inFile.match?
(#13912, thanks @HertzDevil) - (text) Support Unicode 15.1.0 (#13812, thanks @HertzDevil)
- (text) Add
UUID.v1
,.v2
,.v3
,.v4
,.v5
(#13693, thanks @threez) - (text) Add
String
andChar
patterns toStringScanner
(#13806, thanks @funny-falcon) - (text) Add
EOL
constant (End-Of-Line) (#11303, thanks @postmodern) - (text) Add
Char::Reader#current_char?
,#next_char?
,#previous_char?
(#14012, thanks @HertzDevil) - (text) Add
String#matches_full?
(#13968, thanks @straight-shoota) - (text) Change
Regex::MatchData#to_s
to return matched substring (#14115, thanks @Vendicated)
compiler
- (codegen) Add incremental optimization levels (#13464, thanks @kostya)
- (debugger) Support debug information for 64-bit or unsigned enums (#14081, thanks @HertzDevil)
- (interpreter) Support
instance_sizeof(T)
in the interpreter (#14031, thanks @HertzDevil) - (interpreter) Support
-dynamic.lib
in Windows interpreter (#14143, thanks @HertzDevil) - (interpreter) Support absolute paths in
CRYSTAL_INTERPRETER_LOADER_INFO
(#14147, thanks @HertzDevil) - (interpreter) Add
Crystal::Repl#parse_and_interpret
(#14138, thanks @bcardiff) - (semantic) Change short_reference for top-level methods to
::foo
(#14071, thanks @keshavbiswa)
tools
- (docs-generator) Expose inherited macros in generated API docs (#13810, thanks @Blacksmoke16)
- (docs-generator) Order macros below class methods in generated docs (#14024, thanks @Blacksmoke16)
- (formatter) Do not remove trailing comma from multi-line macro/def parameters (not yet enabled) (#14075, thanks @Blacksmoke16)
- (unreachable) Add
--check
flag tocrystal tool unreachable
(#13930, thanks @straight-shoota) - (unreachable) Add annotations to output of
crystal tool unreachable
(#13927, thanks @straight-shoota) - (unreachable) Print relative paths in
crystal tool unreachable
(#13929, thanks @straight-shoota) - (unreachable) Add CSV output format to
crystal tool unreachable
(#13926, thanks @straight-shoota) - (unreachable) Add
--tallies
option tocrystal tool unreachable
(#13969, thanks @straight-shoota)
Bugfixes
stdlib
- Fix
Box(T?)
crashing onnil
(#13893, thanks @HertzDevil) - Fix typos in src (#14053, thanks @kojix2)
- (collection) Fix
Indexable#each_repeated_combination(n)
whenn > size
(#14092, thanks @HertzDevil) - (concurrency) Make
Process#wait
asynchronous on Windows (#13908, thanks @HertzDevil) - (concurrency) Fix math overflow after spawning
Int32::MAX + 1
fibers (#14096, thanks @ysbaddaden) - (concurrency) Fix
can't resume a running fiber
(#14128, thanks @ysbaddaden) - (crypto) Fix OpenSSL error handling for EOF (support for OpenSSL 3.2) (#14169, thanks @straight-shoota)
- (files) Fix
Globber.constant_entry?
matching patterns (#13955, thanks @GeopJr) - (files) Fix
String::Buffer
andIO::Memory
capacity to grow beyond 1GB (#13989, thanks @straight-shoota) - (llvm) Fix a typo ([#13914](https://github.com/crystal-...
1.10.1
Bugfixes
stdlib
IO#gets
should have same result regardless of#peek
availability (#13882, thanks @compumike)- Support Android API levels 24 - 27 (#13884, thanks @HertzDevil)
Infrastructure
- (ci) Fix
win.yml
(#13876, thanks @straight-shoota)