He-Pin opened a new pull request, #3348:
URL: https://github.com/apache/pekko/pull/3348
### Motivation
The Pekko codebase uses two import styles: `import org.apache.pekko.X` for
the bare package import and `import pekko.X` for the shorter form. However,
many files still use the fully qualified `import org.apache.pekko.X.Y.Z` style
for individual imports instead of the shorter `import pekko.X.Y.Z` style.
### Modification
A one-time transformation was applied across all 411 Scala source files:
- `import org.apache.pekko.X.Y.Z` → `import pekko.X.Y.Z`
- `import org.apache.pekko` is added as a bare package import at the top of
each affected file (if not already present)
This rewrites 885 individual import statements. Auto-generated files in
`target/` directories are excluded.
The transformation was performed with a text-based script that:
1. Replaces `org.apache.pekko.` prefix with `pekko.` in import statements
2. Adds `import org.apache.pekko` after the package declaration for files
that need it
3. Preserves grouped imports (`import org.apache.pekko.actor.{ A, B }` →
`import pekko.actor.{ A, B }`)
4. Preserves wildcard imports (`import org.apache.pekko.actor._` → `import
pekko.actor._`)
Scalafmt was run after the transformation to normalize formatting.
### Result
All Scala source files now use the shorter `pekko.X` import style
consistently. The `import org.apache.pekko` bare import is present in all files
that use `pekko.*` imports.
### Tests
Not run - import refactoring only, no behavioral changes.
### References
None - import style improvement
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]