Skip to content

[Scala 3] restore SimpleClassName.materialize#862

Open
halotukozak wants to merge 3 commits into
AVSystem:scala-3from
halotukozak:02-04-class-name
Open

[Scala 3] restore SimpleClassName.materialize#862
halotukozak wants to merge 3 commits into
AVSystem:scala-3from
halotukozak:02-04-class-name

Conversation

@halotukozak

Copy link
Copy Markdown
Contributor

Restores SimpleClassName.materialize[T] via Scala 3 inline implicit def + TypeRepr.of[T].dealias.typeSymbol.name.stripSuffix("$"). Macro impl colocated as a private def in SimpleClassName.scala.

Changes

  • SimpleClassName.materialize now resolves at compile-time (was ??? stub).
  • Adds SimpleClassNameTest (3 smoke tests: String, List[Int], nested case class).
  • Removes 1 backlog row from MIGRATION.md (§6 backlog tag count 155→154 net of one TODO removed; net of pre-existing base off-by-one, total now 155).

Verify

  • sbt 'commons-core/compile ;commons-core/Test/compile ;scalafmtCheckAll ;scalafmtSbtCheck' green.
  • sbt 'commons-core/testOnly *SimpleClassNameTest': 3/3 pass.

@halotukozak halotukozak added this to the Scala 3 milestone Jun 1, 2026
@halotukozak halotukozak changed the title [Scala 3] Phase 02-04: restore SimpleClassName.materialize [Scala 3] class-name: restore SimpleClassName.materialize Jun 1, 2026
@halotukozak halotukozak changed the title [Scala 3] class-name: restore SimpleClassName.materialize [Scala 3] restore SimpleClassName.materialize Jun 1, 2026
@halotukozak halotukozak marked this pull request as ready for review June 1, 2026 14:18
Copilot AI review requested due to automatic review settings June 1, 2026 14:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- Replace ??? stub with inline implicit def + materializeImpl quoted macro
- Cribbed from fork master MiscMacros.materializeSimpleClassName: TypeRepr.of[T].dealias.typeSymbol.name.stripSuffix("$")
- Macro impl colocated in SimpleClassName.scala (private def materializeImpl)
Covers: String, List[Int], nested case class. All 3 tests pass.
- Drop SimpleClassName.scala:8 row from Backlog section
- Total tags 155 (base was inconsistently 155 vs actual 156; now 155 in both)
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.

2 participants