typelevel / cats

Lightweight, modular, and extensible library for functional programming.
https://typelevel.org/cats/
Other
5.26k stars 1.21k forks source link

Fix/suppress warnings in kernel and kernel-laws #4614

Closed satorg closed 5 months ago

satorg commented 5 months ago

Supersedes #4187.

This PR fixes or suppresses compiler warnings in the kernel and kernel-laws modules.

satorg commented 5 months ago

Note: not all the warnings have been fixed. There are a bunch of warnings like these below that still remain:

1 |import scala.{specialized => sp}
  |              ^^^^^^^^^^^^^^^^^
  |              unused import

Such warnings get emitted by Scala3 only and the renamed @sp annotations are actually in use. So I believe it is a kind of a bug in Scala3, I filed the issue here: scala/scala3#20536

We can fix them by removing those import renames and using @specialized directly. But I would like to hear from the Scala3 team first.

satorg commented 5 months ago

Removed the [CLEANUP] prefix from the title. I feel the behind-the-scenes label is just enough for it.

som-snytt commented 5 months ago

I believe it is a kind of a bug

and not even the most exotic species.

Thanks for the ticket, I seized the opportunity and submitted a fix for the unused import.

I wonder if they would accept a SIP to add 2-letter aliases for all the standard annotations.