Skip to content

[Scala 3] drop deprecated Sam / SamCompanion#863

Open
halotukozak wants to merge 2 commits into
AVSystem:scala-3from
halotukozak:02-05-drop-sam
Open

[Scala 3] drop deprecated Sam / SamCompanion#863
halotukozak wants to merge 2 commits into
AVSystem:scala-3from
halotukozak:02-05-drop-sam

Conversation

@halotukozak

Copy link
Copy Markdown
Member

Summary

Drops deprecated misc.Sam / misc.SamCompanion instead of porting them to Scala 3.

  • Both are @deprecated since 2.28.0 with stdlib native SAM conversion as the documented replacement (val r: Runnable = () => doStuff() etc.).
  • Per project rule feedback_dont_port_deprecated.md: skip @deprecated APIs that have stdlib replacements.
  • Zero non-self references in core/, mongo/, hocon/ — clean delete.

Changes

  • Delete core/src/main/scala/com/avsystem/commons/misc/Sam.scala
  • Delete core/src/main/scala/com/avsystem/commons/misc/SamCompanion.scala
  • Delete corresponding core/src/test/scala/com/avsystem/commons/misc/SamTest.scala
  • MIGRATION.md §1 (Will Not Migrate): add entry for misc.Sam / misc.SamCompanion
  • MIGRATION.md §6 (Backlog): remove 3 rows (Sam.scala:9, SamCompanion.scala:11, SamCompanion.scala:19); Total tags: 155 → 153

Test plan

  • Both files deleted from working tree + git index
  • grep -rnE '\\b(Sam|SamCompanion)\\b' core/ mongo/ hocon/ returns zero non-self matches
  • No callers anywhere in core/, mongo/, hocon/ — pure deletion cannot break compile
  • CI green

@halotukozak halotukozak added this to the Scala 3 milestone Jun 1, 2026
@halotukozak halotukozak self-assigned this Jun 1, 2026
@halotukozak halotukozak marked this pull request as ready for review June 1, 2026 14:06
Copilot AI review requested due to automatic review settings June 1, 2026 14:06

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.

@halotukozak halotukozak changed the title [Scala 3] Phase 02-05: drop deprecated Sam / SamCompanion [Scala 3] drop-sam: drop deprecated Sam / SamCompanion Jun 1, 2026
@halotukozak halotukozak changed the title [Scala 3] drop-sam: drop deprecated Sam / SamCompanion [Scala 3] drop deprecated Sam / SamCompanion Jun 1, 2026
- Delete core/src/main/scala/com/avsystem/commons/misc/Sam.scala (@deprecated since 2.28.0)
- Delete core/src/main/scala/com/avsystem/commons/misc/SamCompanion.scala (@deprecated since 2.28.0)
- Delete corresponding test SamTest.scala
- Stdlib native SAM conversion (Scala 2.12+) supersedes; no Scala 3 port per
  project rule feedback_dont_port_deprecated.md
- Zero non-self references in core/, mongo/, hocon/
- Add §1 (Will Not Migrate) row for misc.Sam / misc.SamCompanion
- Remove §6 Backlog rows for Sam.scala:9, SamCompanion.scala:11,
  SamCompanion.scala:19
- Decrement Total tags: 155 -> 153
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