crystal v0.33.0 Release Notes
Release Date: 2020-02-14 // about 4 years ago-
Language changes
Macros
- โ Add
TypeNode#name(generic_args : BoolLiteral)
to returnTypeNode
's name with or without type vars. (#8483, thanks @Blacksmoke16)
Standard library
- (breaking-change) Remove several previously deprecated methods and modules:
PartialComparable
,Crypto::Bcrypt::Password#==
,HTTP::Server::Response#respond_with_error
,JSON::PullParser::Kind#==
,Symbol#==(JSON::PullParser::Kind)
,JSON::Token#type
,String#at
,Time.new
,Time.now
,Time.utc_now
,URI.escape
,URI.unescape
. (#8646, #8596, thanks @bcardiff, @Blacksmoke16) - ๐ Fixed docs wording. (#8606, #8784, thanks @fxn)
- โ Add
Object#in?
. (#8720, #8723, thanks @Sija) - ๐ Allow to create an enum from a symbol. (#8634, thanks @bew)
- โ Add
VaList#next
for getting the next element in a variadic argument list. (#8535, #8688, thanks @ffwff, @RX14) - ๐จ Refactor
ARGF
implementation. (#8593, thanks @arcage) - ๐ Fixed specs of
Colorize
on dumb terminal. (#8673, thanks @oprypin) - ๐ Fixed some specs on Win32. (#8670, thanks @straight-shoota)
Numeric
- โ Add
BigInt#unsafe_shr
. (#8763, thanks @asterite) - ๐จ Refactor
Float#fdiv
to use binary primitive. (#8662, thanks @bcardiff)
Text
Collections
- ๐ Fixed
Enumerable#zip
to work with union types. (#8621, thanks @asterite) - ๐ Fixed docs regarding
Hash
'sinitial_capacity
. (#8569, thanks @r00ster91)
Serialization
- ๐ Improved JSON deserialization into union types. (#8689, thanks @KimBurgess)
- ๐ Fixed expected error message in libxml2 error spec. (#8699, thanks @straight-shoota)
- ๐ Fixed
JSON::PullParser
overflow handling. (#8698, thanks @KimBurgess) - ๐ Fixed
JSON::Any#dig?
/YAML::Any#dig?
on non-structure values. (#8745, thanks @Sija)
Time
- ๐ Fixed
Time#shift
over date boundaries with zone offset. (#8742, thanks @straight-shoota)
Files
- (breaking-change) Deprecate
File::Info#owner
, andFile::Info#group
; useowner_id
, andgroup_id
. (#8007, thanks @j8r) - ๐ Fixed
Path.new
receivingPath
as first argument. (#8753, thanks @straight-shoota) - ๐ Fixed
File.size
andFile.info
to work withPath
parameters. (#8625, thanks @snluu) - ๐ Fixed
Path
specs whenENV["HOME"]
is unset. (#8667, thanks @straight-shoota) - Refactor
Dir.mkdir_p
to usePath#each_parent
and make it work on Win32. (#8668, thanks @straight-shoota) - ๐ Fixed
IO::MultiWriter
specs to close file before reading/deleting it. (#8674, thanks @oprypin)
Networking
- ๐ Fixed invalid call to libevent and race conditions on closed
IO
when resuming readable/writable event. (#8707, #8733, thanks @bcardiff) - ๐ Fixed unexpected EOF in terminated SSL connection. (#8540, thanks @rdp)
- ๐ Fixed
HTTP::Cookie
to supportInt64
max-age values. (#8759, thanks @asterite) - ๐ Improve error message for
getaddrinfo
failure. (#8498, thanks @rdp) - Make
IO::SysCall#wait_readable
andIO::SysCall#wait_writable
public, yet:nodoc:
. (#7366, thanks @stakach) - ๐จ Refactor
StaticFileHandler
to usePath
. (#8672, thanks @straight-shoota) - โ Remove fixed date in spec. (#8640, thanks @bcardiff)
- โ Remove non-portable error message in
TCPServer
spec. (#8702, thanks @straight-shoota)
Crypto
- โ Add
Crypto::Bcrypt::Password
check for invalid hash value. (#6467, thanks @miketheman) - ๐ Improve documentation for
Random::Secure
. (#8484, thanks @straight-shoota)
Concurrency
- ๐ Fixed
Future(Nil)
when the block raises. (#8650, thanks @lbguilherme) - ๐ Fixed
IO
closing in multi-thread mode. (#8733, thanks @bcardiff) - ๐ Fixed some regular failing specs in multi-thread mode. (#8592, #8643, #8724, #8761, thanks @bcardiff)
- โ Add docs to
Fiber
. (#8739, thanks @straight-shoota)
System
- Enable
system
module for Win32 in prelude. (#8661, thanks @straight-shoota) - Handle exceptions raised at
__crystal_sigfault_handler
. (#8743, thanks @waj)
โ Runtime
- ๐ Fixed wrongly collected exception object by the GC. Ensure
LibUnwind::Exception
struct is not atomic. (#8728, thanks @waj) - ๐ Fixed reporting of non-statement rows in DWARF backtrace. (#8499, thanks @rdp)
- โ Add top level exception handler. (#8735, #8791, thanks @waj)
- Try to open stdio in non-blocking mode. (#8787, thanks @waj)
- ๐ Allow
Crystal::System.print_error
to useprintf
like format. (#8786, thanks @bcardiff)
Spec
- (breaking-change) Remove previously deprecated spec method
assert
. (#8767, thanks @Blacksmoke16) Spec::JUnitFormatter
output and options enhancements. (#8599, #8692, thanks @Sija, @bcardiff)
Compiler
- (breaking-change) Drop support for previously deprecated comma separators in enums and other cleanups. (#8657, thanks @bcardiff)
- (breaking-change) Drop uppercase F32 and F64 float number suffixes. (#8782, thanks @rhysd)
- ๐ Fixed memory corruption issues by using LLVM's
memset
andmemcpy
that matches target machine. (#8746, thanks @bcardiff) - ๐ Fixed ICE when trying to add type inside annotation. (#8628, thanks @asterite)
- ๐ Fixed ICE on
typeof
in an unused block. (#8695, thanks @asterite) - ๐ Fixed ICE in case of wrong target triple. (#8710, thanks @Sija)
- ๐ Fixed ICE when raising a macro exception with empty message. (#8654, thanks @jan-zajic)
- ๐ Fixed parser bug macro with "eenum" in it. (#8760, thanks @asterite)
- ๐ Change
CRYSTAL_PATH
to allow shards to override std-lib. (#8752, thanks @bcardiff)
Language semantics
- ๐ Fixed missing virtualization of
Proc
pointer. (#8757, thanks @asterite) - ๐ Fixed type of vars after
begin
/rescue
if allrescue
are unreachable. (#8758, thanks @asterite) - ๐ Fixed visibility propagation to macro expansions in all cases. (#8762, #8796, thanks @asterite)
Tools
- โก๏ธ Update
crystal init
to handle.
. (#8681, thanks @jethrodaniel)
Formatter
- ๐ Fixed indent after comment inside indexer. (#8627, thanks @asterite)
- ๐ Fixed indent of comments at the end of a proc literal. (#8778, thanks @asterite)
- ๐ Fixed crash when formating comment after macro. (#8697, thanks @asterite)
- ๐ Fixed crash when formating
exp.!
. (#8768, thanks @asterite) - โ Removes unnecessary escape sequences. (#8619, thanks @RX14)
Doc generator
- (breaking-change) Deprecate
ditto
andnodoc
in favor of:ditto:
and:nodoc:
. (#6362, thanks @j8r) - ๐ Skip creation of
docs/
dir when not needed. (#8718, thanks @Sija)
Others
- CI improvements and housekeeping. (#8580, #8597, #8679, #8779, thanks @bcardiff, @j8r)
- โ Add Windows CI using GitHub Actions. (#8676, thanks @oprypin)
- โ Add Alpine CI using CircleCI. (#7420, thanks @straight-shoota)
- ๐ Build Alpine Docker images. (#8708, thanks @straight-shoota)
- ๐ Allow
Makefile
to uselld
if present (Linux only). (#8641, thanks @bcardiff) - Simplify script to determine installed LLVM version. (#8605, thanks @j8r)
- โ Add CircleCI test summaries. (#8617, thanks @Sija)
- โ Add helper scripts to identify working std-lib specs on Win32. (#8664, thanks @straight-shoota)
- โ Add