Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always use UTF8 as the encoding for Kotlin code, regardless of the system/default charset #437

Closed
wants to merge 2 commits into from

Conversation

nreid260
Copy link
Contributor

Closes #373

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 18, 2024
@nreid260
Copy link
Contributor Author

nreid260 commented Jan 18, 2024

@cgrushko I'm not sure I've set up the Maven stuff right. In order to test the default charset is ignored, I want to run the tests using UTF16, which requires passing a JVM startup flag. I know the test is right otherwise because I can get it working in Bazel

Comment on lines 32 to 38
private val input: InputStream,
private val out: PrintStream,
private val err: PrintStream,
private val stdin: InputStream,
private val stdout: PrintStream,
private val stderr: PrintStream,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we leave this to separate PR? lots of noise in the diff...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@nreid260 nreid260 force-pushed the charset branch 5 times, most recently from a4de03e to 945a525 Compare January 19, 2024 20:35
@cgrushko
Copy link
Contributor

I feel this PR is doing multiple things; let's split into multiple PRs.

  1. Fix the exact issue at hand - please don't change stderr into stdout or vice verse, some tools rely on text going into one or the other.
  2. Add explicit UTF_8 everywhere - my vote is to avoid that. Kotlin uses utf8 by default. A test would be enough to catch problems. (same as we wouldn't explicitly use utf8 in golang).

@nreid260
Copy link
Contributor Author

  1. I've reverted the stdout writes, but it's weird. stdout now emits in two different charsets depending on the type of output.
  2. Being explicit is the main point of this PR. The encoding was implicit when the code was originally written, so humans didn't think about what the behaviour should be, which lead to bugs. I want to trigger that consideration next time.

@facebook-github-bot
Copy link
Contributor

@hick209 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@nreid260
Copy link
Contributor Author

Hey @hick209, are you now the best contact person for PRs?

@hick209
Copy link
Contributor

hick209 commented Mar 26, 2024

Maybe... 😅

I guess me @cgrushko, @davidtorosyan, @strulovich and @cortinico are the non-official-but-maybe-official-ish maintainers of ktfmt and it depends on who has bandwidth to tackle things.

I was trying to keep track and clean things up here, but then I went on paternity leave in September. Now that I'm back and was able to catch up, I'm trying to put some love into the project, at the very least managing GitHub issues and PRs.

You could also try to use the Slack channel we have tor conversations in case you don't want to do everything through GitHub as well, I guess only @davidtorosyan is not there.

@hick209
Copy link
Contributor

hick209 commented Mar 26, 2024

Locally I see a bunch of failing tests from the class com.facebook.ktfmt.cli.MainTest.
@nreid260, would you mind rebasing and taking a look if you repro it as well?

@nreid260
Copy link
Contributor Author

Locally I see a bunch of failing tests from the class com.facebook.ktfmt.cli.MainTest. @nreid260, would you mind rebasing and taking a look if you repro it as well?

It looks like only the plugin tests are failing, and that's been happening since f64da02

@hick209
Copy link
Contributor

hick209 commented Mar 26, 2024

Are you saying that it passes on your local tests?
I think it is related to the fact that we use buck to test it and not Maven, which means we are not using the plugin you set here

ktfmt/core/pom.xml

Lines 140 to 148 in b394fe3

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<!-- Tests that everything works when using an unusual default Charset. -->
<argLine>-Dfile.encoding=UTF-16</argLine>
</configuration>
</plugin>

This is what I get from running it locally from this PR and I've just rebased and checked that the base was clear

✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - --dry-run prints nothing when there are no changes needed (file) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - all files in args are processed, even if one of them has an error (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - Using '-' as the filename formats an InputStream (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - --dry-run prints 'stdin' and does not reformat code from stdin (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - Exit code is 0 when there are changes (file) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - dropbox-style is passed to formatter (file) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - formatting from stdin prints formatted code to stdout regardless of whether it was already formatted (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - --set-exit-if-changed and --dry-run changes nothing, prints filenames, and exits with 1 (file) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - Exits with 0 when there are changes (stdin) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - Exit code is 1 when there are changes and --set-exit-if-changed is set (file) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - --dry-run prints nothing when there are no changes needed (stdin) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - Parsing errors are reported (file) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - Exit code is 1 when there are changes and --set-exit-if-changed is set (stdin) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - expandArgsToFileNames - single arg which is not a file is not returned (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - dropbox-style is passed to formatter (stdin) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - file is modified if it is not formatted (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - Always use UTF8 encoding (file) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - expandArgsToFileNames - multiple directory args are resolved to their recursively contained kt files (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - expandArgsToFileNames - a dash is an error (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - file is not modified if it is already formatted (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - Parsing errors are reported (stdin-name) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - --set-exit-if-changed and --dry-run changes nothing, prints filenames, and exits with 1 (stdin) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - expandArgsToFileNames - resolves 'kt' and 'kts' filenames only (recursively) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - --dry-run prints filename and does not change file (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - --stdin-name can only be used with stdin (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - Parsing errors are reported (stdin) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - Always use UTF8 encoding (stdin, stdout) (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - expandArgsToFileNames - single file arg is used as is (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)
✗ Fail: fbsource//xplat/ktfmt/core/src/test/java/com/facebook/ktfmt/cli:cli - expandArgsToFileNames - single arg which is a directory is resolved to its recursively contained kt files (com.facebook.ktfmt.cli.MainTest) (0.1s)
expected: UTF-16
but was : UTF-8
at com.facebook.ktfmt.cli.MainTest.setUp(MainTest.kt:51)

@hick209
Copy link
Contributor

hick209 commented Mar 26, 2024

Would it be possible to rewrite the tests in a way that does not rely on that Maven plugin?

@nreid260
Copy link
Contributor Author

In Bazel I wrote the test with jvm_flags = ["-Dfile.encoding=UTF-16"],. Maven is not my primary build system.

@hick209
Copy link
Contributor

hick209 commented Mar 26, 2024

Oh, that's simple enough! Let try that with Buck here, then I'll just make the changes here before shipping it

@hick209
Copy link
Contributor

hick209 commented Mar 26, 2024

Yep, that did it! No action item needed from you them, I now just need the sign in from someone from inside to merge this in

@facebook-github-bot
Copy link
Contributor

@hick209 merged this pull request in c0e7db9.

@nreid260 nreid260 deleted the charset branch April 23, 2024 06:10
facebook-github-bot pushed a commit that referenced this pull request Apr 23, 2024
Summary:
Changelog:
* Migrated to Google Java Format 1.22.0 (#440 and #452)
* Added support for RangUntil (`..<`) operator (#433)
* Trailing space issue on lambda blocks (#426)
* Fix empty enum parse error (#425)
* Preserving empty enums semicolons (#434)
* Always use UTF8 (#437)
* IntelliJI DEA plugin update (#420)
* Managing trailing commas in enums (#449)
* Badges on README (#446 and #453)
* Emit parsing error for calls with multiple trailing lambdas (#457)
* Removed duplicated line in editorconfig file (#456)

Reviewed By: cortinico

Differential Revision: D56467599

fbshipit-source-id: 10e90a34118267e36db80940f6a4e43aef89fbd3
github-merge-queue bot pushed a commit to slackhq/slack-gradle-plugin that referenced this pull request Apr 27, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [com.facebook:ktfmt](https://togithub.com/facebookincubator/ktfmt) |
dependencies | minor | `0.47` -> `0.49` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>facebookincubator/ktfmt (com.facebook:ktfmt)</summary>

### [`v0.49`](https://togithub.com/facebook/ktfmt/releases/tag/v0.49)

#### Changelog

- Stop emitting multiple trailing commas in enum entry lists with
multiline items
([facebook/ktfmt#458)
– [@&#8203;nreid260](https://togithub.com/nreid260)

**Full Changelog**:
facebook/ktfmt@v0.48...v0.49

### [`v0.48`](https://togithub.com/facebook/ktfmt/releases/tag/v0.48):
0.48

Changelog:

- Migrated to Google Java Format 1.22.0
([facebook/ktfmt#440,
[facebook/ktfmt#452)
– [@&#8203;j-bahr](https://togithub.com/j-bahr),
[@&#8203;nreid260](https://togithub.com/nreid260)
- Added support for RangUntil (`..<`) operator
([facebook/ktfmt#433)
– [@&#8203;ArchdukeTim](https://togithub.com/ArchdukeTim)
- Trailing space issue on lambda blocks
([facebook/ktfmt#426)
– [@&#8203;fredyw](https://togithub.com/fredyw),
[@&#8203;hick209](https://togithub.com/hick209)
- Fix empty enum parse error
([facebook/ktfmt#425)
– [@&#8203;fredyw](https://togithub.com/fredyw)
- Preserving empty enums semicolons
([facebook/ktfmt#434)
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Always use UTF8
([facebook/ktfmt#437)
– [@&#8203;nreid260](https://togithub.com/nreid260)
- IntelliJI DEA plugin update
([facebook/ktfmt#420)
– [@&#8203;greyhairredbear](https://togithub.com/greyhairredbear)
- Managing trailing commas in enums
([facebook/ktfmt#449)
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Badges on README
([facebook/ktfmt#448,
[facebook/ktfmt#453)
–
[@&#8203;JavierSegoviaCordoba](https://togithub.com/JavierSegoviaCordoba),
[@&#8203;hick209](https://togithub.com/hick209)
- Emit parsing error for calls with multiple trailing lambdas
([facebook/ktfmt#457)
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Removed duplicated line in editorconfig file
([facebook/ktfmt#456)
– [@&#8203;sabufung30](https://togithub.com/sabufung30)

Big thanks to all the contributors!

**Full Changelog**:
facebook/ktfmt@v0.47...v0.48

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: Zac Sweers <pandanomic@gmail.com>
github-merge-queue bot pushed a commit to slackhq/circuit that referenced this pull request Apr 28, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [com.facebook:ktfmt](https://togithub.com/facebook/ktfmt) |
dependencies | minor | `0.47` -> `0.49` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>facebook/ktfmt (com.facebook:ktfmt)</summary>

### [`v0.49`](https://togithub.com/facebook/ktfmt/releases/tag/v0.49)

#### Changelog

- Stop emitting multiple trailing commas in enum entry lists with
multiline items
([facebook/ktfmt#458)
– [@&#8203;nreid260](https://togithub.com/nreid260)

**Full Changelog**:
facebook/ktfmt@v0.48...v0.49

### [`v0.48`](https://togithub.com/facebook/ktfmt/releases/tag/v0.48):
0.48

Changelog:

- Migrated to Google Java Format 1.22.0
([facebook/ktfmt#440,
[facebook/ktfmt#452)
– [@&#8203;j-bahr](https://togithub.com/j-bahr),
[@&#8203;nreid260](https://togithub.com/nreid260)
- Added support for RangUntil (`..<`) operator
([facebook/ktfmt#433)
– [@&#8203;ArchdukeTim](https://togithub.com/ArchdukeTim)
- Trailing space issue on lambda blocks
([facebook/ktfmt#426)
– [@&#8203;fredyw](https://togithub.com/fredyw),
[@&#8203;hick209](https://togithub.com/hick209)
- Fix empty enum parse error
([facebook/ktfmt#425)
– [@&#8203;fredyw](https://togithub.com/fredyw)
- Preserving empty enums semicolons
([facebook/ktfmt#434)
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Always use UTF8
([facebook/ktfmt#437)
– [@&#8203;nreid260](https://togithub.com/nreid260)
- IntelliJI DEA plugin update
([facebook/ktfmt#420)
– [@&#8203;greyhairredbear](https://togithub.com/greyhairredbear)
- Managing trailing commas in enums
([facebook/ktfmt#449)
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Badges on README
([facebook/ktfmt#448,
[facebook/ktfmt#453)
–
[@&#8203;JavierSegoviaCordoba](https://togithub.com/JavierSegoviaCordoba),
[@&#8203;hick209](https://togithub.com/hick209)
- Emit parsing error for calls with multiple trailing lambdas
([facebook/ktfmt#457)
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Removed duplicated line in editorconfig file
([facebook/ktfmt#456)
– [@&#8203;sabufung30](https://togithub.com/sabufung30)

Big thanks to all the contributors!

**Full Changelog**:
facebook/ktfmt@v0.47...v0.48

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjYuMCIsInVwZGF0ZWRJblZlciI6IjM3LjMyNi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: Zac Sweers <pandanomic@gmail.com>
ZacSweers added a commit to ZacSweers/CatchUp that referenced this pull request Apr 29, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.facebook:ktfmt](https://togithub.com/facebook/ktfmt) | `0.47` ->
`0.49` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.facebook:ktfmt/0.49?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.facebook:ktfmt/0.49?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.facebook:ktfmt/0.47/0.49?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.facebook:ktfmt/0.47/0.49?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>facebook/ktfmt (com.facebook:ktfmt)</summary>

### [`v0.49`](https://togithub.com/facebook/ktfmt/releases/tag/v0.49)

#### Changelog

- Stop emitting multiple trailing commas in enum entry lists with
multiline items
([facebook/ktfmt#458)
– [@&#8203;nreid260](https://togithub.com/nreid260)

**Full Changelog**:
facebook/ktfmt@v0.48...v0.49

### [`v0.48`](https://togithub.com/facebook/ktfmt/releases/tag/v0.48):
0.48

Changelog:

- Migrated to Google Java Format 1.22.0
([facebook/ktfmt#440,
[facebook/ktfmt#452)
– [@&#8203;j-bahr](https://togithub.com/j-bahr),
[@&#8203;nreid260](https://togithub.com/nreid260)
- Added support for RangUntil (`..<`) operator
([facebook/ktfmt#433)
– [@&#8203;ArchdukeTim](https://togithub.com/ArchdukeTim)
- Trailing space issue on lambda blocks
([facebook/ktfmt#426)
– [@&#8203;fredyw](https://togithub.com/fredyw),
[@&#8203;hick209](https://togithub.com/hick209)
- Fix empty enum parse error
([facebook/ktfmt#425)
– [@&#8203;fredyw](https://togithub.com/fredyw)
- Preserving empty enums semicolons
([facebook/ktfmt#434)
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Always use UTF8
([facebook/ktfmt#437)
– [@&#8203;nreid260](https://togithub.com/nreid260)
- IntelliJI DEA plugin update
([facebook/ktfmt#420)
– [@&#8203;greyhairredbear](https://togithub.com/greyhairredbear)
- Managing trailing commas in enums
([facebook/ktfmt#449)
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Badges on README
([facebook/ktfmt#448,
[facebook/ktfmt#453)
–
[@&#8203;JavierSegoviaCordoba](https://togithub.com/JavierSegoviaCordoba),
[@&#8203;hick209](https://togithub.com/hick209)
- Emit parsing error for calls with multiple trailing lambdas
([facebook/ktfmt#457)
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Removed duplicated line in editorconfig file
([facebook/ktfmt#456)
– [@&#8203;sabufung30](https://togithub.com/sabufung30)

Big thanks to all the contributors!

**Full Changelog**:
facebook/ktfmt@v0.47...v0.48

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ZacSweers/CatchUp).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Zac Sweers <pandanomic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can we always assume UTF8?
4 participants