From af2c00c31fbe37e44998dfb1f29cbc2adf129778 Mon Sep 17 00:00:00 2001 From: George Dietrich Date: Mon, 6 Jan 2025 12:00:25 -0500 Subject: [PATCH 1/3] Handle trailing comma with multiple parameters on the same line (#15097) --- spec/compiler/formatter/formatter_spec.cr | 7 +++++++ src/compiler/crystal/tools/formatter.cr | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/compiler/formatter/formatter_spec.cr b/spec/compiler/formatter/formatter_spec.cr index 7c332aac3b0a..8a44355ec67f 100644 --- a/spec/compiler/formatter/formatter_spec.cr +++ b/spec/compiler/formatter/formatter_spec.cr @@ -918,6 +918,13 @@ describe Crystal::Formatter do end CRYSTAL + assert_format <<-CRYSTAL + def foo( + a, b, + ) + end + CRYSTAL + assert_format <<-CRYSTAL macro foo( a, diff --git a/src/compiler/crystal/tools/formatter.cr b/src/compiler/crystal/tools/formatter.cr index 796afe0730de..5cc74abdca92 100644 --- a/src/compiler/crystal/tools/formatter.cr +++ b/src/compiler/crystal/tools/formatter.cr @@ -1651,7 +1651,7 @@ module Crystal yield # Write "," before skipping spaces to prevent inserting comment between argument and comma. - write "," if has_more || (wrote_newline && @token.type.op_comma?) || (write_trailing_comma && flag?("def_trailing_comma")) + write "," if has_more || (wrote_newline && @token.type.op_comma?) || (write_trailing_comma && flag?("def_trailing_comma")) || (write_trailing_comma && @token.type.op_comma?) just_wrote_newline = skip_space if @token.type.newline? From d5a068869e980fdbb93a7bf8b78ab3eb450777be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Tue, 7 Jan 2025 18:27:02 +0100 Subject: [PATCH 2/3] Update XCode 15.3.0 in circleci (#15164) (#15327) --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5be7fd2cd388..54dcf9a1e34d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -285,7 +285,7 @@ jobs: dist_darwin: macos: - xcode: 13.4.1 + xcode: 15.3.0 shell: /bin/bash --login -eo pipefail steps: - restore_cache: From db6128a37172c77022a551512d21d70c4c13e006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 8 Jan 2025 11:26:26 +0100 Subject: [PATCH 3/3] Changelog for 1.14.1 (#15323) --- CHANGELOG.md | 20 ++++++++++++++++++++ shard.yml | 2 +- src/SOURCE_DATE_EPOCH | 2 +- src/VERSION | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76272bb1679b..5ca341937acc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [1.14.1] (2025-01-08) + +[1.14.1]: https://github.com/crystal-lang/crystal/releases/1.14.1 + +### Bugfixes + +#### tools + +- *(formatter)* Handle trailing comma with multiple parameters on the same line ([#15097], thanks @Blacksmoke16) + +[#15097]: https://github.com/crystal-lang/crystal/pull/15097 + +### Infrastructure + +- Changelog for 1.14.1 ([#15323], thanks @straight-shoota) +- *(ci)* Update XCode 15.3.0 in circleci ([#15327], thanks @straight-shoota) + +[#15323]: https://github.com/crystal-lang/crystal/pull/15323 +[#15327]: https://github.com/crystal-lang/crystal/pull/15327 + ## [1.14.0] (2024-10-09) [1.14.0]: https://github.com/crystal-lang/crystal/releases/1.14.0 diff --git a/shard.yml b/shard.yml index 2d43b601771e..9d28f9385c79 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: crystal -version: 1.14.0 +version: 1.14.1 authors: - Crystal Core Team diff --git a/src/SOURCE_DATE_EPOCH b/src/SOURCE_DATE_EPOCH index e20d25c81b56..ff7fc624aab5 100644 --- a/src/SOURCE_DATE_EPOCH +++ b/src/SOURCE_DATE_EPOCH @@ -1 +1 @@ -1728432000 +1736294400 diff --git a/src/VERSION b/src/VERSION index 850e742404bb..63e799cf451b 100644 --- a/src/VERSION +++ b/src/VERSION @@ -1 +1 @@ -1.14.0 +1.14.1