Skip to content

deprecate or remove implicit in package object for Scala 3 #274

@xuwei-k

Description

@xuwei-k

Scala 2 summon package object implicit values without imports. but Scala 3 does not.

This is confused 😇

Welcome to Scala 2.13.10 (OpenJDK 64-Bit Server VM, Java 11.0.18).
Type in expressions for evaluation. Or try :help.

scala> implicitly[com.github.tototoshi.csv.CSVFormat]
val res0: com.github.tototoshi.csv.CSVFormat = com.github.tototoshi.csv.package$$anon$1@47dabb27
Welcome to Scala 3.2.2 (11.0.18, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
                                                                                                                                                                                                                                                           
scala> implicitly[com.github.tototoshi.csv.CSVFormat]
-- Error: ----------------------------------------------------------------------
1 |implicitly[com.github.tototoshi.csv.CSVFormat]
  |                                              ^
  |No given instance of type com.github.tototoshi.csv.CSVFormat was found for parameter e of method implicitly in object Predef
  |
  |The following import might fix the problem:
  |
  |  import com.github.tototoshi.csv.defaultCSVFormat

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions