The GitHub Actions job "Pull Requests" on 
pekko.git/refactor/pekko-style-imports has failed.
Run started by GitHub user He-Pin (triggered by He-Pin).

Head commit for run:
5d90de2b1cc2b5750711bad536286edaf2db90e6 / 虎鸣 <[email protected]>
fix: add bare `import org.apache.pekko` where pekko.* imports are used at file 
scope

Motivation:
The previous refactor commit (3b0664a15a) failed CI on four jobs:
- Check headers (2 files had a leading blank line before the license header)
- Code is formatted (docs module, same root cause)
- Check / Code Style (scalafmt on docs module)
- Check / Tests (next) - Scala 3 compile failed in actor-typed-tests and
  remote-tests because `import pekko.*` references at file scope were not
  preceded by the bare `import org.apache.pekko` that brings the short
  package name into scope. The script had added the bare import only inside
  nested object/class blocks, which is invisible at file scope under
  Scala 3's stricter import resolution.

Modification:
- Strip the leading blank line in docs/src/test/scala/docs/persistence/
  PersistenceMultiDocSpec.scala and project/Paradox.scala so the license
  header starts on line 1 again.
- Add a file-scope `import org.apache.pekko` immediately after the package
  declaration (or at the top of the file for header-less files) in every
  Scala file that uses `import pekko.*` at file scope without an existing
  bare import at file scope. Same-pattern search across the whole
  repository found 27 additional files beyond the 3 that Scala 3 flagged
  in CI; all are fixed to prevent the same failure under Scala 2 and to
  keep the two import styles consistent.
- The nested `import org.apache.pekko` already present inside doc
  snippets (e.g. `object FaultToleranceDocSpec { ... }`) is preserved,
  since those blocks demonstrate the pattern inline.

Result:
- sbt +headerCheckAll passes.
- sbt scalafmtCheckAll and scalafmtSbtCheck pass.
- sbt ++ 3.3.7 actor-typed-tests / Test / compile and
  remote-tests / MultiJvm / compile both succeed.
- scalafmt --list --mode diff-ref=origin/main reports no files needing
  formatting.
- Change footprint: 30 files, +58/-2 (only the bare imports and two
  leading-blank-line removals; no unrelated formatting churn).

Tests:
- sbt +headerCheckAll -> success
- sbt scalafmtCheckAll; scalafmtSbtCheck -> success
- sbt ++ 3.3.7 actor-typed-tests / Test / compile -> success
- sbt ++ 3.3.7 remote-tests / MultiJvm / compile -> success
- scalafmt --list --mode diff-ref=origin/main -> no output

References:
Refs #3348

Report URL: https://github.com/apache/pekko/actions/runs/29390272098

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to