@bcardiff bcardiff released this Jun 15, 2018 · 437 commits to master since this release

Assets 13

New features and breaking changes

  • (breaking-change) Time zones has been added to Time. (#5324, #5819, thanks @straight-shoota)
  • (breaking-change) Drop HTTP.rfc1123_date in favor of HTTP.format_time and add time format implementations for ISO-8601, RFC-3339, and RFC-2822. (#5123, thanks @straight-shoota)
  • (breaking-change) crystal deps is removed, use shards. (#5544, thanks @asterite)
  • (breaking-change) Hash#key was renamed as Hash#key_for. (#5444, thanks @marksiemers)
  • (breaking-change) JSON::Any and YAML::Any have been re-implemented solving some inconsistencies and avoiding the usage of recursive aliases (JSON::Type and YAML::Type have been removed). (#5183, thanks @asterite)
  • (breaking-change) Multiple heredocs can be used as arguments and methods can be invoked writing them in the initial delimiter, also empty heredocs are now supported. (#5578, #5602, #6048, thanks @asterite and @MakeNowJust)
  • (breaking-change) Refactor signal handlers and avoid closing pipe at exit. (#5730, thanks @ysbaddaden)
  • (breaking-change) Improve behaviour of File.join with empty path component. (#5915, thanks @straight-shoota)
  • (breaking-change) Drop Colorize#push in favor of Colorize#surround and allow nested calls across the stack. (#4196, thanks @MakeNowJust)
  • (breaking-change) File.stat was renamed to File.info and a more portable API was implemented. (#5584, #6161, thanks @RX14 and @bcardiff)
  • (breaking-change) Refactor HTTP::Server to bind to multiple addresses. (#5776, #5959, thanks @straight-shoota)
  • (breaking-change) Remove block argument from loop. (#6026, thanks @asterite)
  • (breaking-change) Do not collapse unions for sibling types. (#6024, thanks @asterite)
  • (breaking-change) Disallow typeof in type restrictions. (#5192, thanks @asterite)
  • (breaking-change) Perform unbuffered read when IO::Buffered#sync = true. (#5849, thanks @RX14)
  • (breaking-change) Drop when _ support. (#6150, thanks @MakeNowJust)
  • (breaking-change) The DivisionByZero exception was renamed to DivisionByZeroError. (#5395, thanks @sdogruyol)
  • A bootstrap windows port has been added to the standard library. It's not usable for real programs yet. (#5339, #5484, #5448, thanks @RX14)
  • Add automatic casts on literals arguments for numbers and enums. (#6074, thanks @asterite)
  • Add user defined annotations. (#6063, #6084, #6106, thanks @asterite)
  • Add macro verbatim blocks to avoid nested macros. (#6108, thanks @asterite)
  • Allow namespaced expressions to define constants eg: Foo::Bar = 1. (#5883, thanks @bew)
  • Allow trailing = in symbol literals. (#5969, thanks @straight-shoota)
  • Allow redefining None to 0 for @[Flags] enum. (#6160, thanks @bew)
  • Suggest possible solutions to failing requires. (#5487, thanks @RX14)
  • Allow pointers of external C library global variables. (#4845, thanks @larubujo)
  • Decouple pretty-printing (pp) and showing the expression (!): p, pp, p!, pp!. (#6044, thanks @asterite)
  • Add ivars default value reflection in macros. (#5974, thanks @asterite)
  • Add argless overload to Number#round to rounds to the nearest whole number. (#5397, thanks @Sija)
  • Add Int#bits_set? to easily check that certain bits are set. (#5619, thanks @RX14)
  • Add Float32 and Float64 constants. (#4787, thanks @konovod)
  • Add allocated bytes per operation in Benchmark.ips. (#5522, thanks @asterite)
  • Add String#to_utf16 and String.from_utf16. (#5541, #5579, #5583 thanks @asterite, @RX14 and @straight-shoota)
  • Add String#starts_with?(re: Regex). (#5485, thanks @MakeNowJust)
  • Add Regex.needs_escape?. (#5962, thanks @Sija)
  • Add Hash#last_key and Hash#last_value. (#5760, thanks @j8r)
  • Add no-copy iteration to Indexable. (#4584, thanks @cjgajard)
  • Add Time#at_{beginning,end}_of_second (#6167, thanks @straight-shoota)
  • Add IO::Stapled to combine two unidirectional IOs into a single bidirectional one. (#6017, thanks @straight-shoota)
  • Add context to errors in JSON.mapping generated code. (#5932, thanks @straight-shoota)
  • Add JSON::Serializable and YAML::Serializable attribute powered mappings. (#6082, thanks @kostya)
  • Add mode param to File.write. (#5754, thanks @woodruffw)
  • Add Punycode/IDNA support and integrate with DNS lookup. (#2543, thanks @MakeNowJust)
  • Add HTTP::Client#options method. (#5824, thanks @mamantoha)
  • Add support for Last-Modified and other cache improvements to HTTP::StaticFileHandler. (#2470, #5607, thanks @bebac and @straight-shoota)
  • Add operations and improvements related to BigDecimal and BigFloat. (#5437, #5390, #5589, #5582, #5638, #5675, thanks @Sija and @mjago)
  • Add BigDecimal and UUID JSON support. (#5525, #5551, thanks @lukeasrodgers and @lachlan)
  • Add missing UUID#inspect. (#5574, thanks @ngsankha)
  • Add Logger configuration in initializer. (#5618, thanks @Sija)
  • Add custom separators in CSV.build. (#5998, #6008 thanks @Sija)
  • Add INI.build to emit INI files. (#5298, thanks @j8r)
  • Add Process.chroot. (#5577, thanks @chris-huxtable)
  • Add Tempfile.tempname to create likely nonexisting filenames. (#5360, thanks @woodruffw)
  • Add FileUtils#ln, ln_s, and ln_sf. (#5421, thanks @woodruffw)
  • Add support 8bit and true color to Colorize. (#5902, thanks @MakeNowJust)
  • Add comparison operators between classes. (#5645, thanks @asterite)
  • Add exception cause in backtrace. (#5833, thanks @RX14)
  • Add unhandled exception as argument in at_exit. (#5906, thanks @MakeNowJust)
  • Add support to target aarch64-linux-musl. (#5861, thanks @jirutka)
  • Add #clear method to ArrayLiteral/HashLiteral for macros. (#5265, thanks @Sija)
  • Add Bool#to_unsafe for C bindings. (#5465, thanks @woodruffw)
  • Spec: Add expectations starts_with, ends_with. (#5881, thanks @kostya)
  • Formatter: Add --include and --exclude options to restrict directories. (#4635, thanks @straight-shoota)
  • Documentation generator: improved navigation, searching, rendering and SEO. (#5229, #5795, #5990, #5657, #6073, thanks @straight-shoota, @Sija and @j8r)
  • Playground: Add button in playground to run formatter. (#3652, thanks @samueleaton)

Standard library bugs fixed

Compiler bugs fixed

  • Fixed enum generated values when a member has value 0. (#5954, thanks @bew)
  • Fixed compiler issue when previous compilation was interrupted. (#5585, thanks @asterite)
  • Fixed compiler error with an empty ensure block. (#5396, thanks @MakeNowJust)
  • Fixed parsing regex in default arguments. (#5481, thanks @MakeNowJust)
  • Fixed parsing error of regex literal after open parenthesis. (#5453, thanks @MakeNowJust)
  • Fixed parsing of empty array with blank. (#6107, thanks @asterite)
  • Static libraries are now found correctly when using the --static compiler flag. (#5385, thanks @jreinert)
  • Improve error messages for unterminated literals. (#5409, thanks @straight-shoota)
  • Fixed ProcNotation and ProcLiteral introspection in macros. (#5206, thanks @javanut13)
  • Cross compilation honors --emit and avoid generating bc_flags in current directory. (#5521, thanks @asterite)
  • Fixed compiler error with integer constants as generic arguments. (#5532, thanks @asterite)
  • Fixed compiler error with self as base class. (#5534, thanks @asterite)
  • Fixed macro expansion when mutating the argument. (#5247, thanks @MakeNowJust)
  • Fixed macro expansion edge cases. (#5680, #5842, #6163, thanks @asterite, @MakeNowJust and @splattael)
  • Fixed macro overload on named args. (#5808, thanks @bew)
  • Fixed macro numeric types used in interpreter. (#5972, thanks @straight-shoota)
  • Fixed missing debug locations in several places. (#5597, thanks @asterite)
  • Fixed missing information in AST nodes needed for macro expansion. (#5454, thanks @MakeNowJust)
  • Fixed multiline error messages in emitted by ASTNode#raise macro method. (#5670, thanks @asterite)
  • Fixed nested delimiters and escaped whitespace in string/symbol array literals. (#5667, thanks @straight-shoota)
  • Fixed custom array/hash-like literals in nested modules. (#5685, thanks @asterite)
  • Fixed usage of static array in C externs. (#5690, thanks @asterite)
  • Fixed spawn over expression with receivers. (#5781, thanks @straight-shoota)
  • Fixed prevent heredoc inside interpolation. (#5648, thanks @MakeNowJust)
  • Fixed parsing error when a newline follows block arg. (#5737, thanks @bew)
  • Fixed parsing error when macro argument is followed by a newline. (#6046, thanks @asterite)
  • Fixed compiler error messages wording. (#5887, thanks @r00ster91)
  • Fixed recursion issues in method_added macro hook. (#5159, thanks @MakeNowJust)
  • Fixed avoid using type of updated argument for type inference. (#5166, thanks @MakeNowJust)
  • Fixed parsing error message on unbalanced end brace in macros. (#5420, thanks @MakeNowJust)
  • Fixed parsing error message on keywords are used as arguments. (#5930, #6052, thanks @MakeNowJust and @esse)
  • Fixed parsing error message on missing comma for named tuples. (#5981, thanks @MakeNowJust)
  • Fixed missing handling of cond node in visitor. (#6032, thanks @veelenga)
  • Fixed cli when --threads has invalid value. (#6039, thanks @r00ster91)
  • Fixed private methods can now be called with explicit self receiver. (#6075, thanks @MakeNowJust)
  • Fixed missing some missing rules of initializer in initializers macro methods. (#6077, thanks @asterite)
  • Fixed regression bug related to unreachable code. (#6045, thanks @asterite)

Tools bugs fixed

Misc

Note: crystal-0.25.0-2.pkg & crystal-0.25.0-2-darwin-x86_64.tar.gz Darwin packages fix a bug with a missing clock_gettime on older MacOS X versions (ie, El Capitan & previous).