Releases: crystal-lang/crystal
Releases · crystal-lang/crystal
1.11.2
Bugfixes
stdlib
- (files) Fix missing
cause
parameter fromIO::Error#initialize
(#14242, thanks @straight-shoota) - (runtime) Always use
%p
for pointers inCrystal::System.print_error
(#14186, thanks @HertzDevil) - (runtime) Fixup for always use
%p
for pointers inCrystal::System.print_error
(#14221, thanks @HertzDevil)
Infrastructure
- Changelog for 1.11.2 (#14249, thanks @straight-shoota)
1.11.1
Bugfixes
stdlib
- (crypto) Revert "Fix OpenSSL error handling for EOF (support for OpenSSL 3.2) (#14169)" (#14217, thanks @straight-shoota)
compiler
- (interpreter) Remove pkg-config name for libgc as workaround for interpreter loader (#14198, thanks @straight-shoota)
- (semantic) Revert "Add
ReferenceStorage
for manual allocation of references (#14106)" (#14207, thanks @straight-shoota)
Infrastructure
- Changelog for 1.11.1 (#14208, thanks @straight-shoota)
- Bump VERSION to 1.11.1-dev (#14197, thanks @straight-shoota)
1.11.0
Features
lang
- [breaking] Support
alignof
andinstance_alignof
(#14087, thanks @HertzDevil) - (annotations) Support
dll
parameter in@[Link]
(#14131, thanks @HertzDevil) - (macros) Expose macro
Call
context via new@caller
macro ivar (#14048, thanks @Blacksmoke16)
stdlib
- (collection) Add
Enumerable#present?
(#13866, thanks @straight-shoota) - (collection) Add
Enumerable#each_step
andIterable#each_step
(#13610, thanks @baseballlover723) - (collection) Add
Enumerable(T)#to_set(& : T -> U) : Set(U) forall U
(#12654, thanks @caspiano) - (collection) Add
Enumerable(T)#to_a(& : T -> U) forall U
(#12653, thanks @caspiano) - (files) Add
IO::Error#target
(#13865, thanks @straight-shoota) - (llvm) Add
LLVM::OperandBundleDef#dispose
(#14095, thanks @HertzDevil) - (llvm) Windows: Use local configuration for LLVM when linking dynamically (#14101, thanks @HertzDevil)
- (macros) Add
CharLiteral#ord
(#13910, thanks @refi64) - (macros) Add macro methods for
MacroIf
andMacroFor
nodes (#13902, thanks @sbsoftware) - (macros) Expose doc comments on
ASTNode
when generating docs (#14050, thanks @Blacksmoke16) - (macros) Add macro methods for
ModuleDef
(#14063, thanks @HertzDevil) - (macros) Add macro methods for
Include
andExtend
(#14064, thanks @HertzDevil) - (macros) Add macro methods for
ClassDef
,EnumDef
,AnnotationDef
(#14072, thanks @HertzDevil) - (numeric) Implement
BigRational
's rounding modes (#13871, thanks @HertzDevil) - (numeric) Support full exponent range in
BigFloat#**(BigInt)
(#13881, thanks @HertzDevil) - (numeric) Add
Math.fma
(#13934, thanks @HertzDevil) - (numeric) Add
Number#integer?
(#13936, thanks @HertzDevil) - (numeric) Publish
Int::Primitive#abs_unsigned
and#neg_signed
(#13938, thanks @HertzDevil) - (numeric) Add
Int::Primitive#to_signed
,#to_signed!
,#to_unsigned
,#to_unsigned!
(#13960, thanks @HertzDevil) - (numeric) Support
BigFloat#**
for allInt::Primitive
arguments (#13971, thanks @HertzDevil) - (numeric) Add
Float32::MIN_SUBNORMAL
andFloat64::MIN_SUBNORMAL
(#13961, thanks @HertzDevil) - (numeric) Add
Float::Primitive.parse_hexfloat
,.parse_hexfloat?
,#to_hexfloat
(#14027, thanks @HertzDevil) - (numeric) Implement
sprintf "%f"
in Crystal using Ryu Printf (#14067, thanks @HertzDevil) - (numeric) Implement
sprintf "%e"
in Crystal (#14084, thanks @HertzDevil) - (numeric) Implement
sprintf "%a"
in Crystal (#14102, thanks @HertzDevil) - (numeric) Implement
sprintf "%g"
in Crystal (#14123, thanks @HertzDevil) - (runtime) Add
Crystal::HOST_TRIPLE
andTARGET_TRIPLE
(#13823, thanks @HertzDevil) - (runtime) [experimental] Add
Reference.pre_initialize
and.unsafe_construct
(#14108, thanks @HertzDevil) - (runtime) [experimental] Add
ReferenceStorage
for manual allocation of references (#14106, thanks @HertzDevil) - (serialization) Fix
StaticArray#to_json
(#14104, thanks @Vendicated) - (specs) Add
crystal spec --dry-run
(#13804, thanks @nobodywasishere) - (specs) Add
crystal spec --list-tags
(#13616, thanks @baseballlover723) - (system) Respect Windows
Path
directory separators inFile.match?
(#13912, thanks @HertzDevil) - (text) Support Unicode 15.1.0 (#13812, thanks @HertzDevil)
- (text) Add
UUID.v1
,.v2
,.v3
,.v4
,.v5
(#13693, thanks @threez) - (text) Add
String
andChar
patterns toStringScanner
(#13806, thanks @funny-falcon) - (text) Add
EOL
constant (End-Of-Line) (#11303, thanks @postmodern) - (text) Add
Char::Reader#current_char?
,#next_char?
,#previous_char?
(#14012, thanks @HertzDevil) - (text) Add
String#matches_full?
(#13968, thanks @straight-shoota) - (text) Change
Regex::MatchData#to_s
to return matched substring (#14115, thanks @Vendicated)
compiler
- (codegen) Add incremental optimization levels (#13464, thanks @kostya)
- (debugger) Support debug information for 64-bit or unsigned enums (#14081, thanks @HertzDevil)
- (interpreter) Support
instance_sizeof(T)
in the interpreter (#14031, thanks @HertzDevil) - (interpreter) Support
-dynamic.lib
in Windows interpreter (#14143, thanks @HertzDevil) - (interpreter) Support absolute paths in
CRYSTAL_INTERPRETER_LOADER_INFO
(#14147, thanks @HertzDevil) - (interpreter) Add
Crystal::Repl#parse_and_interpret
(#14138, thanks @bcardiff) - (semantic) Change short_reference for top-level methods to
::foo
(#14071, thanks @keshavbiswa)
tools
- (docs-generator) Expose inherited macros in generated API docs (#13810, thanks @Blacksmoke16)
- (docs-generator) Order macros below class methods in generated docs (#14024, thanks @Blacksmoke16)
- (formatter) Do not remove trailing comma from multi-line macro/def parameters (not yet enabled) (#14075, thanks @Blacksmoke16)
- (unreachable) Add
--check
flag tocrystal tool unreachable
(#13930, thanks @straight-shoota) - (unreachable) Add annotations to output of
crystal tool unreachable
(#13927, thanks @straight-shoota) - (unreachable) Print relative paths in
crystal tool unreachable
(#13929, thanks @straight-shoota) - (unreachable) Add CSV output format to
crystal tool unreachable
(#13926, thanks @straight-shoota) - (unreachable) Add
--tallies
option tocrystal tool unreachable
(#13969, thanks @straight-shoota)
Bugfixes
stdlib
- Fix
Box(T?)
crashing onnil
(#13893, thanks @HertzDevil) - Fix typos in src (#14053, thanks @kojix2)
- (collection) Fix
Indexable#each_repeated_combination(n)
whenn > size
(#14092, thanks @HertzDevil) - (concurrency) Make
Process#wait
asynchronous on Windows (#13908, thanks @HertzDevil) - (concurrency) Fix math overflow after spawning
Int32::MAX + 1
fibers (#14096, thanks @ysbaddaden) - (concurrency) Fix
can't resume a running fiber
(#14128, thanks @ysbaddaden) - (crypto) Fix OpenSSL error handling for EOF (support for OpenSSL 3.2) (#14169, thanks @straight-shoota)
- (files) Fix
Globber.constant_entry?
matching patterns (#13955, thanks @GeopJr) - (files) Fix
String::Buffer
andIO::Memory
capacity to grow beyond 1GB (#13989, thanks @straight-shoota) - (llvm) Fix a typo ([#13914](https://github.com/crystal-...
1.10.1
Bugfixes
stdlib
IO#gets
should have same result regardless of#peek
availability (#13882, thanks @compumike)- Support Android API levels 24 - 27 (#13884, thanks @HertzDevil)
Infrastructure
- (ci) Fix
win.yml
(#13876, thanks @straight-shoota)
1.10.0
Features
lang
stdlib
- Add more
Colorize::Mode
flags (#13745, thanks @HertzDevil) - (collection) Add
Hash#put_if_absent
(#13590, thanks @HertzDevil) - (collection) Add
Set#rehash
(#13630, thanks @HertzDevil) - (collection) Add yield
key
inHash#transform_values
andvalue
in#transform_keys
(#13608, thanks @baseballlover723) - (crypto) Upgrade SSL defaults to Mozilla guidelines version 5.7 (#13685, thanks @straight-shoota)
- (crypto) [security] Allow OpenSSL clients to choose cipher (#13695, thanks @carlhoerberg)
- (files) Add
File#rename
(#13640, thanks @carlhoerberg) - (llvm) Support LLVM 17 (#13782, thanks @HertzDevil)
- (networking) Add overloads for
URI::Params.encode
withIO
parameter (#13798, thanks @jwoertink) - (numeric) Add
Complex#to_i128
,Complex#to_u128
(#13838, thanks @HertzDevil) - (runtime) Add additional fields to
GC:ProfStats
(#13734, thanks @carlhoerberg) - (serialization) Support YAML deserialization of 128-bit integers (#13834, thanks @HertzDevil)
- (serialization) Support 128-bit integers in
JSON::PullParser#read?
(#13837, thanks @HertzDevil) - (specs) [breaking] Change spec runner to exit with failure for
focus: true
(#13653, thanks @straight-shoota) - (text) Add
String#byte_index(Char)
(#13819, thanks @funny-falcon) - (time) Support Android's system timezone database (#13666, thanks @HertzDevil)
compiler
- Experimental: Add
Slice.literal
for numeric slice constants (#13716, thanks @HertzDevil)
tools
- Add
tool unreachable
(#13783, thanks @straight-shoota) - (dependencies) Add
crystal tool dependencies
(#13631, thanks @straight-shoota) - (docs-generator) Add CSS for tables (#13822, thanks @nobodywasishere)
- (hierarchy) Support generic types in
crystal tool hierarchy
(#13715, thanks @HertzDevil) - (playground) Update octicons to v19.5.0 (#13738, thanks @GeopJr)
Bugfixes
lang
- (macros) Fix missing normalization of macro expressions (and others) (#13709, thanks @asterite)
- (macros) Fix block parameter unpacking inside macros (#13813, thanks @HertzDevil)
stdlib
- (collection) [breaking] Mark the return type of methods such as
Slice#copy_to
asNil
(#13774, thanks @erdian718) - (files) Change
IO::Buffered#peek
's return type toBytes
(#13863, thanks @HertzDevil) - (llvm) Chop git suffix from
LibLLVM::VERSION
(#13699, thanks @HOMODELUNA) - (macros) Do not add trailing
+
inTypeNode#id
for virtual types (#13708, thanks @HertzDevil) - (numeric) Fix
BigDecimal#round
for large digit counts in base 10 (#13811, thanks @HertzDevil) - (serialization) Set encoding in
XML.parse_html
explicitly to UTF-8 (#13705, thanks @straight-shoota) - (serialization) Fix error message when parsing unknown JSON enum value (#13728, thanks @willhbr)
- (serialization) Fix YAML scalar type validation error message (#13771, thanks @MistressRemilia)
- (serialization) Fix incorrect overflow in
UInt64.from_yaml
(#13829, thanks @HertzDevil) - (system) Fix
Process.new
with nilable chdir parameter on Windows (#13768, thanks @straight-shoota) - (system) Fix typo in unistd.cr (#13850, thanks @kojix2)
- (text) Fix
Char::Reader#each
bounds check after block (#13817, thanks @straight-shoota) - (text) Minor fixup for
HTML.decode_codepoint
(#13843, thanks @straight-shoota)
compiler
- [breaking] Remove double
.cr.cr
extension inrequire
path lookup (#13749, thanks @straight-shoota) - (parser) Fix end location for
FunDef
(#13789, thanks @straight-shoota) - (semantic) Fix lookup scope for
@[Primitive]
def's return type (#13658, thanks @HertzDevil) - (semantic) Fix typo in call_error.cr (#13764, thanks @kojix2)
tools
- (docs-generator) Fix octicon-link icon color on dark mode (#13670, thanks @GeopJr)
- (docs-generator) Allow word breaks between module names in docs (#13827, thanks @nobodywasishere)
- (docs-generator) Fix docs dark mode dropdown background on blink (#13840, thanks @GeopJr)
- (init) Fix shard crystal version in
crystal init
(#13730, thanks @xendk) - (hierarchy): Fix byte sizes for
Proc
s inside extern structs (#13711, thanks @HertzDevil)
Performance
stdlib
- Optimize
IO::Delimited
(#11242, thanks @asterite) - (crypto) Use
IO::DEFAULT_BUFFER_SIZE
inDigest#update
(#13635, thanks @carlhoerberg) - (crypto) Fix memory leak in
OpenSSL::SSL::Socket#peer_certificate
(#13785, thanks @compumike) - (files) Optimize
IO#read_string(0)
(#13732, thanks @jgaskins) - (files) Avoid double file buffering (#13780, thanks @carlhoerberg)
- (llvm) Refactor
LLVM.default_target_triple
to avoid regex (#13659, thanks @straight-shoota) - (numeric) Pre-allocate Dragonbox cache array (#13649, thanks @HertzDevil)
- (runtime) Avoid realloc callstack array when unwinding (#13781, thanks @carlhoerberg)
- (time) Optimize the constructors of
Time::Span
(#13807, thanks @erdian718)
Refactor
stdlib
- Do not use nilable
Pointer
s (#13710, thanks @HertzDevil) - (collection) Use
Set(T)
instead ofHash(T, Bool)
(#13611, thanks @HertzDevil) - (concurrency) Use
Fiber.inactive
insideFiber#run
'sensure
block (#13701, thanks @HertzDevil) - (crypto) Use
JSON::Serializable
inscripts/generate_ssl_server_defaults.cr
(#13667, thanks @HertzDevil) - (crypto) Refactor narrow OpenSSL requires for digest implementations (#13818, thanks @straight-shoota)
- (networking) [deprecation] Add types to
HTTP::StaticFileHandler
(#13778, thanks @jkthorne)
compiler
- Restrict some boolean properties to
Bool
in the compiler (#13614, thanks @HertzDevil)
Documentation
stdlib
- (crypto) Fix docs for
Digest::SHA512
(#13796, thanks @jgaskins) - (files) Document
Dir#mkdir
,Dir#exists?
(#13795, thanks @jkthorne) - (networking) Add documentation for
HTTP::Headers#add
(#13762, thanks @jkthorne) - (text) Fix typo in regex.cr (#13751, thanks @beta-ziliani)
Specs
stdlib
- (numeric) Update specs for
Int::Primitive.from_json
(#13835, thanks @HertzDevil)
-...
1.9.2
1.9.1
Bugfixes
stdlib
- (serialization) Fix
Serializable
with converter parsingnull
value (#13656, thanks @straight-shoota)
compiler
- (codegen) Fix generated cc command for cross compile (#13661, thanks @fnordfish)
1.9.0
Breaking
stdlib
- (numeric) Handle NaNs when comparing
Big*
numbers againstFloat
(#13293, #13294, #13350, #13554, thanks @HertzDevil) - (llvm) Remove most
LLVM::DIBuilder
functions fromllvm_ext.cc
(#13448, thanks @HertzDevil)
Features
lang
- (macros) Add
warning
macro (#13262, thanks @Blacksmoke16) - (macros) Add
print
macro (#13336, thanks @jkthorne)
stdlib
- (collection) Add
Enumerable#in_slices_of
(#13108, thanks @pricelessrabbit) - (collection) Add support for dash separator to
Enum.parse
(#13508, thanks @straight-shoota) - (collection) Add
Enum#to_i128
and#to_u128
(#13576, thanks @meatball133) - (collection) Add
Enumerable#partition
overload with type filter (#13572, thanks @baseballlover723) - (concurrency) Support asynchronous
IO.pipe
on Windows (#13362, thanks @HertzDevil) - (files) [deprecation] Add
File::MatchOptions
to controlDir.glob
's behavior (#13550, thanks @HertzDevil) - (networking) Implement
Socket#reuse_port
on Windows (#13326, thanks @stakach) - (networking) Add multicast support to
UDPSocket
on Windows (#13325, thanks @stakach) - (networking) HTTP Server should allow custom concurrency models (#13428, thanks @stakach)
- (networking) Add
Socket::IPaddress.v4
,.v6
,.v4_mapped_v6
(#13422, thanks @HertzDevil) - (networking) Add
URI::Params#merge
,#merge!
andURI#update_query_params
(#13415, thanks @skinnyjames) - (networking) Support Unix sockets on Windows (#13493, thanks @HertzDevil)
- (networking) Add
HTTP::Request#form_params
(#13418, thanks @threez) - (numeric) Add
BigDecimal#%
(#13255, thanks @MattAlp) - (numeric) Improve conversions from
BigInt
toInt::Primitive
(#13562, thanks @HertzDevil) - (runtime) Print error if unable to delay-load DLL on Windows (#13475, thanks @HertzDevil)
- (runtime) Add default interrupt handlers (#13568, thanks @straight-shoota)
- (serialization) Add
ignore_serialize
forYAML::Serializable
(#13556, thanks @meatball133) - (specs) Add a testcase line number to the output of JUnitFormatter (#13468, thanks @nobodywasishere)
- (specs) Publish the
assert_prints
spec helper (#13599, thanks @HertzDevil) - (system) Implement
Process.exec
on Windows (#13374, thanks @HertzDevil) - (system) Add
File::BadExecutableError
(#13491, thanks @HertzDevil) - (text) Add inspection of Regex options support (#13354, thanks @straight-shoota)
- (text) Add
Regex.literal
(#13339, thanks @straight-shoota) - (text) Implement
#match!
for Regex (#13285, thanks @devnote-dev) - (text) Add parameters for
Regex::MatchOptions
to matching methods (#13353, thanks @straight-shoota) - (text) Add
Char#titlecase
for correct mixed-case transformations (#13539, thanks @HertzDevil) - (time) Add
start_day
parameter toTime#at_beginning_of_week
(#13446, thanks @DanielGilchrist) - (time) Map IANA time zone identifiers to Windows time zones (#13517, thanks @HertzDevil)
- (time) Add
Time.unix_ns
and#to_unix_ns
(#13359, thanks @garymardell)
compiler
- Add message about non-release mode to
crystal --version
(#13254, thanks @will) - Respect
%CC%
on Windows (#13376, thanks @HertzDevil) - Support DLL delay-loading on Windows (#13436, thanks @HertzDevil)
- Support
-static
and-dynamic
.lib
suffixes on Windows (#13473, #13645, thanks @HertzDevil) - Make compiler aware of output extension when building programs (#13370, thanks @HertzDevil)
- Support
CRYSTAL_LIBRARY_RPATH
for adding dynamic library lookup paths (#13499, thanks @HertzDevil) - Add compiler command
crystal clear_cache
(#13553, thanks @baseballlover723) - (codegen) Support LLVM 16 (#13181, thanks @HertzDevil)
- (semantic) Correctly ignore nested deprecation warnings (#13513, thanks @straight-shoota)
tools
- (docs-generator) Add dark mode to docs (#13512, thanks @GeopJr)
- (docs-generator) Add mobile support to docs (#13515, thanks @GeopJr)
- (formatter) [security] Formatter: escape bi-directional control characters within strings (#13067, thanks @HertzDevil)
Bugfixes
stdlib
- (collection) Fix
Array#flatten
to discardIterator::Stop
(#13388, thanks @straight-shoota) - (collection) Fix return type of
Iterator#chunk
andEnumerable#chunks
withoutDrop
(#13506, thanks @straight-shoota) - (collection) Fix
Iterator#with_index(offset)
with non-Int32
offset
(#13612, thanks @HertzDevil) - (concurrency) Fix
preview_mt
infinite loop on Windows (#13419, thanks @HertzDevil) - (concurrency) Fix
Atomic#max
and#min
for signed enums (#13524, thanks @HertzDevil) - (concurrency) Fix timeout events getting lost on Windows (#13525, thanks @HertzDevil)
- (concurrency) Support
Atomic(T)#compare_and_set
whenT
is a reference union (#13565, thanks @HertzDevil) - (files) Fix
Dir#info
on Windows (#13395, thanks @HertzDevil) - (files) Windows: open standard streams in binary mode (#13397, thanks @HertzDevil)
- (files) Fix
File.info(File::NULL)
on Windows (#13421, thanks @HertzDevil) - (files) Allow
File.delete
to remove read-only files on Windows (#13462, thanks @HertzDevil) - (files) Make
fcntl
defined on all platforms (#13495, thanks @HertzDevil) - (files) Allow
Dir.delete
to remove read-only directories on Windows (#13626, thanks @HertzDevil) - (files) Use current directory's root for
Dir.glob("/...")
on Windows (#13628, thanks @HertzDevil) - (llvm) Fix
LLVM.default_target_triple
to normalize aarch64 darwin target (#13597, thanks @straight-shoota) - (log) Fix
Log::Builder
appendBroadcastBackend
to itself (#13405, thanks @straight-shoota) - (macros) Fix error message for calling
record
macro with kwargs (#13367, thanks @a-alhusaini) - (networking) Remove double URL escape in
HTTP::Server::Response.redirect
(#13321, thanks @threez) - (networking) Fix WebSocket capitalization in docs (#13331, thanks @joshrickard)
- (networking) Fix
TCPSocket#tcp_keepalive_idle
on Windows (#13364, thanks @HertzDevil) - (networking) Fix client-side
TCPSocket#remote_address
on ...
1.8.2
Standard Library
Collection
- Fix codegen bug with
Iterator::ChainIterator
(#13412, thanks @straight-shoota)
Log
- Fix
Log::Metadata#dup
crash with 2+ entries (#13369, thanks @HertzDevil)
Serialization
Text
- Fix
String#scan
with emptyRegex
match at multibyte char (#13387, thanks @HertzDevil) - (performance) Check subject UTF-8 validity just once for
String#gsub
,#scan
,#split
(#13406, thanks @HertzDevil)
Compiler
Codegen
- Always use 0 for offset of
StaticArray
's@buffer
(#13319, thanks @HertzDevil)
Other
- Backport bugfixes to release/1.8 for release 1.8.2 (#3435, thanks @straight-shoota)
1.8.1
Standard Library
Serialization
- Fix
JSON::Serializable
on certain recursively defined types (#13344, thanks @HertzDevil)
Text
- Fix
String#gsub
with empty match at multibyte char (#13342, thanks @straight-shoota) - Fix PCRE2
Regex
with more than 127 named capture groups (#13349, thanks @HertzDevil)