crystal v1.4.0 Release Notes
Release Date: 2022-04-06 // about 2 years ago-
Language
- โ Add support for
Int128
in codegen and macros (#11576, thanks @BlobCodes) - ๐ Support
ProcPointer
s with global path and top-level method references (#11777, thanks @HertzDevil) - ๐ Fix documentation for macros
system
andrun
(#11740, thanks @lbguilherme) - ๐ Experimental: better type inference for ivars/cvars (#11812, thanks @asterite)
- ๐ Support
@[Deprecated]
on constants (#11680, thanks @HertzDevil)
Standard Library
- ๐ Fix compiler flags with optional arg eating following flags (#11201, thanks @yb66)
- ๐ Support GNU style optional arguments in
OptionParser
(#11546, thanks @HertzDevil) - โ Remove some unnecessary link annotations (#11563, thanks @straight-shoota)
- โ Remove useless assignments (#11774, thanks @IgorPolyakov)
- ๐ Use "truthy" and "falsey" in more places in the documentation (#11784, thanks @HertzDevil)
- โ Add missing code blocks for
self
in documentation (#11718, thanks @HertzDevil) - โ Add support for LLVM 14.0 (#11905, thanks @HertzDevil)
- ๐ Fix code examples in doc comments (2022-03) (#11927, thanks @maiha)
Collection
- โ Remove
Iterator.of(Iterator.stop)
from implementations (#11613, thanks @asterite) - โ Add allow
Enumerable
arguments forHash#select
and#reject
(#11750, thanks @mamantoha) - โ Add docs for
Hash#reject!
(#11691, thanks @wontruefree) - โ Add raising method variants
Enumerable#find!
and#index!
(#11566, thanks @yxhuvud) - ๐ (performance) Optimize block-less overloads of
BitArray#fill
(#11450, thanks @HertzDevil) - โ Adds docs for
Array#replace
(#11682, thanks @wontruefree) - ๐ (performance) Optimize
BitArray
's counting methods (#11591, thanks @HertzDevil) - โ Add some return types to Array, Hash, Set and String (#11822, thanks @asterite)
- โ Add
Hash#update
(#11881, thanks @ftarulla) - ๐ Allow
Bytes[]
to construct an emptyBytes
(#11897, thanks @HertzDevil) - ๐ Improve
BitArray
's constructors (#11898, thanks @HertzDevil) - โ Add overload to
Enumerable#tally
and#tally_by
accepting a hash (#11815, thanks @mamantoha)
Crypto
- โ Add support for Bcrypt algorithm version
2b
(#11595, thanks @docelic)
Files
- ๐ Fix race condition in
chown
(#11885, thanks @didactic-drunk) - โ Add docs for
Dir#each_child
(#11688, thanks @wontruefree) - โ Add docs for
Dir#path
(#11689, thanks @wontruefree) - ๐ Support read-write + binary file modes in
File.open
(#11817, thanks @HertzDevil) - โ Add docs for
Dir#entries
(#11701, thanks @wontruefree) - Add
IO#getb_to_end
(#11830, thanks @HertzDevil) - ๐ Fix
IO::FileDescriptor#pos
giving incorrect position after write (#10865, thanks @didactic-drunk) - โ Remove reference to binary file mode in
File.open
(#11824, thanks @HertzDevil)
Macros
- โ Add
#parse_type
(#11126, thanks @Blacksmoke16)
Networking
- ๐ (performance) Optimize
URI.decode
(#11741, thanks @asterite) - ๐ Fix
address_spec
expectation for Windows Server 2022 (#11794, thanks @straight-shoota) - Add
space_to_plus
option inURI::Params
everywhere (#11821, thanks @asterite) - ๐ Improve
URI::Params#inspect
to use hash-like literal (#11880, thanks @straight-shoota) - ๐ Use enums instead of symbols for
MIME::Multipart
andHTTP::FormData
(#11617, thanks @HertzDevil)
Numeric
- (breaking-change) Fix: Hide
BigDecimal::ZERO
andBigDecimal::TEN
(#11820, thanks @lbguilherme) - (breaking-change) Add support for scientific notation in
BigFloat#to_s
(#10632, thanks @HertzDevil) - ๐ Fix: Inspect string in error message for number parsing (#11883, thanks @straight-shoota)
- โ Add docs for
Complex#zero?
(#11697, thanks @wontruefree) - ๐ Fix E notation parsing in
BigDecimal
(#9577, thanks @stevegeek) - ๐ (performance) Optimize Integer decoding from bytes (#11796, thanks @carlhoerberg)
โ Runtime
- ๐ Fix interpreter when shared library
pthread
is missing (#11807, thanks @straight-shoota) - ๐ (performance) Implement
Intrinsics.pause
for aarch64 (#11742, thanks @lbguilherme, @jgaskins) - โ Add crash handler on Windows (#11570, thanks @HertzDevil)
- โ Add specs for
NamedTuple#from
(#11816, thanks @straight-shoota) - ๐ Improve error for incompatible generic arguments for
WeakRef
(#11911, thanks @straight-shoota) - โ Add the wasm entrypoint defined in Crystal (#11936, thanks @lbguilherme)
Serialization
- ๐ Allow passing instance method or conditional expressions to option
ignore_serialize
onJSON::Field
(#11804, thanks @cyangle) - Implement
Iterator.from_json
and#to_json
(#10437, thanks @wonderix)
Specs
- โ Add
file
andline
arguments toit_iterates
(#11628, thanks @straight-shoota) - โ Remove duplicate word in documentation (#11797, thanks @samueleaton)
System
- (breaking-change) (security) Fix character mappings for Windows path conversions (#11847, thanks @straight-shoota)
- โ Add fallback for
Path.home
on Unix (#11544, thanks @HertzDevil) - ๐ Relax
ENV.fetch(key, &)
's block restriction (#11779, thanks @HertzDevil) - ๐จ Refactor target clauses for system implementations (#11813, thanks @straight-shoota)
- ๐ Fix
Path
support for UNC shares (#11827, thanks @straight-shoota) - ๐ Fix regression for Linux older than 3.17: properly check that
getrandom
is available (#11953, thanks @lbguilherme)
Text
- ๐ Fix ensure PCRE JIT mode is available before running spec (#11533, thanks @Blacksmoke16)
- โ Add more
Colorize
overloads and fix docs (#11832, thanks @asterite) - ๐จ Refactor
Colorize::Mode
enum (#11663, thanks @straight-shoota) - โ Add some docs for
UUID
(#11683, thanks @wontruefree) - โ Add docs for
UUID#urn
(#11693, thanks @wontruefree) - โ Add docs for
String#[]
(#11690, thanks @wontruefree) - ๐ Allow explicit usage of
libiconv
(#11876, thanks @luislavena) - (breaking-change) Fix: Honour encoding in
IO::Memory#to_s
(#11875, thanks @straight-shoota) - โ Add
self
return type toUUID
constructor methods (#10539, thanks @straight-shoota) - ๐ Fix infinite loop for certain
StringPool
initial capacities (#11929, thanks @HertzDevil)
Time
- โ Add examples to
Time::Format
methods (#11713, thanks @ThunderKey) - ๐ Support day of year (
%j
) inTime
parsers (#11791, thanks @HertzDevil)
Compiler
- Hello WebAssembly! (MVP implementation) (#10870, thanks @lbguilherme)
- ๐ Fix compiler specs git integration for configurable default branch (#11754, thanks @yxhuvud)
- ๐
Crystal::ToSVisitor
: Removedecorate_*
methods (#11724, thanks @HertzDevil) - ๐ Use fewer symbols in the compiler source (#11625, thanks @HertzDevil)
- โ Add support for
--m*
flags tocrystal spec
andcrystal eval
(#11767, thanks @yxhuvud) - โ Add local compiler wrapper script for Windows (#11524, thanks @HertzDevil)
- โ Add
Crystal::Program#check_deprecation
(#11684, thanks @HertzDevil) - ๐จ Refactor symbols for primitive number kinds to enums (#11621, thanks @HertzDevil)
- โ Remove useless assignments II (#11843, thanks @IgorPolyakov)
- Limit the number of rendered overloads on signature mismatch (#10890, thanks @caspiano)
- ๐ Support "can't infer type parameter" error for uninstantiated generic modules (#11904, thanks @HertzDevil)
- ๐ Fix: Accept only option flags in
CRYSTAL_OPTS
for build commands (#11922, thanks @HertzDevil, @beta-ziliani) - Evaluate
LibLLVM::IS_LT_*
during macro expansion time (#11913, thanks @HertzDevil) - ๐ Fix incorrect var type inside nested exception handler (#11928, thanks @asterite)
- ๐ Fix: Look up return type in defining type (#11962, thanks @asterite)
Codegen
- ๐ (performance) Codegen: Do not always request value for
Proc#call
(#11675, thanks @HertzDevil)
Debugger
- ๐ Fix debug location of inlined
Proc#call
body (#11676, thanks @HertzDevil)
Generics
- ๐ Resolve non-type free variables in return type restrictions (#11861, thanks @HertzDevil)
- ๐ Fix recursive
pointerof
detection with generic splat type variables (#11811, thanks @HertzDevil)
Interpreter
- ๐ Fix for Crystal interpreter crash (#11717, thanks @wmoxam)
- ๐ Interpreter: support
Tuple#[]
with range literals (#11783, thanks @HertzDevil) - Interpreter: Promote arguments of variadic function calls (#11795, thanks @straight-shoota)
- Check if libraries are present using
dlopen
(#11852, thanks @FnControlOption) - ๐ Use
Crystal::Loader
in the interpreter (#11579, thanks @straight-shoota) - ๐ Improve
Crystal::Loader
errors (#11860, thanks @straight-shoota) - Enable interpreter integration specs for
YAML
(#11801, thanks @straight-shoota)
๐ Parser
- ๐ Fix parser error with semicolon + newline in parenthesized
Expressions
(#11769, thanks @straight-shoota) - ๐ Fix comment indentation in
ASTNode#to_s
(#11851, thanks @FnControlOption) - โ Add locations for
else
,ensure
,end
keywords (#11476, thanks @FnControlOption) - โ Add parser support to handle CRLF the same as LF (#11810, thanks @asterite)
- Lexer: use
Crystal::Token::Kind
enum instead of symbols (#11616, thanks @HertzDevil) - ๐ Support
Generic
nodes with no type variables (#11906, thanks @HertzDevil)
Semantic
- (breaking-change) Drop
skip_abstract_def_check
flag support (#9217, thanks @makenowjust) - โ Add error when instance variable is inherited from module and supertype (#11768, thanks @straight-shoota)
- Check file-private types for abstract defs and recursive structs (#11838, thanks @HertzDevil)
- ๐ Fix: Prevent eager
instance_sizeof
on structs (#11856, thanks @mattrberry) - ๐ Fix: Do not consider global
Path
in def parameter restriction as free variable (#11862, thanks @HertzDevil)
Tools
- Do not inherit from
Hash
in the compiler (#11707, thanks @HertzDevil) - ๐ Use
OptionParser
incrystal env
(#11720, thanks @HertzDevil)
Playground
- โก๏ธ Replace PNG icon with optimized SVG for playground (#7616, thanks @straight-shoota)
Other
- ๐ Update previous Crystal release - 1.3.2 (#11715, thanks @straight-shoota)
- โ Add
scripts/release-update.sh
(#11716, thanks @straight-shoota) - [Makefile] Honour
$CC
inEXPORT_CC
(#11548, thanks @straight-shoota) - ๐ Fix typo in GHA aarch64 config (#11793, thanks @straight-shoota)
- โ [CI] Test against LLVM 13 (#11343, thanks @straight-shoota)
- [CI] Use parameters in circleci config (#11714, thanks @straight-shoota)
- ๐จ Refactor
etc/completion.bash
(#11719, thanks @HertzDevil) - ๐ [CI] Renaming jobs to be
arch-os-job
orarch-build-job
(#11207, thanks @beta-ziliani) - ๐ Improve documentation for review and merge processes (#11800, thanks @straight-shoota)
- ๐ Improve section ordering in
scripts/github-changelog.cr
(#11770, thanks @straight-shoota) - ๐ Upload build artifacts to S3 bucket (#11902, thanks @matiasgarciaisaia, @straight-shoota)
- ๐ Fix
make install
for BSD (#11758, thanks @straight-shoota) - ๐ Fix typo (#11939, thanks @taupiqueur)
- โก๏ธ [CI] Update to shards 0.17.0 (#11930, thanks @straight-shoota)
- ๐ Use
be_empty
expectations in more specs (#11937, thanks @HertzDevil) - โก๏ธ [CI] Update distribution-scripts (#11969, thanks @straight-shoota)
- โ Add support for