You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2026/07/14 11:28:17 UTC
[PR] refactor: convert org.apache.pekko.X imports to pekko.X style [pekko]
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] refactor: convert org.apache.pekko.X imports to pekko.X style [pekko]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #3348:
URL: https://github.com/apache/pekko/pull/3348#issuecomment-5009922780
@pjfanning It's fixed now
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] refactor: convert org.apache.pekko.X imports to pekko.X style [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #3348:
URL: https://github.com/apache/pekko/pull/3348#discussion_r3608098047
##########
docs/src/test/scala/docs/stream/FlowStreamRefsDocSpec.scala:
##########
@@ -13,11 +13,13 @@
package docs.stream
+import org.apache.pekko
Review Comment:
can we keep this with the pekko imports?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] refactor: convert org.apache.pekko.X imports to pekko.X style [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #3348:
URL: https://github.com/apache/pekko/pull/3348#discussion_r3608097124
##########
docs/src/test/scala/docs/stream/GraphStageDocSpec.scala:
##########
@@ -13,12 +13,14 @@
package docs.stream
-import org.apache.pekko.NotUsed
-import org.apache.pekko.stream.scaladsl.{ Flow, Keep, Sink, Source }
-import org.apache.pekko.stream.stage._
-import org.apache.pekko.stream._
-import org.apache.pekko.stream.testkit.{ TestPublisher, TestSubscriber }
-import org.apache.pekko.testkit.{ PekkoSpec, TestLatch }
+import org.apache.pekko
+
Review Comment:
still quite a few gaps like this
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] refactor: convert org.apache.pekko.X imports to pekko.X style [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #3348:
URL: https://github.com/apache/pekko/pull/3348#discussion_r3590441643
##########
actor-tests/src/test/scala/org/apache/pekko/actor/FSMTimingSpec.scala:
##########
@@ -13,7 +13,9 @@
package org.apache.pekko.actor
-import org.apache.pekko.testkit._
+import org.apache.pekko
+
Review Comment:
there are still quite a few of these imports where there is a line separating the `import org.apache.pekko` from the other pekko imports
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] refactor: convert org.apache.pekko.X imports to pekko.X style [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #3348:
URL: https://github.com/apache/pekko/pull/3348#discussion_r3578575063
##########
actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/ControlledExecutor.scala:
##########
@@ -13,11 +13,13 @@
package org.apache.pekko.actor.testkit.typed.internal
+import org.apache.pekko
Review Comment:
can we keep this with this pekko imports?
##########
actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/ControlledExecutor.scala:
##########
@@ -13,11 +13,13 @@
package org.apache.pekko.actor.testkit.typed.internal
+import org.apache.pekko
Review Comment:
can we keep this with this with the pekko imports?
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] refactor: convert org.apache.pekko.X imports to pekko.X style [pekko]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #3348:
URL: https://github.com/apache/pekko/pull/3348
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org