Open
Conversation
* Validate raise has the right return type before using it in the no closure check Otherwise this returns a hard to understand LLVM IR verification error * Skip no closure check for non-Crystal procs They can't have a closure anyways and more importantly are represented as a single pointer. So the check could not even deconstruct them into two pointers. This previously generated invalid code trying to pass the function pointer type to the check function expecting the Crystal proc type
* Split Context from Metadata Keep Log::Context for DSL over the current fiber context. Make it a wrapper over Log::Metadata * Revert guarantee of restoring fiber context automatically With entry local metadata this is no longer need. * Rename methods * Add emitter dsl * Enforce hash like metadata in entry. And display it in IO::Backend#default_format * Fix docs * Fix immutability of datum in nested containers
* Refactor Log::Formatter * Add docs to log/format.cr * Some renames in log/format.cr * Add Log::StaticFormatter#pid * Apply log formatter renames on spec
* Refactor spec hooks * Refactor all spec hooks to work in the root context * Deprecate hook methods in Spec namespace * Improve documentation of spec hooks * Add spec for spec hooks * Reset DSL methods to raise on top level * crystal tool format
* Extract call stack code to different files acording to platform * On ELF platforms, use `dl_iterate_phdr` to load DWARF data already offsetted * Use SizeT for the `base_address` in DWARF::LineNumbers * Move definition of `dl_iterate_phdr` and ELF types to `lib_c` * Remove HACK from comment
* Mark Digest::* methods private. * Add abstract methods to Digest::Base. Allow resetting digests. Move some OpenSSL::Digest methods to Digest::Base. * OpenSSL::Digest inherit from Digest::Base and use it's interface. * Suggestions from @straight-shoota * Remove @message_block reset. * [WIP] Deprecate #digest and #hexdigest. Detect #final misuse. TODO: Use #final in specs after API approval. * Update src/digest/base.cr Co-Authored-By: Sijawusz Pur Rahnama <sija@sija.pl> * Deprecate #digest and #hexdigest. Detect #final misuse. * Suggestions from @RX14. * Update src/digest/base.cr Co-Authored-By: Sijawusz Pur Rahnama <sija@sija.pl> * Update src/digest/base.cr Co-Authored-By: Johannes Müller <johannes.mueller@smj-fulda.org> * Update src/digest/base.cr Co-Authored-By: Johannes Müller <johannes.mueller@smj-fulda.org> * Update src/digest/base.cr Co-Authored-By: Johannes Müller <johannes.mueller@smj-fulda.org> * Update src/digest/base.cr Co-Authored-By: Johannes Müller <johannes.mueller@smj-fulda.org> * Use private abstract methods instead of overrides. * Suggestions from @straight-shoota * Suggstions from @Sija * Abstract reset and documentation. * Update src/digest/md5.cr Co-Authored-By: Johannes Müller <johannes.mueller@smj-fulda.org> * Update src/digest/sha1.cr Co-Authored-By: Sijawusz Pur Rahnama <sija@sija.pl> * Update src/digest/base.cr Co-Authored-By: Johannes Müller <johannes.mueller@smj-fulda.org> * Update src/digest/base.cr Co-Authored-By: Johannes Müller <johannes.mueller@smj-fulda.org> * Update src/digest/base.cr Co-Authored-By: Johannes Müller <johannes.mueller@smj-fulda.org> * Suggestion from @straight-shoota * Update src/digest/base.cr Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl> Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl> Co-authored-by: Johannes Müller <johannes.mueller@smj-fulda.org>
…rystal-lang#9134) * Reorganize Enumerable#join specs * Add IO-first overloads to Enumerable#join * Fix deprecated uses of Enumerable#join * Fix deprecated uses of Int#to_s * Add IO-first overload to Int#to_s * Change upcase argument of Int#to_s to a named argument * Add IO-first overloads to String methods * Change to IO-first methods in Crystal::Exception * Add IO-first overload to Time#to_s
* Replace Docs::Generator#repository_name with ProjectInfo#name * Add ProjectInfo#refname * Add ProjectInfo#source_url_pattern * Refactor docs generator to use ProjectInfo#source_url * Add CLI options for refname and url pattern
* XML: improve xpath regarding namespaces * Add a few type restrictions and remove an unnecessary `to_s`
* Compiler: cast fun function pointer to Proc * Compiler: when assigning nil to a pointer/proc struct field, don't check closure * Remove unneeded raise in spec * Update spec/compiler/codegen/closure_spec.cr Co-authored-by: Jonne Haß <me@jhass.eu> Co-authored-by: Jonne Haß <me@jhass.eu>
This make will stop accepting :warning and LOG_LEVEL=WARNING in favor of :warn and LOG_LEVEL=WARN.
…ang#9294) * Avoid requiring non std-lib spec spec_helper in hooks_spec * Refactor: DRY * Completely remove top level spec_helper from std specs
* Add IO overloads to various String case methods * Replace with_io_memory with String.build * Restore ascii optimization for non IO overloads
* Escape CDATA end sequences * Update src/xml/builder.cr Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl> * Add backticks to other CDATA reference Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
* Add `StringLiteral#titleize` macro method This also adds `SymbolLiteral#titleize` and `MacroId#titleize`. Other case conversion methods (`upcase`, `camelcase`, etc) are avialble in macro. So, `#titleize` should not be exception. One use-case is generating error message from type name. * Add specs for `SymbolLiteral#titleize` and `MacroId#titleize`
* Add methods to `TypeNode` to check if its a module, class, or struct Adds specs and updates docs for `#nilable?`, `#abstract?` and `#union?` * Fix typo in struct? documentation Co-authored-by: Jonne Haß <me@jhass.eu> Co-authored-by: Jonne Haß <me@jhass.eu>
* Resolve the always-present Windows linker's warnings Currently when building on Windows, the version of MSVC linker is always printed first, then the list of all inputs, then a warning for every object file because it ends with .o, not .obj. So, use the .obj extension and disable the default outputs. So errors are still printed, but normally the output is empty. * Also switch the file extension for llvm_ext.obj
* Parser: rewrite type parser
For some reasons, the parser for types and generic type path literals is
known as one of the most complex part of the parser.
(Another one is `do ... end` block parsing.)
- **too much sharing**: the parser for a single type, type arguments,
proc type arguments, tuple element types and others are unified to just one method.
This code-sharing is excessive. They are not share syntax really, so there are many
conditions and branches, thus it is hard to follow code flow.
- **historical naming**: a type path (or part ot this) is called as `ident` for historical reason.
However `ident` means different today.
As the above reasons, gazillion bugs live in there unfortunately.
For instance, they are valid type restriction for now:
- `*Foo` (orphan splat)
- `(Foo, Bar) | Baz` (comma + union type)
- `{(Foo, Bar), Baz}` (comma + tuple type)
This commit refines type grammer and rewrite parsers.
* Update src/compiler/crystal/syntax/parser.cr
Co-authored-by: Brian J. Cardiff <bcardiff@gmail.com>
* Use Generic and Union for nilable type properly
crystal-lang#9208 (comment)
and, some bugs are fixed.
* Remove unnecessary if
Co-authored-by: Brian J. Cardiff <bcardiff@gmail.com>
…rystal-lang#9233) * IO#skip returns the number of bytes it skipped * make IO#skip return UInt64 * Allow Int arguments in IO#skip * Add specs assertions for skip / skip_to_end * Refactor: delegate IO::Stapled#skip_to_end directly to reader * Make IO#write return bytes written * Add specs, make printf return written bytes * Avoid using the BytesCounter wrapper Return bytes only in write_* operations. printf, puts, etc return Nil * Use &+ * Remove CHECK comments Co-authored-by: Carl Hörberg <carl.hoerberg@gmail.com>
…9305) GitHub and Gitlab won't resolve source URLs when the repo name has a .git extension. This extension works for other use cases (like git URLs).
…ng#9310) * Implement Process(env:) on Windows and add more Env specs Co-authored-by: Jan Zajic <jan.zajic@corpus.cz> * Add comment about "empty" keys in env * Add comments Co-authored-by: Jan Zajic <jan.zajic@corpus.cz>
…rystal-lang#9283) * Support different number of fraction digits for RFC3339 time format. Added `fraction_digits` parameter to `Time#to_rfc3339` and `Time#to_rfc3339(IO)`. * `Time::Format::Formatter#second_fraction?` also raises with negative values * Make the `fraction_digits` a keyword argument in `Time#to_rfc3339` * RFC3339 format without seconds by default * Change the default of `second_fraction?` back to full precision
…rystal-lang#9767) As far as I can tell, passing this flag just has no downsides. Without it, symlinks can be created only as administrator; with it, symlinks still can't be created by default, but can be if only "developer mode" is enabled in Windows. But I'm guessing that'll be a requirement for most things anyway.
* Fix `Process.find_executable` once and for all Make it work on Windows. Make it actually check that the found path is an *executable* *file*. Fix a lot of edge cases. Add specs and also verify that these expectations exactly match what Process.new would do. * fixup! Fix `Process.find_executable` once and for all * Expand the comment in the manual spec * Factor out a function listing possibilities of a path to check * Address review comments + refactor * Simplify compilation of test executables, doesn't have to be parallel * Add spec involving `..` * Resolve review comments
* Fix Iterator#cons_pair return type * Removed redundant return check wrapped_next already checks for stop
…ng#9792) * Use dwarf if available on Exception::CallStack.print_frame Calling callee at the beginning of the program will load dwarf * Load dwarf on start up and look for it only if compiled with --debug
Otherwise it is impossible on medium projects with crystal-db to run with the gc_none flag.
* Make abstract def return type warning an error Fixes crystal-lang#9655 * Drop AbstractDefImplementationError * Drop skip_abstract_def_check flag
Prevent Secure Client-Initiated Renegotiation vulnerability attack by default on servers Ref: https://www.openssl.org/docs/man1.1.0/man3/SSL_CTX_set_options.html#SECURE-RENEGOTIATION
Follow up crystal-lang#9722 The following example still invokes a formatter issue like crystal-lang#9657. ``` begin 1 # Comment end ``` This commit fixes such issues.
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
6528950 to
1468987
Compare
|
Merge |
Closed
Armode
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shard key start
.Shard key. Loop
Shard key Completion
Shard unkey @anathaedra