Releases: crystal-lang/crystal
Releases · crystal-lang/crystal
1.11.2
Bugfixes
stdlib
- (files) Fix missing
causeparameter fromIO::Error#initialize(#14242, thanks @straight-shoota) - (runtime) Always use
%pfor pointers inCrystal::System.print_error(#14186, thanks @HertzDevil) - (runtime) Fixup for always use
%pfor 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
ReferenceStoragefor 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
alignofandinstance_alignof(#14087, thanks @HertzDevil) - (annotations) Support
dllparameter in@[Link](#14131, thanks @HertzDevil) - (macros) Expose macro
Callcontext via new@callermacro ivar (#14048, thanks @Blacksmoke16)
stdlib
- (collection) Add
Enumerable#present?(#13866, thanks @straight-shoota) - (collection) Add
Enumerable#each_stepandIterable#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
MacroIfandMacroFornodes (#13902, thanks @sbsoftware) - (macros) Expose doc comments on
ASTNodewhen generating docs (#14050, thanks @Blacksmoke16) - (macros) Add macro methods for
ModuleDef(#14063, thanks @HertzDevil) - (macros) Add macro methods for
IncludeandExtend(#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_unsignedand#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::Primitivearguments (#13971, thanks @HertzDevil) - (numeric) Add
Float32::MIN_SUBNORMALandFloat64::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_TRIPLEandTARGET_TRIPLE(#13823, thanks @HertzDevil) - (runtime) [experimental] Add
Reference.pre_initializeand.unsafe_construct(#14108, thanks @HertzDevil) - (runtime) [experimental] Add
ReferenceStoragefor 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
Pathdirectory 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
StringandCharpatterns toStringScanner(#13806, thanks @funny-falcon) - (text) Add
EOLconstant (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_sto 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.libin 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
--checkflag 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
--talliesoption 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#waitasynchronous on Windows (#13908, thanks @HertzDevil) - (concurrency) Fix math overflow after spawning
Int32::MAX + 1fibers (#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::BufferandIO::Memorycapacity to grow beyond 1GB (#13989, thanks @straight-shoota) - (llvm) Fix a typo ([#13914](https://github.com/crystal-...
1.10.1
Bugfixes
stdlib
IO#getsshould have same result regardless of#peekavailability (#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::Modeflags (#13745, thanks @HertzDevil) - (collection) Add
Hash#put_if_absent(#13590, thanks @HertzDevil) - (collection) Add
Set#rehash(#13630, thanks @HertzDevil) - (collection) Add yield
keyinHash#transform_valuesandvaluein#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.encodewithIOparameter (#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.literalfor 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_toasNil(#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#idfor virtual types (#13708, thanks @HertzDevil) - (numeric) Fix
BigDecimal#roundfor large digit counts in base 10 (#13811, thanks @HertzDevil) - (serialization) Set encoding in
XML.parse_htmlexplicitly 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.newwith nilable chdir parameter on Windows (#13768, thanks @straight-shoota) - (system) Fix typo in unistd.cr (#13850, thanks @kojix2)
- (text) Fix
Char::Reader#eachbounds check after block (#13817, thanks @straight-shoota) - (text) Minor fixup for
HTML.decode_codepoint(#13843, thanks @straight-shoota)
compiler
- [breaking] Remove double
.cr.crextension inrequirepath 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
Procs inside extern structs (#13711, thanks @HertzDevil)
Performance
stdlib
- Optimize
IO::Delimited(#11242, thanks @asterite) - (crypto) Use
IO::DEFAULT_BUFFER_SIZEinDigest#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_tripleto 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
Pointers (#13710, thanks @HertzDevil) - (collection) Use
Set(T)instead ofHash(T, Bool)(#13611, thanks @HertzDevil) - (concurrency) Use
Fiber.inactiveinsideFiber#run'sensureblock (#13701, thanks @HertzDevil) - (crypto) Use
JSON::Serializableinscripts/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
Boolin 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
Serializablewith converter parsingnullvalue (#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::DIBuilderfunctions fromllvm_ext.cc(#13448, thanks @HertzDevil)
Features
lang
- (macros) Add
warningmacro (#13262, thanks @Blacksmoke16) - (macros) Add
printmacro (#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_i128and#to_u128(#13576, thanks @meatball133) - (collection) Add
Enumerable#partitionoverload with type filter (#13572, thanks @baseballlover723) - (concurrency) Support asynchronous
IO.pipeon Windows (#13362, thanks @HertzDevil) - (files) [deprecation] Add
File::MatchOptionsto controlDir.glob's behavior (#13550, thanks @HertzDevil) - (networking) Implement
Socket#reuse_porton Windows (#13326, thanks @stakach) - (networking) Add multicast support to
UDPSocketon 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
BigInttoInt::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_serializeforYAML::Serializable(#13556, thanks @meatball133) - (specs) Add a testcase line number to the output of JUnitFormatter (#13468, thanks @nobodywasishere)
- (specs) Publish the
assert_printsspec helper (#13599, thanks @HertzDevil) - (system) Implement
Process.execon 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::MatchOptionsto matching methods (#13353, thanks @straight-shoota) - (text) Add
Char#titlecasefor correct mixed-case transformations (#13539, thanks @HertzDevil) - (time) Add
start_dayparameter 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_nsand#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
-staticand-dynamic.libsuffixes on Windows (#13473, #13645, thanks @HertzDevil) - Make compiler aware of output extension when building programs (#13370, thanks @HertzDevil)
- Support
CRYSTAL_LIBRARY_RPATHfor 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#flattento discardIterator::Stop(#13388, thanks @straight-shoota) - (collection) Fix return type of
Iterator#chunkandEnumerable#chunkswithoutDrop(#13506, thanks @straight-shoota) - (collection) Fix
Iterator#with_index(offset)with non-Int32offset(#13612, thanks @HertzDevil) - (concurrency) Fix
preview_mtinfinite loop on Windows (#13419, thanks @HertzDevil) - (concurrency) Fix
Atomic#maxand#minfor signed enums (#13524, thanks @HertzDevil) - (concurrency) Fix timeout events getting lost on Windows (#13525, thanks @HertzDevil)
- (concurrency) Support
Atomic(T)#compare_and_setwhenTis a reference union (#13565, thanks @HertzDevil) - (files) Fix
Dir#infoon 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.deleteto remove read-only files on Windows (#13462, thanks @HertzDevil) - (files) Make
fcntldefined on all platforms (#13495, thanks @HertzDevil) - (files) Allow
Dir.deleteto 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_tripleto normalize aarch64 darwin target (#13597, thanks @straight-shoota) - (log) Fix
Log::BuilderappendBroadcastBackendto itself (#13405, thanks @straight-shoota) - (macros) Fix error message for calling
recordmacro 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_idleon Windows (#13364, thanks @HertzDevil) - (networking) Fix client-side
TCPSocket#remote_addresson ...
1.8.2
Standard Library
Collection
- Fix codegen bug with
Iterator::ChainIterator(#13412, thanks @straight-shoota)
Log
- Fix
Log::Metadata#dupcrash with 2+ entries (#13369, thanks @HertzDevil)
Serialization
Text
- Fix
String#scanwith emptyRegexmatch 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::Serializableon certain recursively defined types (#13344, thanks @HertzDevil)
Text
- Fix
String#gsubwith empty match at multibyte char (#13342, thanks @straight-shoota) - Fix PCRE2
Regexwith more than 127 named capture groups (#13349, thanks @HertzDevil)