Crystal Versions Save

The Crystal Programming Language

1.11.2

3 months ago

Bugfixes

stdlib

  • (files) Fix missing cause parameter from IO::Error#initialize (#14242, thanks @straight-shoota)
  • (runtime) Always use %p for pointers in Crystal::System.print_error (#14186, thanks @HertzDevil)
  • (runtime) Fixup for always use %p for pointers in Crystal::System.print_error (#14221, thanks @HertzDevil)

Infrastructure

  • Changelog for 1.11.2 (#14249, thanks @straight-shoota)

1.11.1

3 months ago

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

3 months ago

Features

lang

  • [breaking] Support alignof and instance_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 and Iterable#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 and MacroFor 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 and Extend (#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 all Int::Primitive arguments (#13971, thanks @HertzDevil)
  • (numeric) Add Float32::MIN_SUBNORMAL and Float64::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 and TARGET_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 in File.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 and Char patterns to StringScanner (#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_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 to crystal 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 to crystal tool unreachable (#13969, thanks @straight-shoota)

Bugfixes

stdlib

  • Fix Box(T?) crashing on nil (#13893, thanks @HertzDevil)
  • Fix typos in src (#14053, thanks @kojix2)
  • (collection) Fix Indexable#each_repeated_combination(n) when n > 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 and IO::Memory capacity to grow beyond 1GB (#13989, thanks @straight-shoota)
  • (llvm) Fix a typo (#13914, thanks @kojix2)
  • (numeric) Make String#to_f(whitespace: false) work with infinity and NaN (#13875, thanks @HertzDevil)
  • (numeric) Use LibGMP::SI and UI for size checks, not Long and ULong (#13874, thanks @HertzDevil)
  • (numeric) Fix integral part extraction in Number#format (#14061, thanks @HertzDevil)
  • (numeric) Fix out-of-bounds access in Int128::MIN.to_s(base: 2) (#14119, thanks @HertzDevil)
  • (numeric) Avoid double rounding in Float#format for nonnegative decimal_place (#14129, thanks @HertzDevil)
  • (runtime) Avoid @[ThreadLocal] on Android (#14025, thanks @HertzDevil)
  • (runtime) Never use string interpolation in Crystal::System.print_error (#14114, thanks @HertzDevil)
  • (runtime) Fix segfault with next boehm gc (after v8.2.4) (#14130, thanks @ysbaddaden)
  • (specs) Skip spec execution on error exit (#13986, thanks @straight-shoota)
  • (system) Fix FileUtils.ln_sf to override special file types (#13896, thanks @straight-shoota)
  • (system) Fix Process.exists? throwing errors on EPERM (#13911, thanks @refi64)
  • (system) Fix portable shell command arguments in Process#prepare_args (#13942, thanks @GeopJr)
  • (system) Windows: Do not close process handle in Process#close (#13997, thanks @HertzDevil)
  • (system) Windows: clear Crystal::System::Process#@completion_key after use (#14068, thanks @HertzDevil)
  • (system) Fix UTF-8 console input on Windows (#13758, thanks @erdian718)
  • (text) Fix invalid UTF-8 handling in Char::Reader#previous_char (#14013, thanks @HertzDevil)
  • (text) Fix options parameter for String#split, #scan (#14183, thanks @straight-shoota)
  • (time) Fix time span overflow on Int#milliseconds and Int#microseconds (#14105, thanks @bcardiff)

compiler

  • (cli) Remove unnecessary file check for CLI arguments (#13853, thanks @straight-shoota)
  • (cli) Check for invalid integers in compiler's CLI (#13959, thanks @HertzDevil)
  • (cli) Fix compiler error message for invalid source file (#14157, thanks @straight-shoota)
  • (codegen) Fix a typo in compiler source (#14054, thanks @kojix2)
  • (codegen) Fix codegen error when discarding is_a? or responds_to?'s result (#14148, thanks @HertzDevil)
  • (interpreter) Fix element alignment of Tuple and NamedTuple casts (#14040, thanks @HertzDevil)
  • (interpreter) Crystal::Loader: Skip second linker member on Windows if absent (#14111, thanks @HertzDevil)
  • (parser) Support %r and %x when not followed by delimiter start (#13933, thanks @HertzDevil)
  • (parser) Fix location of global Path nodes in certain constructs (#13932, thanks @HertzDevil)
  • (parser) Fix ToSVisitor for expanded string interpolation in backticks (#13943, thanks @straight-shoota)
  • (parser) Fix location for "invalid trailing comma in call" errors (#13964, thanks @HertzDevil)
  • (semantic) Fix check for file type (#13760, thanks @straight-shoota)
  • (semantic) Fix private type definitions with namespaced Paths (#13931, thanks @HertzDevil)
  • (semantic) Fix missing param count in compilation error message (#13985, thanks @koffeinfrei)
  • (semantic) Fix ReadInstanceVar on typedefs (#14044, thanks @HertzDevil)
  • (semantic) Fix global Path lookup inside macro when def has free variables (#14073, thanks @HertzDevil)
  • (semantic) Add location information to implicit flag enum members (#14127, thanks @Blacksmoke16)

tools

  • (docs-generator) Fix crystal docs check File.exists? for shard.yml (#13937, thanks @straight-shoota)
  • (docs-generator) Fix version sorting in API docs (#13994, thanks @m-o-e)
  • (docs-generator) Strip whitespace in doc comment before determining summary line (#14049, thanks @Blacksmoke16)
  • (docs-generator) Skip Crystal::Macros unless generating docs (#13970, thanks @straight-shoota)
  • (init) Fix tool init error message when target exists but not a dir (#13869, thanks @straight-shoota)
  • (unreachable) Fix infinite recursion of expanded nodes in UnreachableVisitor (#13922, thanks @straight-shoota)

Chores

lang

  • (macros) [deprecation] Deprecate the splat operators in macro expressions (#13939, thanks @HertzDevil)

stdlib

  • (llvm) [deprecation] Deprecate LLVM.start_multithreaded and .stop_multithreaded (#13949, thanks @HertzDevil)

Performance

stdlib

  • (concurrency) Skip indirections in Crystal::Scheduler (#14098, thanks @ysbaddaden)
  • (numeric) Optimize BigInt#&, #|, #^ with Int::Primitive arguments (#14006, thanks @HertzDevil)
  • (numeric) Optimize BigInt#bit (#13980, thanks @HertzDevil)
  • (numeric) Use #trailing_zeros_count in Int#gcd (#14069, thanks @HertzDevil)
  • (serialization) Optimize JSON::Builder#string with byte-based algorithm (#13915, thanks @straight-shoota)
  • (serialization) Improve performance of JSON::Builder#string with direct stringification (#13950, thanks @straight-shoota)
  • (text) Refactor HTML.unescape in native Crystal (#13844, thanks @straight-shoota)
  • (text) Refactor some uses of the blockless String#split (#14001, thanks @HertzDevil)

Refactor

stdlib

  • (concurrency) Add Crystal::System::Thread (#13814, thanks @HertzDevil)
  • (concurrency) Move Thread#set_current_thread to Fiber (#14099, thanks @ysbaddaden)
  • (files) Use IO.copy in IO#gets_to_end (#13990, thanks @straight-shoota)
  • (files) Do not use pointerof(Path) in the standard library (#14144, thanks @HertzDevil)
  • (llvm) [deprecation] Remove LLVMExtSetCurrentDebugLocation from llvm_ext.cc for LLVM 9+ (#13965, thanks @HertzDevil)
  • (llvm) Replace some deprecated LLVM bindings (#13953, thanks @HertzDevil)
  • (llvm) Split LibLLVM by C headers (#13948, thanks @HertzDevil)
  • (llvm) Support LLVMSetTargetMachineGlobalISel from LLVM 18 (#14079, thanks @HertzDevil)
  • (llvm) Support the operand bundle API from LLVM 18 (#14082, thanks @HertzDevil)
  • (numeric) Simplify String::Formatter when Ryu Printf is available (#14132, thanks @HertzDevil)
  • (runtime) Implement most of Crystal::System.print_error in native Crystal (#14116, thanks @HertzDevil)
  • (text) Drop Char::Reader#@end (#13920, thanks @straight-shoota)
  • (text) Generate src/html/entities.cr automatically (#13998, thanks @HertzDevil)
  • (time) Refactor leap year to use divisible_by? (#13982, thanks @meatball133)

compiler

  • Remove relative path to vendored shards markd and reply (#13992, thanks @nobodywasishere)
  • (cli) Generalize allowed values for compiler CLI --format option (#13940, thanks @straight-shoota)
  • (parser) Use Char#to_i? in lexer (#13841, thanks @straight-shoota)

tools

  • (unreachable) Refactor UnreachablePresenter (#13941, thanks @straight-shoota)

Documentation

lang

  • (macros) Add reference to book how merging macro expansion and call docs (#14139, thanks @Blacksmoke16)

stdlib

  • (collection) Fix documentation of Hash#put_if_absent (#13898, thanks @ilmanzo)
  • (collection) Improve docs on initial/default values passed to Array.new and Hash.new (#13962, thanks @straight-shoota)
  • (collection) Improve docs for Iterator step-by-step iteration (#13967, thanks @straight-shoota)
  • (macros) Document Crystal::Macros::MagicConstant (#14070, thanks @HertzDevil)
  • (serialization) Add docs and explicit type restriction for indent parameter of JSON.build (#14140, thanks @syeopite)
  • (text) Add note about Char::Reader's value semantics (#14008, thanks @HertzDevil)
  • (text) Fix documentation for String#index! (#14038, thanks @gettalong)

compiler

  • (cli) Add optimization levels to manpage (#14162, thanks @straight-shoota)
  • (cli) Add unreachable options to manpage (#14164, thanks @straight-shoota)
  • (cli) Fix formatting in manpage (#14163, thanks @straight-shoota)

Specs

stdlib

  • Add pending_wasm32 (#14086, thanks @HertzDevil)
  • (concurrency) Workaround regular timeouts in HTTP::Server specs with MT (#14097, thanks @ysbaddaden)
  • (files) Fix File::AccessDeniedError expectations in File specs (#14029, thanks @HertzDevil)
  • (text) Refactor specs for HTML.unescape (#13842, thanks @straight-shoota)
  • (text) Fix spec for String#encode and String.new on DragonFlyBSD (#13944, thanks @GeopJr)

compiler

  • (codegen) Remove LLVMExtCreateMCJITCompilerForModule from llvm_ext.cc (#13966, thanks @HertzDevil)
  • (interpreter) Disable mkfifo spec for interpreter (#14051, thanks @HertzDevil)
  • (interpreter) Fix interpreter specs on Windows (#14145, thanks @HertzDevil)

tools

  • (docs-generator) Use top_level_semantic in doc spec instead of semantic (#9352, thanks @makenowjust)

Infrastructure

  • Changelog for 1.11.0 (#14158, thanks @straight-shoota)
  • Update previous Crystal release - 1.10.0 (#13878, thanks @straight-shoota)
  • Allow to specify git fork of distribution-scripts in CI (#13976, thanks @miry)
  • Extract generate_data to separate Makefile (#14015, thanks @straight-shoota)
  • Windows: Run specs in random order by default (#14041, thanks @HertzDevil)
  • Update shards 0.17.4 (#14133, thanks @straight-shoota)
  • Update distribution-scripts (#14136, thanks @straight-shoota)
  • Update GH Actions to v4 (#14120, thanks @renovate)
  • Embed logo image into repository and upgrade to SVG (#14137, thanks @straight-shoota)
  • Improvements for github-changelog script (#14160, thanks @straight-shoota)
  • Add scripts/generate_llvm_version_info.cr (#14112, thanks @HertzDevil)
  • Fix make clean to remove zipped manpages (#14135, thanks @straight-shoota)
  • Make scripts/*.cr all executable (#13999, thanks @HertzDevil)
  • Reformat changelog release headings (#13663, thanks @straight-shoota)
  • Merge samples/.gitignore into .gitignore (#14134, thanks @straight-shoota)
  • (ci) Update GH Actions (#13801, thanks @renovate)
  • (ci) Update LLVM patch version to LLVM 17.0.6 (#14080, thanks @straight-shoota)
  • (ci) Configure Renovate Bot to add label topic:infrastructure/ci on PRs (#14166, thanks @straight-shoota)
  • (ci) Update GH Actions (#14165, thanks @renovate)
  • (ci) Distribute LLVM DLLs on Windows CI (#14110, thanks @HertzDevil)
  • (ci) Use CMAKE_MSVC_RUNTIME_LIBRARY flag in win.yml (#13900, thanks @HertzDevil)

1.10.1

6 months ago

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

6 months ago

Features

lang

  • Add unlimited block unpacking (#11597, thanks @asterite)

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 in Hash#transform_values and value 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 with IO 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 as Nil (#13774, thanks @erdian718)
  • (files) Change IO::Buffered#peek's return type to Bytes (#13863, thanks @HertzDevil)
  • (llvm) Chop git suffix from LibLLVM::VERSION (#13699, thanks @HOMODELUNA)
  • (macros) Do not add trailing + in TypeNode#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 in require 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 Procs inside extern structs (#13711, thanks @HertzDevil)

Performance

stdlib

  • Optimize IO::Delimited (#11242, thanks @asterite)
  • (crypto) Use IO::DEFAULT_BUFFER_SIZE in Digest#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 Pointers (#13710, thanks @HertzDevil)
  • (collection) Use Set(T) instead of Hash(T, Bool) (#13611, thanks @HertzDevil)
  • (concurrency) Use Fiber.inactive inside Fiber#run's ensure block (#13701, thanks @HertzDevil)
  • (crypto) Use JSON::Serializable in scripts/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)
  • (numeric) Remove overflowing Float#to_u! interpreter primitive specs (#13737, thanks @HertzDevil)
  • (time) Clear Time::Location cache before .load_android specs (#13718, thanks @HertzDevil)

Infrastructure

  • Update previous Crystal release - 1.9.2 (#13650, thanks @straight-shoota)
  • Update distribution-scripts (#13776, thanks @straight-shoota)
  • make: Add generate_data target for running generator scripts (#13700, thanks @straight-shoota)
  • Add shell completions for clear_cache (#13636, thanks @straight-shoota)
  • New changelog format (#13662, thanks @straight-shoota)
  • Detect developer mode in Windows installer (#13681, thanks @HertzDevil)
  • Update PGP key link (#13754, thanks @syeopite)
  • Fix log format in update-distribution-scripts.sh (#13777, thanks @straight-shoota)
  • (ci) Trigger windows release jobs on tag (#13683, thanks @straight-shoota)
  • (ci) Update GH Actions (#13748, thanks @renovate)
  • (ci) Refactor crystal_bootstrap_version (#13845, thanks @straight-shoota)

1.9.2

9 months ago

Bugfixes

stdlib

  • (runtime) Revert "Add default interrupt handlers" (#13673, thanks @straight-shoota)

1.9.1

9 months ago

Bugfixes

stdlib

  • (serialization) Fix Serializable with converter parsing null value (#13656, thanks @straight-shoota)

compiler

  • (codegen) Fix generated cc command for cross compile (#13661, thanks @fnordfish)

1.9.0

9 months ago

Breaking

stdlib

  • (numeric) Handle NaNs when comparing Big* numbers against Float (#13293, #13294, #13350, #13554, thanks @HertzDevil)
  • (llvm) Remove most LLVM::DIBuilder functions from llvm_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 control Dir.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! and URI#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 to Int::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 for YAML::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 to Time#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 discard Iterator::Stop (#13388, thanks @straight-shoota)
  • (collection) Fix return type of Iterator#chunk and Enumerable#chunks without Drop (#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 when T 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 append BroadcastBackend 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 Windows (#13363, thanks @HertzDevil)
  • (networking) Parse IP addresses in Crystal instead of using LibC.inet_pton (#13463, thanks @HertzDevil)
  • (networking) Windows: do not set SO_EXCLUSIVEADDRUSE if SO_REUSEADDR already present (#13477, thanks @HertzDevil)
  • (networking) Implement Socket::IPAddress#to_s with Crystal instead of LibC.inet_ntop (#13483, thanks @HertzDevil)
  • (networking) Ensure Socket checks WinError.wsa_value on Windows, not Errno.value (#13494, thanks @HertzDevil)
  • (numeric) Disallow creating Big* numbers from infinity or NaN (#13351, thanks @HertzDevil)
  • (numeric) Fix LibM.hypotf and ldexpf link errors on Windows (#13485, thanks @HertzDevil)
  • (numeric) Make comparisons between BigRational and BigFloat exact (#13538, thanks @HertzDevil)
  • (runtime) Fix size of type_id in Object.set_crystal_type_id (#13338, thanks @straight-shoota)
  • (runtime) Allow /SUBSYSTEM:WINDOWS on Windows (#13332, thanks @HertzDevil)
  • (runtime) Use correct format strings for crash stack traces (#13408, thanks @HertzDevil)
  • (serialization) Fix handling of quoted boolean values in YAML::Any (#13546, thanks @willhbr)
  • (serialization) Fix ambiguous call with untyped int literal in {JSON,YAML}::Any.new (#13618, thanks @straight-shoota)
  • (system) Fix for Process: ensure chdir is a string (#13503, thanks @devnote-dev)
  • (system) Windows: drop internal environment variables from ENV (#13570, thanks @HertzDevil)
  • (text) Fix String#underscore with multi-character downcasing (#13540, thanks @HertzDevil)
  • (text) Do not attempt downcasing first when case-folding a Char (#13542, thanks @HertzDevil)
  • (text) Handle case folding in String#compare correctly (#13532, thanks @HertzDevil)
  • (time) Update list of Windows time zones (#13501, thanks @HertzDevil)
  • (time) Fix local timezones without DST on Windows (#13516, thanks @HertzDevil)
  • (time) Fix leap second handling for timezone information files (#13600, thanks @HertzDevil)

compiler

  • More accurate macro errors (#13260, thanks @Blacksmoke16)
  • Do not drop /LIBPATH from Windows linker command (#13530, thanks @HertzDevil)
  • Fix instantiated method signatures in error traces (#13580, thanks @HertzDevil)
  • Place --emit files back in current directory when running source (#13604, thanks @HertzDevil)
  • (generics) Fix free variable matching of bound numeric values (#13606, thanks @HertzDevil)
  • (parser) Don't skip the token immediately after lib name (#13407, thanks @FnControlOption)
  • (parser) Allow newline after hash rocket (#13460, thanks @FnControlOption)
  • (parser) Add missing locations of various AST nodes (#13452, thanks @FnControlOption)
  • (parser) Fix AST location of call name in operator assignment (#13456, thanks @FnControlOption)

tools

  • Display Bool's size as 1 byte in crystal tool hierarchy, not 0 (#13588, thanks @HertzDevil)

Performance

stdlib

  • (collection) Optimize Array#concat(Indexable) (#13280, thanks @HertzDevil)
  • (collection) Optimize Deque#concat(Indexable) (#13283, thanks @HertzDevil)
  • (concurrency) Support synchronous socket operations on Windows (#13414, thanks @HertzDevil)
  • (numeric) Optimize BigInt.new(Int::Primitive) (#13303, thanks @HertzDevil)
  • (numeric) Optimize BigRational#<=>(Int) (#13555, thanks @HertzDevil)
  • (text) Improve HTML.escape(string, io) performance (#13139, thanks @BlobCodes)
  • (text) Refactor String.ends_with? to use MatchOptions::ENDANCHORED (#13551, thanks @straight-shoota)

tools

  • (docs-generator) Optimize Doc::Method#compute_doc_info to avoid duplicate regex (#13324, thanks @straight-shoota)

Refactor

stdlib

  • Use sentence case for all standard library exceptions (#13400, thanks @HertzDevil)
  • (collection) Refactor code for Deque buffer resizing (#13257, thanks @HertzDevil)
  • (concurrency) Clean up unused code for Windows event loop (#13424, thanks @HertzDevil)
  • (files) Do not reopen current file in File#utime on Windows (#13625, thanks @HertzDevil)
  • (files) Do not reopen current file in File#chmod on Windows (#13627, thanks @HertzDevil)
  • (llvm) [deprecation] Deprecate LLVM::Module#write_bitcode_with_summary_to_file (#13488, thanks @HertzDevil)
  • (llvm) [deprecation] Deprecate LLVM's legacy pass manager (#13579, thanks @HertzDevil)
  • (llvm) Remove two outdated LLVM fun bindings (#13438, thanks @HertzDevil)
  • (llvm) Split LLVM::Builder overloads that don't take an operand bundle (#13564, thanks @HertzDevil)
  • (networking) Move more Socket methods to Crystal::System::Socket (#13346, thanks @HertzDevil)
  • (numeric) Use Int#bit_length instead of Math.log2 followed by #to_i (#13440, thanks @HertzDevil)
  • (numeric) Use GMP's functions for Float-to-BigRational conversion (#13352, thanks @HertzDevil)
  • (serialization) Simplify implementation of Serializable#initialize (#13433, thanks @straight-shoota)
  • (serialization) Use per-thread libxml2 global state on Windows (#13486, thanks @HertzDevil)
  • (text) Refactor String header layout reflection (#13335, thanks @straight-shoota)
  • (text) Refactor symbol quoting into Symbol.quote_for_named_argument (#13595, thanks @straight-shoota)

compiler

  • (parser) Crystal lexer cleanup (#13270, thanks @FnControlOption)
  • (parser) Don't use symbols in Crystal::Lexer#check_macro_opening_keyword (#13277, thanks @HertzDevil)

Documentation

stdlib

  • (concurrency) Fix operators in Atomic#add, #sub, #max, #min (#13523, thanks @HertzDevil)
  • (concurrency) Hide Crystal::LibEvent from public docs (#13624, thanks @HertzDevil)
  • (macros) Fix doc for return type of Crystal::Macros::Case#else (#13385, thanks @HertzDevil)
  • (system) Reference Process.executable_path at PROGRAM_NAME (#13434, thanks @straight-shoota)
  • (text) Add note about graphemes in String#reverse (#13536, thanks @noraj)

compiler

  • Add manual entry for clear_cache command (#13621, thanks @straight-shoota)

other

  • Implemented ',' command in brainfuck sample program (#13559, thanks @ZeroPlayerRodent)

Specs

stdlib

  • (files) Fix IO::FileDescriptor's STDIN mode spec (#13365, thanks @HertzDevil)
  • (files) Fix file permission specs on Windows (#13465, thanks @HertzDevil)
  • (files) Add slow tag to stdlib specs that compile a program (#13498, thanks @straight-shoota)
  • (serialization) Refactor JSON, YAML specs for #13337 for simplicity (#13358, thanks @straight-shoota)
  • (system) Disable Process.pgid spec on Windows (#13476, thanks @HertzDevil)
  • (text) Reorder and enhance specs for String.new(&) (#13333, thanks @straight-shoota)
  • (text) Remove incorrect CRYSTAL in comments (#13500, thanks @HertzDevil)
  • (time) Skip Time::Location.load_local spec if unable to change time zone (#13355, thanks @HertzDevil)

compiler

  • (interpreter) Regenerate spec/interpreter_std_spec.cr (#13310, thanks @cyangle)

Infrastructure

  • Update changelog with previous Crystal releases (#13322, #13373, #13450, thanks @straight-shoota)
  • Merge release/1.8 (#13361, #13449, thanks @straight-shoota)
  • PR template: adding a line about force-pushes (#12794, thanks @beta-ziliani)
  • Less verbose output in Makefile.win (#13383, thanks @HertzDevil)
  • Update distribution-scripts (#13457, thanks @Blacksmoke16)
  • Add .gitattributes to repository (#13479, thanks @HertzDevil)
  • Update shell.nix to nixpkgs-23.05 (#13571, thanks @HertzDevil)
  • Document target variable in Makefiles (#13384, thanks @HertzDevil)
  • Fix bin\crystal.ps1 writing to standard error stream (#13372, thanks @HertzDevil)
  • Avoid calling realpath of parent crystal in wrapper script (#13596, thanks @straight-shoota)
  • (ci) Show PCRE/PCRE2 configuration on CI (#13307, thanks @HertzDevil)
  • (ci) Update cachix/install-nix-action action (#13531, #13586, thanks @renovate)
  • (ci) Restrict Windows CI jobs for installer packages to release branches (#13623, thanks @HertzDevil)
  • (ci) Build samples on Windows CI (#13334, thanks @HertzDevil)
  • (ci) Do not cancel in progress CI jobs for master branch (#13393, thanks @Blacksmoke16)
  • (ci) Upgrade Windows CI to LLVM 16 (#13469, thanks @HertzDevil)
  • (ci) Distribute DLLs and import libraries on Windows (#13543, thanks @HertzDevil)
  • (ci) Build Windows portable and installer packages on CI (#13578, thanks @HertzDevil)
  • (ci) Split Windows library build scripts from CI (#13478, thanks @HertzDevil)

1.8.2

11 months ago

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

  • Fixup for JSON::Serializable on certain recursively defined types (#13430, thanks @kostya)

Text

  • Fix String#scan with empty Regex 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

1 year ago

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)