Warning: "Calls to parameterless method compose will be easy to mistake for calls to overloads which have a single implicit parameter list"
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 5.5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 5
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the warning and the Applicative-related parameterless methods shown in the report, then review the linked Scynamo example to understand the failing compilation context. The issue does not name a Cats file or test; done would require an agreed resolution for the warning, with the resulting API behavior and warnings verified against the reported case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100