Back to Crystal

Changelog 1.3

doc/changelogs/v1.3.md

1.20.124.5 KB
Original Source

Changelog 1.3

1.3.2 - 2022-01-18

Standard Library

Text

  • Fix buffer overflow in String#index (#11747, thanks @asterite, @straight-shoota)

1.3.1 - 2022-01-13

Standard Library

  • Remove useless variable declarations in trailing position (#11704, thanks @HertzDevil)

Crypto

  • Fix for missing BIO_* functions in OpenSSL < 1.1.0 (#11736, thanks @daliborfilus)

Runtime

  • Remove string allocation from GC_set_warn_proc (#11729, thanks @straight-shoota)

Tools

  • Doc generator: Fix escape HTML in code span (#11686, thanks @straight-shoota)
  • Fix formatter error for ProcLiterals with Union return type (#11709, thanks @HertzDevil)

Other

  • Fix typos (#11725, thanks @kianmeng)

1.3.0 - 2022-01-06

Compiler

  • Refer to T.class as "metaclass" in error messages, not "class" (#11378, thanks @HertzDevil)
  • Create Reason enum for exhaustive case in nil-reason check (#11449, thanks @rymiel)
  • Improve cache directory behaviour on Windows (#11436, thanks @HertzDevil)
  • Automatically detect MSVC tools on Windows via vswhere (#11496, thanks @HertzDevil)
  • Clean up .pdb files for temporary executables on MSVC (#11553, thanks @HertzDevil)
  • Disable incremental linking on MSVC (#11552, thanks @HertzDevil)
  • Allow multiple --emit compiler options to stack (#11556, thanks @HertzDevil)
  • Refactor some type restrictions in the compiler (#11531, thanks @straight-shoota)
  • Detect cl.exe's path for compiler specs requiring a C compiler (#11560, thanks @HertzDevil)
  • Increase default stack size on MSVC to 8 MB (#11569, thanks @HertzDevil)
  • Resolve compiler wildcard require (#11562, thanks @straight-shoota)
  • Compiler: use enums instead of symbols in various places (#11607, thanks @HertzDevil)

Codegen

  • Disable specs for StaticArray#sort_by on broken targets (#11359, thanks @straight-shoota)
  • Fix link flag behaviour on Windows MSVC (#11424, thanks @HertzDevil)
  • Attach debug locations to splat expansions inside array-like literals (#11655, thanks @HertzDevil)
  • Use full name for private types' class variables during codegen (#11651, thanks @HertzDevil)
  • Fix codegen when instantiating class methods of typedefs (#11636, thanks @HertzDevil)
  • Add minimal load-time DLL support on Windows, support dllimport storage class (#11573, thanks @HertzDevil)

Debugger

  • Attach debug locations to auto-generated initialize methods (#11313, thanks @HertzDevil)
  • Fix debug location for ~check_proc_is_not_closure (#11311, thanks @HertzDevil)

Interpreter

  • crystal i, a Crystal interpreter (#11159, thanks @asterite)
  • Implement FFI bindings (#11475, thanks @straight-shoota)
  • Add Crystal::Loader (#11434, #11662, thanks @straight-shoota, @HertzDevil)
  • Mark bswap32 intrinsic with interpreter primitive annotation (#11582, thanks @rymiel)
  • Split interpreter specs into separate files (#11578, thanks @straight-shoota)
  • Workaround for GC issues in interpreter specs (#11634, thanks @straight-shoota)

Parser

  • Parser: allow keyword as named argument inside macros (#10377, thanks @asterite)
  • Parser: add missing end location to IsA node (#11351, thanks @FnControlOption)
  • Fix node locations for ProcLiterals with parameters (#11365, thanks @HertzDevil)
  • Fix parser error with named argument end in macro body (#11463, thanks @straight-shoota)
  • Report syntax error for too-long bin/hex/oct integer literals (#11447, thanks @oprypin)
  • [lexer] Correctly increase nesting for escaped macro unless (#11440, thanks @rymiel)
  • Show proper syntax errors in some edge cases in the parser (#11446, thanks @oprypin)
  • Fix parse yield with parenthesis (#11469, thanks @straight-shoota)
  • Lexer number parsing refactor (#11211, thanks @BlobCodes)
  • Allow underscores after a leading zero in String#to_i (regression fix) (#11672, thanks @BlobCodes)
  • Fix no comma before short block in ToSVisitor (#11677, thanks @homonoidian)
  • Unify format of "unexpected token" error (#11473, thanks @straight-shoota)
  • Implement lexer int128 support (#11571, thanks @BlobCodes)

Semantic

  • Show proper owner for Class's methods in error messages (#10590, thanks @HertzDevil)
  • Be more strict about ProcNotation variable declarations (#11372, thanks @HertzDevil)
  • Allow metaclass parameters in Proc literals and pointers (#11367, thanks @HertzDevil)
  • Fix top-level multi-assign splat variable not working in macros (#11600, thanks @HertzDevil)
  • Replace semantic with assert_no_errors in compiler specs whenever possible (#11288, thanks @HertzDevil)
  • Make inject_primitives = false default for semantic specs (#11297, thanks @HertzDevil)
  • Add spec for #8428 (#10073, thanks @docelic)
  • Remove and resolve spurious cast and its associated FIXME (#11455, thanks @rymiel)
  • Add pending spec for recursive abstract struct (#11470, thanks @HertzDevil)

Language

  • (breaking-change) Require elements in 1-to-n assignments to match targets exactly (#11145, thanks @HertzDevil)
  • (breaking-change) Require right-hand side of one-to-many assignments to be Indexable (#11545, thanks @HertzDevil)
  • Support splats on left-hand sides of multiple assignment expressions (#10410, thanks @HertzDevil)
  • Make all AST nodes immutable through container-returning methods (#11397, thanks @HertzDevil)
  • Add auto upcast for integer and float values (#11431, #11529, thanks @asterite, @beta-ziliani)

Standard Library

  • Fix Process::INITIAL_PWD for non-existent path (#10525, thanks @straight-shoota)
  • Resolve some TODOs (#11369, thanks @straight-shoota)
  • Refactor some target flag uses (#11466, thanks @straight-shoota)
  • Use Slice(UInt8)#fill in the standard library (#11468, thanks @HertzDevil)
  • Update spec/win32_std_spec.cr (#11432, #11637, thanks @HertzDevil)
  • Use strings instead of symbols in #finalize specs (#11619, thanks @HertzDevil)
  • Fix Enum.parse to handle case-sensitive member names (#11659, thanks @straight-shoota)
  • Improve docs for Object#not_nil! (#11661, thanks @straight-shoota)

Collection

  • (breaking-change) Always use start as parameter in subrange-accepting methods (#11350, thanks @HertzDevil)
  • (breaking-change) Refactor Indexable::Mutable#fill's overloads (#11368, thanks @HertzDevil)
  • Add sorting methods to StaticArray (#10889, thanks @HertzDevil)
  • Add spaceship operator to StaticArray (#11364, thanks @henrikac)
  • (performance) Optimize BitArray#reverse! (#11363, thanks @HertzDevil)
  • (performance) Grow large arrays more slowly (#11482, thanks @mgomes)
  • Fix docs for Indexable::Mutable#map! (#11349, thanks @HertzDevil)
  • Add Slice#unsafe_slice_of, #to_unsafe_bytes (#11379, thanks @HertzDevil)
  • (performance) Avoid reallocation in Enumerable#each_cons and Iterator#cons's default reused array (#10384, thanks @HertzDevil)
  • Fix Array#unshift for large arrays (#11656, thanks @HertzDevil)

Crypto

  • Support OpenSSL on Windows (#11477, thanks @HertzDevil)
  • Encode OpenSSL version on Windows (#11516, thanks @HertzDevil)
  • Add docs to Crypto::Bcrypt (#9647, thanks @j8r)
  • Fix getrandom for interpreter (#11624, thanks @straight-shoota)
  • (performance) Use more efficient method to split UInt32 to bytes in Crypto::Blowfish (#11594, thanks @BlobCodes)

Files

  • Add bindings to __xstat, __fxstat and __lxstat for x86_64-linux-gnu (#11361, #11536, thanks @straight-shoota)
  • Fix IO::Memory#to_s appending to itself (#11643, thanks @straight-shoota)

LLVM

  • Fix LLVMExtDIBuilderCreateArrayType argument alignInBits should be UInt64 (#11644, thanks @lbguilherme)

Log

  • Add Log.with_context with kwargs (#11517, thanks @caspiano)
  • Refactor Log::BroadcastBackend#single_backend? (#11530, thanks @straight-shoota)

Macros

  • Add macro methods for Return, Break, Next, Yield, and exception handlers (#10822, thanks @HertzDevil)
  • Add Crystal::Macros::ProcNotation#resolve and #resolve? (#11373, thanks @HertzDevil)
  • Support explicit return types in ProcLiterals (#11402, thanks @HertzDevil)
  • Add several missing ASTNode macro methods (#10811, thanks @HertzDevil)
  • Allow incomplete range arguments for #[](Range) macro methods (#11380, thanks @HertzDevil)
  • Add macro methods for Metaclass nodes (#11375, thanks @HertzDevil)

Networking

  • Datagram support for UNIXServer (#11426, thanks @carlhoerberg)
  • Fix WebSocket#stream flushing for not exactly buffer size, add specs (#11299, thanks @will)
  • Fix flag for UNIX-like OS (#11382, thanks @straight-shoota)
  • Add more check_headers to HTTP::Server::Response (#11253, thanks @straight-shoota)
  • Enable LogHandler address for win32 (#11465, thanks @straight-shoota)
  • Enable two specs to run on all platforms (#11467, thanks @straight-shoota)
  • TCPServer: explain how to get an ephemeral port (#11407, thanks @rdp)
  • Fix HTTP::Server::Response#close when replaced output syncs close (#11631, thanks @straight-shoota)

Numeric

  • (breaking-change) Fix Random.rand(max : Float32) return Float32 (#9946, thanks @j8r)
  • Fix Math linking errors on Windows MSVC (#11435, thanks @HertzDevil)
  • Implement compiler-rt __multi3 for arm (#11499, thanks @straight-shoota)
  • Use MPIR for Big* numbers on Windows (#11412, thanks @HertzDevil)
  • Add BigRational#to_big_r (#11462, thanks @HertzDevil)
  • Move specs for arithmetic primitives to primitives_spec (#11298, thanks @HertzDevil)
  • Implement compiler-rt's 128-bit integer conversions to/from floats (#11437, thanks @HertzDevil)
  • Fix Number.significant to return 0 as is, not as Float64 (#11321, thanks @Sija)
  • Fix inequality for floating-point NaNs (#11229, thanks @HertzDevil)
  • Add workaround for 128-bit integer division/modulo on Windows (#11551, thanks @HertzDevil)
  • Reject near-boundary and NaN values for Float-to-Int conversions (#11230, thanks @HertzDevil)

Runtime

  • GC/Boehm: Silence GC warnings about big allocations. (#11289, thanks @yxhuvud)
  • Disable impossible spec on win32, previously marked as pending (#11451, thanks @straight-shoota)
  • Support call stacks on Windows (#11461, thanks @HertzDevil)
  • Make Windows PDB lookup relative to running executable (#11493, thanks @HertzDevil)

Serialization

  • Parses JSON UInt64 numbers. (#11395, thanks @hugopl)
  • Fix YAML::Any deserialize with alias (#11532, thanks @straight-shoota)

Specs

  • Use enums instead of symbols for Spec-related types (#11585, thanks @HertzDevil)

System

  • Add native Linux syscall interface (#10777, thanks @lbguilherme)
  • Implement Path.home on Windows (#11503, thanks @HertzDevil)
  • Support ~\ for Windows paths in Path#expand and File.expand_path (#11559, thanks @HertzDevil)
  • Support non-ASCII command-line arguments on Windows (#11564, thanks @HertzDevil)
  • Enable kernel_spec.cr on Windows CI (#11554, thanks @HertzDevil)
  • Fix getrandom syscall was blocking and didn't had proper error checking (#11460, thanks @lbguilherme)

Text

  • Regex: use PCRE_UCP (#11265, thanks @asterite)
  • Add missing it in UUID spec (#11353, thanks @darkstego)
  • Add Char#unicode_escape and fix #dump and #inspect format (#11421, thanks @straight-shoota)
  • Fix Char#letter? to include all letter categories (#11474, thanks @straight-shoota)
  • Pass JIT Compile flag to study (#11325, thanks @Blacksmoke16)
  • Add Comparison operator to UUID (#11352, thanks @darkstego)
  • Add Char#printable? (#11429, thanks @straight-shoota)
  • Fix String#inspect and Char#inspect escape all non-printable characters (#11452, #11626, thanks @straight-shoota)
  • Support custom encodings on Windows through GNU libiconv (#11480, thanks @HertzDevil)
  • (breaking-change) Change Regex#name_table to return Hash(Int32, String) (#11539, thanks @straight-shoota)
  • Fix skip surrogates in Char#succ and #pred (#11506, thanks @straight-shoota)
  • (performance) Improve Base64 decoding performance (#11094, thanks @BlobCodes)
  • Refactor syntax highlighter and add ANSI escape code highlighter for console (#11366, thanks @straight-shoota)
  • Fix UTF-8 console input/output on Windows (#11557, thanks @HertzDevil)
  • Implement Unicode grapheme clusters (#11472, #11611, thanks @straight-shoota)
  • (breaking-change) Fix Char#ascii_control? restrict to ASCII characters (#11510, thanks @straight-shoota)
  • (performance) Performance: specify string sizes in advance (#11592, thanks @BlobCodes)
  • (performance) Improve performance of Char#to_s (#11593, thanks @BlobCodes)
  • Add docs to Colorize (#11664, thanks @straight-shoota)
  • Support ANSI escape sequence output on more Windows consoles (#11622, thanks @HertzDevil)

Tools

  • [docs] Fix ditto with additional lines (#11336, thanks @straight-shoota)
  • [docs] Compact some JSON fields for search (#11438, thanks @rymiel)
  • [docs] Add 404.html page (#11428, thanks @straight-shoota)
  • [docs] Improve search input a11y for generated docs (#11604, thanks @chances)
  • [docs] use shard.yml version when no git tag present (#11232, thanks @superhawk610)
  • [formatter] Fix weird interactions with comments near indentation (#11441, thanks @rymiel)
  • [formatter] fix extra newline after comment in case else (#11448, thanks @rymiel)
  • [formatter] Fix space between call name and parenthesized arg (#11523, thanks @straight-shoota)
  • [playground] Refactor PlaygroundPage resources list (#11608, thanks @straight-shoota)

Other

  • Update previous Crystal release - 1.2.2 (#11430, thanks @straight-shoota)
  • Prepare 1.3.0-dev (#11317, thanks @straight-shoota)
  • [CI] Fix test_dist_linux_on_docker (#11512, thanks @straight-shoota)
  • Improve compiler spec helpers for macro methods (#11139, thanks @HertzDevil)
  • Add Makefile to build samples (#11419, thanks @straight-shoota)
  • Verify downloads' hashes in Windows CI (#11423, thanks @matiasgarciaisaia)
  • Make the Windows compiler artifact more portable (#11494, thanks @HertzDevil)
  • Allow compiler executable under test to be overridden (#11457, thanks @HertzDevil)
  • Fix CI rules for building libiconv on Windows (#11504, thanks @HertzDevil)
  • Update license template (#11498, thanks @taupiqueur)
  • Pin alpine repo for ssl libs to 3.15 (#11500, thanks @straight-shoota)
  • Don't generate PDB for MPIR on Windows (#11521, thanks @HertzDevil)
  • [Makefile] Check for LLVM_CONFIG only when LLVM is used (#11519, thanks @straight-shoota)
  • Update distribution-scripts (#11514, #11515, thanks @straight-shoota)
  • Add commit hash to Windows builds (#11538, thanks @HertzDevil)
  • Support BuildTools and other VS variants in vswhere detection (#11534, thanks @neatorobito)
  • Define LIBXML_STATIC when building xml2.lib on Windows (#11574, thanks @HertzDevil)
  • Improve texts in README.md (#11587, thanks @athix)
  • Include shards with Windows build artifacts (#11543, thanks @neatorobito)
  • [CI] Remove libatomic_ops (#11598, thanks @straight-shoota)
  • Update NOTICE Copyright year to 2022 (#11679, thanks @matiasgarciaisaia)