Skip to content

Warning: "Calls to parameterless method compose will be easy to mistake for calls to overloads which have a single implicit parameter list" #4783

@saeltz

Description

@saeltz

Seen in this open-source project that uses Cats. See for example this test run. We're treating warnings as errors in the compiler.

[errpr] Calls to parameterless method compose will be easy to mistake for calls to overloads which have a single implicit parameter list:
[error]   def compose[G[_]](implicit evidence$1: cats.Invariant[G]): cats.Invariant[[α]F[G[α]]]
[error]   def compose[G[_]](implicit evidence$1: cats.Functor[G]): cats.Functor[[α]F[G[α]]]
[error]   def compose[G[_]](implicit evidence$1: cats.Apply[G]): cats.Apply[[α]F[G[α]]]
[error]   def compose[G[_]](implicit evidence$1: cats.Applicative[G]): cats.Applicative[[α]F[G[α]]]
[error]     new Monad[ScynamoDecoder] with SemigroupK[ScynamoDecoder] {

Scala recommends to not have parameterless methods with an implicit parameter list, as seen in Applicative.

The only way for us is to not treat warnings as errors or silence this specific warning. Are there any plans to change this? It's probably a breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions