-
Notifications
You must be signed in to change notification settings - Fork 80
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
Conversation
@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 |
private val input: InputStream, | ||
private val out: PrintStream, | ||
private val err: PrintStream, | ||
private val stdin: InputStream, | ||
private val stdout: PrintStream, | ||
private val stderr: PrintStream, |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
a4de03e
to
945a525
Compare
I feel this PR is doing multiple things; let's split into multiple PRs.
|
…stem/default charset Closes facebook#373
|
@hick209 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Hey @hick209, are you now the best contact person for PRs? |
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. |
Locally I see a bunch of failing tests from the class |
Are you saying that it passes on your local tests? Lines 140 to 148 in b394fe3
This is what I get from running it locally from this PR and I've just rebased and checked that the base was clear
|
Would it be possible to rewrite the tests in a way that does not rely on that Maven plugin? |
In Bazel I wrote the test with |
Oh, that's simple enough! Let try that with Buck here, then I'll just make the changes here before shipping it |
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 |
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
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 ([https://github.com/facebook/ktfmt/pull/458](https://togithub.com/facebook/ktfmt/pull/458)) – [@​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 ([https://github.com/facebook/ktfmt/pull/440](https://togithub.com/facebook/ktfmt/pull/440), [https://github.com/facebook/ktfmt/pull/452](https://togithub.com/facebook/ktfmt/pull/452)) – [@​j-bahr](https://togithub.com/j-bahr), [@​nreid260](https://togithub.com/nreid260) - Added support for RangUntil (`..<`) operator ([https://github.com/facebook/ktfmt/pull/433](https://togithub.com/facebook/ktfmt/pull/433)) – [@​ArchdukeTim](https://togithub.com/ArchdukeTim) - Trailing space issue on lambda blocks ([https://github.com/facebook/ktfmt/pull/426](https://togithub.com/facebook/ktfmt/pull/426)) – [@​fredyw](https://togithub.com/fredyw), [@​hick209](https://togithub.com/hick209) - Fix empty enum parse error ([https://github.com/facebook/ktfmt/pull/425](https://togithub.com/facebook/ktfmt/pull/425)) – [@​fredyw](https://togithub.com/fredyw) - Preserving empty enums semicolons ([https://github.com/facebook/ktfmt/pull/434](https://togithub.com/facebook/ktfmt/pull/434)) – [@​nreid260](https://togithub.com/nreid260) - Always use UTF8 ([https://github.com/facebook/ktfmt/pull/437](https://togithub.com/facebook/ktfmt/pull/437)) – [@​nreid260](https://togithub.com/nreid260) - IntelliJI DEA plugin update ([https://github.com/facebook/ktfmt/pull/420](https://togithub.com/facebook/ktfmt/pull/420)) – [@​greyhairredbear](https://togithub.com/greyhairredbear) - Managing trailing commas in enums ([https://github.com/facebook/ktfmt/pull/449](https://togithub.com/facebook/ktfmt/pull/449)) – [@​nreid260](https://togithub.com/nreid260) - Badges on README ([https://github.com/facebook/ktfmt/pull/448](https://togithub.com/facebook/ktfmt/pull/448), [https://github.com/facebook/ktfmt/pull/453](https://togithub.com/facebook/ktfmt/pull/453)) – [@​JavierSegoviaCordoba](https://togithub.com/JavierSegoviaCordoba), [@​hick209](https://togithub.com/hick209) - Emit parsing error for calls with multiple trailing lambdas ([https://github.com/facebook/ktfmt/pull/457](https://togithub.com/facebook/ktfmt/pull/457)) – [@​nreid260](https://togithub.com/nreid260) - Removed duplicated line in editorconfig file ([https://github.com/facebook/ktfmt/pull/456](https://togithub.com/facebook/ktfmt/pull/456)) – [@​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 <[email protected]>
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 ([https://github.com/facebook/ktfmt/pull/458](https://togithub.com/facebook/ktfmt/pull/458)) – [@​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 ([https://github.com/facebook/ktfmt/pull/440](https://togithub.com/facebook/ktfmt/pull/440), [https://github.com/facebook/ktfmt/pull/452](https://togithub.com/facebook/ktfmt/pull/452)) – [@​j-bahr](https://togithub.com/j-bahr), [@​nreid260](https://togithub.com/nreid260) - Added support for RangUntil (`..<`) operator ([https://github.com/facebook/ktfmt/pull/433](https://togithub.com/facebook/ktfmt/pull/433)) – [@​ArchdukeTim](https://togithub.com/ArchdukeTim) - Trailing space issue on lambda blocks ([https://github.com/facebook/ktfmt/pull/426](https://togithub.com/facebook/ktfmt/pull/426)) – [@​fredyw](https://togithub.com/fredyw), [@​hick209](https://togithub.com/hick209) - Fix empty enum parse error ([https://github.com/facebook/ktfmt/pull/425](https://togithub.com/facebook/ktfmt/pull/425)) – [@​fredyw](https://togithub.com/fredyw) - Preserving empty enums semicolons ([https://github.com/facebook/ktfmt/pull/434](https://togithub.com/facebook/ktfmt/pull/434)) – [@​nreid260](https://togithub.com/nreid260) - Always use UTF8 ([https://github.com/facebook/ktfmt/pull/437](https://togithub.com/facebook/ktfmt/pull/437)) – [@​nreid260](https://togithub.com/nreid260) - IntelliJI DEA plugin update ([https://github.com/facebook/ktfmt/pull/420](https://togithub.com/facebook/ktfmt/pull/420)) – [@​greyhairredbear](https://togithub.com/greyhairredbear) - Managing trailing commas in enums ([https://github.com/facebook/ktfmt/pull/449](https://togithub.com/facebook/ktfmt/pull/449)) – [@​nreid260](https://togithub.com/nreid260) - Badges on README ([https://github.com/facebook/ktfmt/pull/448](https://togithub.com/facebook/ktfmt/pull/448), [https://github.com/facebook/ktfmt/pull/453](https://togithub.com/facebook/ktfmt/pull/453)) – [@​JavierSegoviaCordoba](https://togithub.com/JavierSegoviaCordoba), [@​hick209](https://togithub.com/hick209) - Emit parsing error for calls with multiple trailing lambdas ([https://github.com/facebook/ktfmt/pull/457](https://togithub.com/facebook/ktfmt/pull/457)) – [@​nreid260](https://togithub.com/nreid260) - Removed duplicated line in editorconfig file ([https://github.com/facebook/ktfmt/pull/456](https://togithub.com/facebook/ktfmt/pull/456)) – [@​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 <[email protected]>
[![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 ([https://github.com/facebook/ktfmt/pull/458](https://togithub.com/facebook/ktfmt/pull/458)) – [@​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 ([https://github.com/facebook/ktfmt/pull/440](https://togithub.com/facebook/ktfmt/pull/440), [https://github.com/facebook/ktfmt/pull/452](https://togithub.com/facebook/ktfmt/pull/452)) – [@​j-bahr](https://togithub.com/j-bahr), [@​nreid260](https://togithub.com/nreid260) - Added support for RangUntil (`..<`) operator ([https://github.com/facebook/ktfmt/pull/433](https://togithub.com/facebook/ktfmt/pull/433)) – [@​ArchdukeTim](https://togithub.com/ArchdukeTim) - Trailing space issue on lambda blocks ([https://github.com/facebook/ktfmt/pull/426](https://togithub.com/facebook/ktfmt/pull/426)) – [@​fredyw](https://togithub.com/fredyw), [@​hick209](https://togithub.com/hick209) - Fix empty enum parse error ([https://github.com/facebook/ktfmt/pull/425](https://togithub.com/facebook/ktfmt/pull/425)) – [@​fredyw](https://togithub.com/fredyw) - Preserving empty enums semicolons ([https://github.com/facebook/ktfmt/pull/434](https://togithub.com/facebook/ktfmt/pull/434)) – [@​nreid260](https://togithub.com/nreid260) - Always use UTF8 ([https://github.com/facebook/ktfmt/pull/437](https://togithub.com/facebook/ktfmt/pull/437)) – [@​nreid260](https://togithub.com/nreid260) - IntelliJI DEA plugin update ([https://github.com/facebook/ktfmt/pull/420](https://togithub.com/facebook/ktfmt/pull/420)) – [@​greyhairredbear](https://togithub.com/greyhairredbear) - Managing trailing commas in enums ([https://github.com/facebook/ktfmt/pull/449](https://togithub.com/facebook/ktfmt/pull/449)) – [@​nreid260](https://togithub.com/nreid260) - Badges on README ([https://github.com/facebook/ktfmt/pull/448](https://togithub.com/facebook/ktfmt/pull/448), [https://github.com/facebook/ktfmt/pull/453](https://togithub.com/facebook/ktfmt/pull/453)) – [@​JavierSegoviaCordoba](https://togithub.com/JavierSegoviaCordoba), [@​hick209](https://togithub.com/hick209) - Emit parsing error for calls with multiple trailing lambdas ([https://github.com/facebook/ktfmt/pull/457](https://togithub.com/facebook/ktfmt/pull/457)) – [@​nreid260](https://togithub.com/nreid260) - Removed duplicated line in editorconfig file ([https://github.com/facebook/ktfmt/pull/456](https://togithub.com/facebook/ktfmt/pull/456)) – [@​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 <[email protected]>
Closes #373