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

KAFKA-12862: Update Scala fmt library and apply fixes #10784

Merged
merged 3 commits into from Aug 9, 2021

Conversation

jlprat
Copy link
Contributor

@jlprat jlprat commented May 28, 2021

Updates the scala fmt to the latest stable version
Applies all the style fixes (all source code changes are done by scala
fmt)
Removes setting about dangling parentheses as true is already the
default

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@jlprat
Copy link
Contributor Author

jlprat commented May 28, 2021

Sorry to almost always point at you @ijuma If you would have time, could you take a look at this one? Maybe it's worth change the scala fmt config instead of leaving these deafults.

@ijuma
Copy link
Contributor

ijuma commented May 28, 2021

Looks like the formatting changes are on the streams scala module. cc @mjsax @vvcephei @guozhangwang

@jlprat
Copy link
Contributor Author

jlprat commented May 28, 2021

Noted, I will ping them when touching that area.

@jlprat
Copy link
Contributor Author

jlprat commented Jun 3, 2021

Any chance any of you has time to check this? cc @mjsax @vvcephei @guozhangwang

Thanks!

@jlprat
Copy link
Contributor Author

jlprat commented Jun 7, 2021

@cadonna maybe you can look at this one if you have some time. Thanks!

Updates the scala fmt to the latest stable version
Applies all the style fixes (all source code changes are done by scala
fmt)
Removes setting about dangling parentheses as `true` is already the
default
@jlprat jlprat force-pushed the KAFKA-12862-update-scalafmt-and-fix branch from 93fd287 to b43ef18 Compare June 7, 2021 10:47
@jlprat
Copy link
Contributor Author

jlprat commented Jun 7, 2021

Rebased to resolve conflicts

Copy link
Contributor

@vvcephei vvcephei left a comment

Choose a reason for hiding this comment

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

Thanks, @jlprat !

@vvcephei
Copy link
Contributor

It looks like there's a new conflict. Hopefully, we can merge soon after you fix the conflict this time.

By the way, can you let me know the command you used to apply the format? I've been accustomed to using Spotless Scala in this repo; I didn't know about Scala fmt until just now.

@jlprat
Copy link
Contributor Author

jlprat commented Jul 27, 2021

Thanks for the review @vvcephei !
Actually, the spotless task executes the scalafmt in this gradle config, this means running ./gradlew spotlessScalaCheck will analyze all Scala files and complain about violations in the code. Then running ./gradlew :spotlessScalaApply will fix any formatting discrepancies.
Alternatively, one can configure IntelliJ or VS Code to run scalafmt and it will pick the existing configuration in the kafka repo.

@jlprat
Copy link
Contributor Author

jlprat commented Jul 27, 2021

As new code has been added I need to re-run scalafmt for those. Pushing those changes in a second.

@jlprat
Copy link
Contributor Author

jlprat commented Jul 27, 2021

Something went wrong during the build, can someone re-trigger the build in Jenkins?

Failure was:

[2021-07-27T14:23:53.802Z] FAILURE: Build failed with an exception.
[2021-07-27T14:23:53.802Z]
[2021-07-27T14:23:53.802Z] * What went wrong:
[2021-07-27T14:23:53.802Z] Execution failed for task ':storage:unitTest'.
[2021-07-27T14:23:53.802Z] > Process 'Gradle Test Executor 68' finished with non-zero exit value 1
[2021-07-27T14:23:53.802Z] This problem might be caused by incorrect test process configuration.
[2021-07-27T14:23:53.802Z] Please refer to the test execution section in the User Manual at https://docs.gradle.org/7.1.1/userguide/java_testing.html#sec:test_execution

@jlprat
Copy link
Contributor Author

jlprat commented Jul 28, 2021

Hi @vvcephei feel free to review the tiny commit to fix the code that has been committed since the PR was created.
Also test failure seems unrelated

@jlprat jlprat closed this Aug 3, 2021
@jlprat jlprat reopened this Aug 3, 2021
@jlprat
Copy link
Contributor Author

jlprat commented Aug 3, 2021

I just closed and opened the PR to re-trigger Jenkins build.

@jlprat
Copy link
Contributor Author

jlprat commented Aug 4, 2021

Pinging @vvcephei
Would you be able to merger this before more commits get in the way and we need another rebase?
Thanks a ton!

@cadonna cadonna merged commit 83f0ae3 into apache:trunk Aug 9, 2021
@jlprat jlprat deleted the KAFKA-12862-update-scalafmt-and-fix branch August 9, 2021 10:13
@jlprat
Copy link
Contributor Author

jlprat commented Aug 9, 2021

Thanks @cadonna !

xdgrulez pushed a commit to xdgrulez/kafka that referenced this pull request Dec 22, 2021
Updates the scala fmt to the latest stable version.
Applies all the style fixes (all source code changes are done by scala 
fmt).
Removes setting about dangling parentheses as `true` is already the
default.

Reviewer: John Roesler <john@confluent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants