Repository navigation
Conversation
Motivation: Provide the same semantic import organization as the Pekko core build. Modification: Add self-contained Scalafix 0.14.10 configuration, session-enabled compiler diagnostics and sortImports commands to all 14 examples with Scala sources, including the five MultiJvm configurations. Remove the competing Scalafmt rewrite and document usage. Result: Copied examples can organize imports without repository-root tooling. Tests: - FSM sample: ordinary compiler options inspected; sortImports twice in one session; scalafixAll --check OrganizeImports; test passed. - Temporary fixture: unused UUID import removed, used ListBuffer retained; fixture removed. - headerCreateAll passed using isolated sbt-header tooling and the existing repository header template. - git diff --check passed. - Cluster-java sample: MultiJvm / scalafix inspection, sortImports, and MultiJvm / scalafix --check OrganizeImports passed (two Scala sources compiled and rewritten). - Remaining sample builds, docs-gen and native scalafmt were not run. References: Refs apache/pekko#3342
He-Pin
force-pushed
the
build/scalafix-organize-imports
branch
from
November 12, 2026 17:19
1efd221 to
bef67fa
Compare
He-Pin
added a commit
to He-Pin/pekko-samples
that referenced
this pull request
Nov 12, 2026
Motivation: Provide consistent, self-contained formatting across the independent sbt samples. Modification: Configure core Scalafmt and Javafmt versions and style, preserve Scala language modes, include MultiJvm sources, document commands, and apply formatter output. Result: All 17 sbt builds expose working formatting/check commands. Maven-only samples and runtime dependencies remain unchanged. Tests: All 17 applyCodeStyle/checkCodeStyle workflows passed on JDK 17. Cluster Java compile, MultiJvm compile and test passed. Representative Paradox generation passed with a process-local Java 17 compatibility flag. Snippet identities and normalized Java tokens checked; git diff --check passed. Other full test suites and CI were not run. References: Refs apache#206; core formatter configuration at 6049edf9.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Bring the semantic
OrganizeImportsworkflow from apache/pekko#3342 to the standalone samples.Modification
.scalafix.conf, andsbt sortImportsto all 14 builds containing Scala sources, including the two Java samples with Scala multi-JVM tests. Register Scalafix for all five MultiJvm configurations.SortImportsrewrite and document the command in each sample.Result
Each applicable example supports organizing its Scala main/test/multi-JVM imports even when copied out of this repository. Java-only samples are unchanged.
Tests
sortImportstwice in one sbt session,scalafixAll --check OrganizeImports, andtestsuccessfully.inspect MultiJvm / scalafix,sortImports, andMultiJvm / scalafix --check OrganizeImportspassed, including compilation and rewriting of the two Scala multi-JVM test sources. Multi-node tests were not executed.UUIDimport is removed while a usedListBufferimport is retained. The fixture was removed afterwards.headerCreateAllusing the repository's existing header text.git diff --checkpassed.References
Refs apache/pekko#3342.