diff --git a/doc/changelogs/v1.21.md b/doc/changelogs/v1.21.md new file mode 100644 index 000000000000..7c2685afbb23 --- /dev/null +++ b/doc/changelogs/v1.21.md @@ -0,0 +1,387 @@ +# Changelog 1.21 + +## [1.21.0] (2026-07-16) + +Freeze period starts 2026-07-02 + +[1.21.0]: https://github.com/crystal-lang/crystal/releases/1.21.0 + +### Breaking changes + +#### stdlib + +- _(text)_ Disable automatic fallback to legacy `PCRE` ([#16924], thanks @straight-shoota) + +[#16924]: https://github.com/crystal-lang/crystal/pull/16924 + +### Features + +#### lang + +- _(macros)_ Add `TypeNode#all_methods` that includes the type's ancestor's methods ([#16902], thanks @Blacksmoke16) + +[#16902]: https://github.com/crystal-lang/crystal/pull/16902 + +#### stdlib + +- _(cli)_ Align long-only options in OptionParser help ([#16914], thanks @kojix2) +- _(collection)_ Make `Channel(T)` an `Iterator(T)` ([#16916], thanks @jgaskins) +- _(crypto)_ Add support for OpenSSL 4.0 ([#16839], thanks @straight-shoota) +- _(networking)_ **[experimental]** Add `Socket#sendfile` (and `Crystal::EventLoop::Socket#sendfile`) ([#16665], thanks @ysbaddaden) +- _(networking)_ Add `HTTP::WebSocket#receive` as a synchronous call ([#16689], thanks @jgaskins) +- _(runtime)_ Add `Crystal::EventLoop::FileDescriptor#pread` ([#17068], thanks @ysbaddaden) +- _(runtime)_ Add `without_main` flag ([#17074], thanks @kojix2) +- _(serialization)_ Support nested `root` properties in `JSON::Field` ([#17016], thanks @tcoatswo) +- _(serialization)_ Add `URI::Params::Field(ignore:)`, `ignore_serialize`, `ignore_deserialize` ([#17029], thanks @trypsynth) +- _(specs)_ Allow chaining `#should`, `#should_not` expectations ([#17020], thanks @straight-shoota) +- _(system)_ Expose `Path#kind` ([#16917], thanks @Sija) +- _(system)_ Add splat overloads for `Process.capture`, `.run` and `.new` ([#16975], thanks @straight-shoota) +- _(system)_ Add `Process::Status.[]` constructor ([#17003], thanks @straight-shoota) +- _(text)_ Add `String#present?` ([#16930], thanks @Sija) +- _(text)_ Add `UUID.v6` and `.v8` generators ([#17010], thanks @trypsynth) + +[#16665]: https://github.com/crystal-lang/crystal/pull/16665 +[#16689]: https://github.com/crystal-lang/crystal/pull/16689 +[#16839]: https://github.com/crystal-lang/crystal/pull/16839 +[#16914]: https://github.com/crystal-lang/crystal/pull/16914 +[#16916]: https://github.com/crystal-lang/crystal/pull/16916 +[#16917]: https://github.com/crystal-lang/crystal/pull/16917 +[#16930]: https://github.com/crystal-lang/crystal/pull/16930 +[#16975]: https://github.com/crystal-lang/crystal/pull/16975 +[#17003]: https://github.com/crystal-lang/crystal/pull/17003 +[#17010]: https://github.com/crystal-lang/crystal/pull/17010 +[#17016]: https://github.com/crystal-lang/crystal/pull/17016 +[#17020]: https://github.com/crystal-lang/crystal/pull/17020 +[#17029]: https://github.com/crystal-lang/crystal/pull/17029 +[#17068]: https://github.com/crystal-lang/crystal/pull/17068 +[#17074]: https://github.com/crystal-lang/crystal/pull/17074 + +#### compiler + +- _(cli)_ Classify compiler exit reasons ([#17028], thanks @straight-shoota) +- _(debugger)_ Improve proc debug metadata ([#16830], thanks @skuznetsov) +- _(debugger)_ Emit debug metadata for constants and class vars ([#16831], thanks @skuznetsov) +- _(debugger)_ Improve LLDB collection formatters ([#16832], thanks @skuznetsov) +- _(parser)_ Add `ASTNode#inspect` ([#16699], thanks @straight-shoota) +- _(parser)_ Parse `MacroVar` with empty expressions: `%var{}` ([#16772], thanks @straight-shoota) +- _(parser)_ Add `%W` percent string array literals with interpolation ([#16919], thanks @straight-shoota) +- _(semantic)_ Split branches on `when Bar, Baz` ([#17072], thanks @straight-shoota) + +[#16699]: https://github.com/crystal-lang/crystal/pull/16699 +[#16772]: https://github.com/crystal-lang/crystal/pull/16772 +[#16830]: https://github.com/crystal-lang/crystal/pull/16830 +[#16831]: https://github.com/crystal-lang/crystal/pull/16831 +[#16832]: https://github.com/crystal-lang/crystal/pull/16832 +[#16919]: https://github.com/crystal-lang/crystal/pull/16919 +[#17028]: https://github.com/crystal-lang/crystal/pull/17028 +[#17072]: https://github.com/crystal-lang/crystal/pull/17072 + +#### tools + +- _(docs-generator)_ Improve wording in warning about doc generator without LibXML2 ([#16926], thanks @kojix2) + +[#16926]: https://github.com/crystal-lang/crystal/pull/16926 + +### Bugfixes + +#### stdlib + +- _(cli)_ Fix summary wrapping condition in OptionParser ([#16915], thanks @kojix2) +- _(cli)_ Avoid `Process.exec` on Windows and explicitly spawn subprocess ([#17049], thanks @straight-shoota) +- _(collection)_ Fix `Iterator#compact_map` with `EmptyIterator` ([#16928], thanks @straight-shoota) +- _(collection)_ Fix `Iterator#compact_map` with non-nilable compactor proc ([#16927], thanks @straight-shoota) +- _(concurrency)_ Fix swapped atomic orderings in `Sync::MU` fast paths ([#17063], thanks @stevegeek) +- _(llvm)_ Fix use line 0 for unknown debug location ([#17013], thanks @straight-shoota) +- _(networking)_ Fix `HTTP::Request.form_params?` to recognize `Content-Type` and `charset` ([#16934], [#16971], thanks @swsch, @straight-shoota) +- _(networking)_ Fix `HTTP::Client` to retry for connection recovery only ([#16981], thanks @straight-shoota) +- _(networking)_ Disable transport read-ahead for kTLS sockets ([#17053], thanks @jage) +- _(runtime)_ `Fiber::ExecutionContext::Monitor` compat with old Crystal releases ([#17007], thanks @ysbaddaden) +- _(runtime)_ `EventLoop::IoUring#open` musn't set `O_NONBLOCK` when blocking ([#17035], thanks @ysbaddaden) +- _(runtime)_ underperforming unlock conditions in `Sync::MU` ([#17070], thanks @ysbaddaden) +- _(runtime)_ `fdlock#try_close?` must release ref after yielding to the block ([#17089], thanks @ysbaddaden) +- _(serialization)_ memory leak in `XML::Node#each_namespace` ([#17038], thanks @ysbaddaden) +- _(text)_ Fix `IO::Encoder#write` when operating on long strings ([#16797], thanks @jgaskins) + +[#16797]: https://github.com/crystal-lang/crystal/pull/16797 +[#16915]: https://github.com/crystal-lang/crystal/pull/16915 +[#16927]: https://github.com/crystal-lang/crystal/pull/16927 +[#16928]: https://github.com/crystal-lang/crystal/pull/16928 +[#16934]: https://github.com/crystal-lang/crystal/pull/16934 +[#16971]: https://github.com/crystal-lang/crystal/pull/16971 +[#16981]: https://github.com/crystal-lang/crystal/pull/16981 +[#17007]: https://github.com/crystal-lang/crystal/pull/17007 +[#17013]: https://github.com/crystal-lang/crystal/pull/17013 +[#17035]: https://github.com/crystal-lang/crystal/pull/17035 +[#17038]: https://github.com/crystal-lang/crystal/pull/17038 +[#17049]: https://github.com/crystal-lang/crystal/pull/17049 +[#17053]: https://github.com/crystal-lang/crystal/pull/17053 +[#17063]: https://github.com/crystal-lang/crystal/pull/17063 +[#17070]: https://github.com/crystal-lang/crystal/pull/17070 +[#17089]: https://github.com/crystal-lang/crystal/pull/17089 + +#### compiler + +- _(cli)_ cross-compile crashes when combined with emit llvm-bc or obj ([#17060], thanks @ysbaddaden) +- _(cli)_ Remedy short-flag conflict for `crystal spec -p` ([#17062], thanks @straight-shoota) +- _(codegen)_ Fix codegen treating distinct lib `type` aliases as the same type ([#16961], thanks @stakach) +- _(codegen)_ **[regression]** Revert "Fix: cross-compile crashes when combined with emit llvm-bc or obj (#17060)" ([#17080], thanks @straight-shoota) +- _(interpreter)_ Add interpreter `upcast_distinct` for `Pointer` to `Pointer` ([#16962], thanks @stakach) +- _(interpreter:repl)_ Fix auto-indentation in the REPL when typing classes. ([#16910], thanks @I3oris) +- _(interpreter:repl)_ Fix interpreter multidispatch cache collision ([#16958], thanks @stakach) +- _(parser)_ Fix lexing `MacroVar` syntax in literal ([#16779], thanks @straight-shoota) +- _(parser)_ Fix short block setter call end location ([#17039], thanks @Sija) +- _(parser)_ Fix parsing macro var without exps followed by macro expression ([#16879], thanks @straight-shoota) +- _(parser)_ Fix parse parenthesized expression in block arg assignment ([#16894], thanks @straight-shoota) +- _(parser)_ Do not merge nested `Expression` and `ExceptionHandler` ([#16852], thanks @straight-shoota) +- _(parser)_ Fix parser silently ignoring `&(...)`, `&[...]`, `&{...}` in assignment ([#16960], thanks @stakach) +- _(parser)_ Fix parser allow `/` and `//` immediately after `self`, `nil`, `true`, `false` ([#16942], thanks @stakach) +- _(semantic)_ Fix freeze type of variable declared with `out` ([#16870], thanks @straight-shoota) +- _(semantic)_ Fix `lookup_matches_in_type` to reject partial matches ([#16867], thanks @straight-shoota) +- _(semantic)_ Fix location of double splat named tuple typenode entry locations ([#16889], thanks @Blacksmoke16) +- _(semantic)_ Fix `sizeof`, `offsetof` as generic type argument in inferred ivar type ([#16811], thanks @kojix2) +- _(semantic)_ Fix macro argument errors for path receiver calls ([#16923], thanks @kojix2) +- _(semantic)_ Detect uninitialized ancestor ivars through macro_def initializers ([#16959], thanks @stakach) +- _(semantic)_ Preserve `nil_if_read?` across while cond filters ([#16963], thanks @stakach) +- _(semantic)_ Keep wider subclass observer when call owner narrows (#16947) ([#16990], thanks @stakach) +- _(semantic)_ Symmetric `common_descendent` for two generic class types (#10831) ([#16999], thanks @stakach) + +[#16779]: https://github.com/crystal-lang/crystal/pull/16779 +[#16811]: https://github.com/crystal-lang/crystal/pull/16811 +[#16852]: https://github.com/crystal-lang/crystal/pull/16852 +[#16867]: https://github.com/crystal-lang/crystal/pull/16867 +[#16870]: https://github.com/crystal-lang/crystal/pull/16870 +[#16879]: https://github.com/crystal-lang/crystal/pull/16879 +[#16889]: https://github.com/crystal-lang/crystal/pull/16889 +[#16894]: https://github.com/crystal-lang/crystal/pull/16894 +[#16910]: https://github.com/crystal-lang/crystal/pull/16910 +[#16923]: https://github.com/crystal-lang/crystal/pull/16923 +[#16942]: https://github.com/crystal-lang/crystal/pull/16942 +[#16958]: https://github.com/crystal-lang/crystal/pull/16958 +[#16959]: https://github.com/crystal-lang/crystal/pull/16959 +[#16960]: https://github.com/crystal-lang/crystal/pull/16960 +[#16961]: https://github.com/crystal-lang/crystal/pull/16961 +[#16962]: https://github.com/crystal-lang/crystal/pull/16962 +[#16963]: https://github.com/crystal-lang/crystal/pull/16963 +[#16990]: https://github.com/crystal-lang/crystal/pull/16990 +[#16999]: https://github.com/crystal-lang/crystal/pull/16999 +[#17039]: https://github.com/crystal-lang/crystal/pull/17039 +[#17060]: https://github.com/crystal-lang/crystal/pull/17060 +[#17062]: https://github.com/crystal-lang/crystal/pull/17062 +[#17080]: https://github.com/crystal-lang/crystal/pull/17080 + +#### tools + +- _(formatter)_ Fix format empty `then` with trailing comment ([#16878], thanks @straight-shoota) +- _(formatter)_ Fix formatting whitespace in ternary `if` with trailing comments ([#16880], thanks @straight-shoota) +- _(formatter)_ Fix formatter on empty string literal continuation ([#16817], thanks @straight-shoota) +- _(formatter)_ Fix format annotations of splat parameter ([#16987], thanks @straight-shoota) +- _(formatter)_ Fix formatter strip empty lines in heredoc ([#17034], thanks @straight-shoota) + +[#16817]: https://github.com/crystal-lang/crystal/pull/16817 +[#16878]: https://github.com/crystal-lang/crystal/pull/16878 +[#16880]: https://github.com/crystal-lang/crystal/pull/16880 +[#16987]: https://github.com/crystal-lang/crystal/pull/16987 +[#17034]: https://github.com/crystal-lang/crystal/pull/17034 + +### Chores + +#### stdlib + +- _(files)_ **[deprecation]** Rename parameter to `writable` in `IO::Memory.new` ([#16858], [#16883], thanks @straight-shoota) + +[#16858]: https://github.com/crystal-lang/crystal/pull/16858 +[#16883]: https://github.com/crystal-lang/crystal/pull/16883 + +### Performance + +#### stdlib + +- _(collection)_ Preallocate correct size for hash in `Hash.zip` ([#17054], thanks @carlhoerberg) + +[#17054]: https://github.com/crystal-lang/crystal/pull/17054 + +### Refactor + +#### stdlib + +- _(cli)_ Split error helper for compiler CLI into independent methods ([#16984], thanks @straight-shoota) +- _(cli)_ Refactor compiler code to raise `CompilerError` instead of `abort` ([#16995], thanks @straight-shoota) +- _(networking)_ Refactor bubbling exceptions from user code in `HTTP::Client#exec(&)` ([#16969], thanks @straight-shoota) +- _(runtime)_ Internalize `IO::Evented` into `Crystal::EventLoop::Wasi` ([#17030], thanks @ysbaddaden) +- _(runtime)_ Fix: thread safety of the libevent event loop ([#17031], thanks @ysbaddaden) +- _(runtime)_ Drop unused `IO::Evented` and `Crystal::ThreadLocalValue` ([#17032], thanks @ysbaddaden) +- _(runtime)_ Consolidate `#overlapped_connect` and `#overlapped_accept` into `EventLoop::IOCP` ([#17090], thanks @ysbaddaden) +- _(system)_ Refactor `Dir::Globber` to a struct with instance methods ([#16899], thanks @straight-shoota) +- _(system)_ Refactor internal `Process` constructor to receive `Crystal::System::Process` ([#16933], thanks @straight-shoota) +- _(system)_ dont parse but mmap ELF, Mach-O, PE files and some DWARF sections ([#16939], thanks @ysbaddaden) + +[#16899]: https://github.com/crystal-lang/crystal/pull/16899 +[#16933]: https://github.com/crystal-lang/crystal/pull/16933 +[#16939]: https://github.com/crystal-lang/crystal/pull/16939 +[#16969]: https://github.com/crystal-lang/crystal/pull/16969 +[#16984]: https://github.com/crystal-lang/crystal/pull/16984 +[#16995]: https://github.com/crystal-lang/crystal/pull/16995 +[#17030]: https://github.com/crystal-lang/crystal/pull/17030 +[#17031]: https://github.com/crystal-lang/crystal/pull/17031 +[#17032]: https://github.com/crystal-lang/crystal/pull/17032 +[#17090]: https://github.com/crystal-lang/crystal/pull/17090 + +#### compiler + +- Replace backticks with `Process.capture` ([#17012], thanks @straight-shoota) +- _(codegen)_ Set `optsize` and `minsize` fun attributes for the `-Os` and `-Oz` optimization modes ([#16983], thanks @ysbaddaden) +- _(parser)_ Parse parens in type grammar into `Union#parens` ([#16744], [#16908], thanks @straight-shoota) +- _(parser)_ Refactor whitespace branch in `Lexer#next_macro_token` [follow-up #16771] ([#16776], thanks @straight-shoota) +- _(parser)_ Refactor formatter, remove internal `delimited_pair(advance)` ([#17023], thanks @straight-shoota) + +[#16744]: https://github.com/crystal-lang/crystal/pull/16744 +[#16776]: https://github.com/crystal-lang/crystal/pull/16776 +[#16908]: https://github.com/crystal-lang/crystal/pull/16908 +[#16983]: https://github.com/crystal-lang/crystal/pull/16983 +[#17012]: https://github.com/crystal-lang/crystal/pull/17012 +[#17023]: https://github.com/crystal-lang/crystal/pull/17023 + +#### tools + +- _(formatter)_ **[breaking]** Standardize parsing of symbol and string array literals ([#16748], thanks @straight-shoota) +- _(formatter)_ Drop `format_binary` parameter `alternative` ([#16912], thanks @straight-shoota) + +[#16748]: https://github.com/crystal-lang/crystal/pull/16748 +[#16912]: https://github.com/crystal-lang/crystal/pull/16912 + +#### other + +- Fix violations reported by ameba 1.7 ([#17021], thanks @straight-shoota) + +[#17021]: https://github.com/crystal-lang/crystal/pull/17021 + +### Documentation + +#### stdlib + +- _(macros)_ Improve docs for `::delegate` ([#16854], thanks @straight-shoota) +- _(text)_ Document null-termination on `String#to_unsafe` ([#16869], thanks @mvanhorn) +- _(text)_ Document `String` is not inheritable ([#17000], thanks @LaskaIDK) + +[#16854]: https://github.com/crystal-lang/crystal/pull/16854 +[#16869]: https://github.com/crystal-lang/crystal/pull/16869 +[#17000]: https://github.com/crystal-lang/crystal/pull/17000 + +#### other + +- Fix typo `writable` in documentation ([#16848], thanks @straight-shoota) +- Format asciidoc ([#16992], thanks @straight-shoota) +- rumdl: Fix MD077: Continuation line over-indented ([#17085], thanks @straight-shoota) + +[#16848]: https://github.com/crystal-lang/crystal/pull/16848 +[#16992]: https://github.com/crystal-lang/crystal/pull/16992 +[#17085]: https://github.com/crystal-lang/crystal/pull/17085 + +### Specs + +#### stdlib + +- _(cli)_ Refactor `run_git` spec helper to use `Process.capture_result?` ([#17079], thanks @straight-shoota) +- _(collection)_ Add specs for `Iterator.empty` ([#17014], thanks @straight-shoota) +- _(concurrency)_ Fix: Crystal 1.0.0 is confused by file private types ([#17067], thanks @ysbaddaden) +- _(networking)_ Extract spec helpers `close_connection` and `client_for` for HTTP client specs ([#16968], thanks @straight-shoota) +- _(text)_ Add specs for range accessor with open ended exclusive range ([#16849], thanks @straight-shoota) + +[#16849]: https://github.com/crystal-lang/crystal/pull/16849 +[#16968]: https://github.com/crystal-lang/crystal/pull/16968 +[#17014]: https://github.com/crystal-lang/crystal/pull/17014 +[#17067]: https://github.com/crystal-lang/crystal/pull/17067 +[#17079]: https://github.com/crystal-lang/crystal/pull/17079 + +#### compiler + +- _(cli)_ Add `compiler-cli` test suite ([#17033], thanks @straight-shoota) +- _(debugger)_ Fix `lldb-check` expectations in debug tests for compatibility with modern LLDB ([#16860], thanks @straight-shoota) + +[#16860]: https://github.com/crystal-lang/crystal/pull/16860 +[#17033]: https://github.com/crystal-lang/crystal/pull/17033 + +#### other + +- Remove unnecessary `not_nil!` in spec suite ([#16865], thanks @straight-shoota) +- Replace `not_nil!` with `should_not(be_nil)` in spec suite ([#16906], thanks @straight-shoota) + +[#16865]: https://github.com/crystal-lang/crystal/pull/16865 +[#16906]: https://github.com/crystal-lang/crystal/pull/16906 + +### Infrastructure + +- Update previous Crystal release 1.20.0 ([#16844], thanks @ysbaddaden) +- Update previous Crystal release 1.20.1 ([#16901], thanks @straight-shoota) +- Merge `release/1.19`@`1.19.2` into `master` ([#16905], thanks @straight-shoota) +- Merge `release/1.20`@`1.20.1` into `master` ([#16900], thanks @straight-shoota) +- Update `devenv.lock` ([#16819], [#16935], [#17006], [#17075], [#17084], thanks @github-actions, @crysbot) +- Update changelog script ([#16946], thanks @straight-shoota) +- Extract `CRYSTAL_BOOTSTRAP_VERSION` in `bin/ci` ([#16966], thanks @straight-shoota) +- Update previous Crystal release 1.20.2 ([#16954], thanks @straight-shoota) +- Makefile: Split `install` target into subcomponents ([#16980], thanks @straight-shoota) +- Update `release-update` script ([#16977], thanks @straight-shoota) +- Makefile: Build manpages for `install` target ([#16991], thanks @straight-shoota) +- Apply `shfmt` ([#17015], thanks @straight-shoota) +- Apply `mbake` formatter for `Makefile` ([#17024], thanks @straight-shoota) +- infra: devenv input for `git-hooks` follows `nixpkgs` ([#17064], thanks @straight-shoota) +- Replace `markdownlint` with `rumdl` ([#17069], thanks @straight-shoota) +- Replace `.markdownlint.yaml` with `rumdl.toml` ([#17078], thanks @straight-shoota) +- _(ci)_ Fix `-Devloop=io_uring` flag in Linux CI ([#16843], thanks @straight-shoota) +- _(ci)_ Use PAT from GHA environments for `backport` job ([#16864], thanks @straight-shoota) +- _(ci)_ Use AWS credentials from GHA environments for `deploy_api_docs` job ([#16863], thanks @straight-shoota) +- _(ci)_ Update GH Actions ([#16836], [#16944], [#17011], [#17042], thanks @renovate) +- _(ci)_ Use Crysbot token in `update-devenv` workflow to trigger CI ([#16938], thanks @straight-shoota) +- _(ci)_ Fix tags for nightly docker images ([#16973], thanks @straight-shoota) +- _(ci)_ Drop separate `aarch64` workflow ([#16965], thanks @straight-shoota) +- _(ci)_ Update crate-ci/typos action to v1.46.2 ([#16986], thanks @renovate) +- _(ci)_ Update `macos-15` runners to `macos-26` ([#17022], thanks @straight-shoota) +- _(ci)_ Upgrade library dependencies for Windows CI ([#17025], thanks @straight-shoota) +- _(ci)_ Upgrade windows runners to VS 2026 ([#17043], thanks @straight-shoota) +- _(ci)_ Upgrade nixpkgs 26.05 in `Lint` workflow ([#17066], thanks @straight-shoota) + +[#16819]: https://github.com/crystal-lang/crystal/pull/16819 +[#16836]: https://github.com/crystal-lang/crystal/pull/16836 +[#16843]: https://github.com/crystal-lang/crystal/pull/16843 +[#16844]: https://github.com/crystal-lang/crystal/pull/16844 +[#16863]: https://github.com/crystal-lang/crystal/pull/16863 +[#16864]: https://github.com/crystal-lang/crystal/pull/16864 +[#16900]: https://github.com/crystal-lang/crystal/pull/16900 +[#16901]: https://github.com/crystal-lang/crystal/pull/16901 +[#16905]: https://github.com/crystal-lang/crystal/pull/16905 +[#16935]: https://github.com/crystal-lang/crystal/pull/16935 +[#16938]: https://github.com/crystal-lang/crystal/pull/16938 +[#16944]: https://github.com/crystal-lang/crystal/pull/16944 +[#16946]: https://github.com/crystal-lang/crystal/pull/16946 +[#16954]: https://github.com/crystal-lang/crystal/pull/16954 +[#16965]: https://github.com/crystal-lang/crystal/pull/16965 +[#16966]: https://github.com/crystal-lang/crystal/pull/16966 +[#16973]: https://github.com/crystal-lang/crystal/pull/16973 +[#16977]: https://github.com/crystal-lang/crystal/pull/16977 +[#16980]: https://github.com/crystal-lang/crystal/pull/16980 +[#16986]: https://github.com/crystal-lang/crystal/pull/16986 +[#16991]: https://github.com/crystal-lang/crystal/pull/16991 +[#17006]: https://github.com/crystal-lang/crystal/pull/17006 +[#17011]: https://github.com/crystal-lang/crystal/pull/17011 +[#17015]: https://github.com/crystal-lang/crystal/pull/17015 +[#17022]: https://github.com/crystal-lang/crystal/pull/17022 +[#17024]: https://github.com/crystal-lang/crystal/pull/17024 +[#17025]: https://github.com/crystal-lang/crystal/pull/17025 +[#17042]: https://github.com/crystal-lang/crystal/pull/17042 +[#17043]: https://github.com/crystal-lang/crystal/pull/17043 +[#17064]: https://github.com/crystal-lang/crystal/pull/17064 +[#17066]: https://github.com/crystal-lang/crystal/pull/17066 +[#17069]: https://github.com/crystal-lang/crystal/pull/17069 +[#17075]: https://github.com/crystal-lang/crystal/pull/17075 +[#17078]: https://github.com/crystal-lang/crystal/pull/17078 +[#17084]: https://github.com/crystal-lang/crystal/pull/17084 + +### other + +#### stdlib + +- _(cli)_ **[deprecation]** Deprecate `Colorize.on_tty_only!` ([#16859], thanks @straight-shoota) +- _(system)_ **[deprecation]** Hide platform-specific `Process::Status` constructor ([#16997], thanks @straight-shoota) + +[#16859]: https://github.com/crystal-lang/crystal/pull/16859 +[#16997]: https://github.com/crystal-lang/crystal/pull/16997 diff --git a/scripts/github-changelog.cr b/scripts/github-changelog.cr index 4ddb7bf36f6c..3852ea347903 100755 --- a/scripts/github-changelog.cr +++ b/scripts/github-changelog.cr @@ -14,10 +14,13 @@ # GITHUB_TOKEN: Access token for the GitHub API (required) require "http/client" require "json" +require "colorize" abort "Missing GITHUB_TOKEN env variable" unless ENV["GITHUB_TOKEN"]? api_token = ENV["GITHUB_TOKEN"] +MISSING_TOPICS = Set(PullRequest).new + case ARGV.size when 0 abort "Missing argument" @@ -141,6 +144,10 @@ record PullRequest, io << "[#" << number << "]" end + def ==(other : self) + number == other.number + end + def <=>(other : self) sort_tuple <=> other.sort_tuple end @@ -173,7 +180,7 @@ record PullRequest, def topic topics.fetch(0) do - STDERR.puts "Missing topic for ##{number}" + MISSING_TOPICS.add(self) nil end end @@ -495,3 +502,11 @@ SECTION_TITLES.each do |id, title| end end end + +if MISSING_TOPICS.present? + Colorize.enabled = true + STDERR.puts "Missing topics:" + MISSING_TOPICS.each do |pr| + STDERR.puts "\e]8;;https://github.com/crystal-lang/crystal/pull/#{pr.number}\e\\#{pr.title.colorize(:white)} (#{pr.number.to_s.colorize(:light_gray)})\e]8;;\e\\ (#{pr.labels.join(", ")})" + end +end diff --git a/scripts/update-changelog.sh b/scripts/update-changelog.sh index f4f4d46b634f..981896a064a3 100755 --- a/scripts/update-changelog.sh +++ b/scripts/update-changelog.sh @@ -64,8 +64,6 @@ if [ ! -f "$changelog_path" ]; then git add "doc/changelogs/README.md" fi -printf '\n' >>"$current_changelog" - if grep --silent -E "^## \[$VERSION\]" "$changelog_path"; then echo "Replacing section in $changelog_path" sed -i -E "/^## \[$VERSION\]/,/^## /{ diff --git a/shard.yml b/shard.yml index 60451d4f329a..fc8fd61daacb 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: crystal -version: 1.21.0-dev +version: 1.21.0 authors: - Crystal Core Team diff --git a/src/SOURCE_DATE_EPOCH b/src/SOURCE_DATE_EPOCH new file mode 100644 index 000000000000..25a10868d44e --- /dev/null +++ b/src/SOURCE_DATE_EPOCH @@ -0,0 +1 @@ +1784160000 diff --git a/src/VERSION b/src/VERSION index c6ba48dc6375..3500250a4b05 100644 --- a/src/VERSION +++ b/src/VERSION @@ -1 +1 @@ -1.21.0-dev +1.21.0