Skip to content

[Scala 3] delete Implicits object (covered by summon[T])#867

Open
halotukozak wants to merge 4 commits into
AVSystem:scala-3from
halotukozak:03-05-delete-implicits-object
Open

[Scala 3] delete Implicits object (covered by summon[T])#867
halotukozak wants to merge 4 commits into
AVSystem:scala-3from
halotukozak:03-05-delete-implicits-object

Conversation

@halotukozak

Copy link
Copy Markdown
Contributor

Deletes com.avsystem.commons.misc.Implicits object outright (was Scala 2 macro helpers infer / inferNonMacro, both Phase-1 stubbed). Scala 3 scala.compiletime.summon[T] + @implicitNotFound on using params replace the use case. 0 callers in tree.

ImplicitNotFound sealed trait + companion — separate concern (custom error-message machinery) — extracted to its own file com/avsystem/commons/misc/ImplicitNotFound.scala. Same package; no caller-visible change.

Scope

  • DELETE: core/src/main/scala/com/avsystem/commons/misc/Implicits.scala
  • CREATE: core/src/main/scala/com/avsystem/commons/misc/ImplicitNotFound.scala (extracted verbatim)
  • MIGRATION.md §1 entry

Acceptance

  • git ls-files .../Implicits.scala | wc -l → 0
  • git ls-files .../ImplicitNotFound.scala | wc -l → 1
  • git grep -nE '\bImplicits\.' -- '*.scala' → 0 hits
  • sbt compile + Test/compile + scalafmtCheckAll green

User directive 2026-06-01: outright delete, do NOT deprecate (overrides fork commit 50272b26 fix(scala-3): Implicits.infer real impl).

Slice: 3.5 of Phase 3 (Scala 3 syntax modernization)
Merge order: Independent — can land any time (no overlap with 3.1/3.2/3.3/3.4)
Depends on: none
Base branch: upstream/scala-3

Separates the still-useful ImplicitNotFound sealed trait + companion from
the to-be-deleted Implicits object. Pure extraction — semantics unchanged.
Implicits.infer / inferNonMacro were Scala 2 macro helpers. Scala 3
summon[T] + @implicitNotFound on using params replace the use case.
0 callers in tree (git grep verified). ImplicitNotFound moved to its own
file in prior commit.

User directive 2026-06-01: outright delete, do NOT deprecate (overrides
fork commit 50272b2).
Records removal of com.avsystem.commons.misc.Implicits in §1; points
downstream consumers to scala.compiletime.summon[T]. Notes that
ImplicitNotFound sealed trait is preserved in its own file (same package,
no caller-visible change).
@halotukozak halotukozak added this to the Scala 3 milestone Jun 1, 2026
ImplicitNotFound was a Scala 2 hack where the @implicitNotFound message
was itself resolved via implicit search, enabling composed error messages
(#{...} interpolation). No Scala 3 equivalent — @implicitNotFound is
native but message composition via implicit search is not.

Delete the sealed trait and its diagnostic-only dependents:
MetadataCompanion.Lazy.notFound, BoundedMetadataCompanion.Lazy.notFound,
AsRaw.notFoundForTry, AsReal.notFoundForTry. These only customized
compiler error messages — functionality unaffected. ImplicitNotFoundTest
deleted. Documented in MIGRATION.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@halotukozak halotukozak marked this pull request as ready for review June 1, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant