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 return TypeNode'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

    • ๐Ÿ›  Fixed \u0000 wrongly added on String#sub(Hash) replaces last char. (#8644, thanks @mimame)

    Collections

    • ๐Ÿ›  Fixed Enumerable#zip to work with union types. (#8621, thanks @asterite)
    • ๐Ÿ›  Fixed docs regarding Hash's initial_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

    Files

    • (breaking-change) Deprecate File::Info#owner, and File::Info#group; use owner_id, and group_id. (#8007, thanks @j8r)
    • ๐Ÿ›  Fixed Path.new receiving Path as first argument. (#8753, thanks @straight-shoota)
    • ๐Ÿ›  Fixed File.size and File.info to work with Path parameters. (#8625, thanks @snluu)
    • ๐Ÿ›  Fixed Path specs when ENV["HOME"] is unset. (#8667, thanks @straight-shoota)
    • Refactor Dir.mkdir_p to use Path#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 support Int64 max-age values. (#8759, thanks @asterite)
    • ๐Ÿ‘Œ Improve error message for getaddrinfo failure. (#8498, thanks @rdp)
    • Make IO::SysCall#wait_readable and IO::SysCall#wait_writable public, yet :nodoc:. (#7366, thanks @stakach)
    • ๐Ÿ”จ Refactor StaticFileHandler to use Path. (#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

    Concurrency

    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 use printf like format. (#8786, thanks @bcardiff)

    Spec

    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 and memcpy 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 all rescue are unreachable. (#8758, thanks @asterite)
    • ๐Ÿ›  Fixed visibility propagation to macro expansions in all cases. (#8762, #8796, thanks @asterite)

    Tools

    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 and nodoc in favor of :ditto: and :nodoc:. (#6362, thanks @j8r)
    • ๐Ÿ“„ Skip creation of docs/ dir when not needed. (#8718, thanks @Sija)

    Others