Using scala-collection-compat together with silencer-plugin is broken
See original GitHub issueWhen the scala-collection-compat
library is used together with the silencer-plugin
compiler plugin, you get errors like this:
[error] /home/runner/work/izumi-reflect/izumi-reflect/izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/collections/IzMappings.scala:26:4: expected literal string as @nowarn annotation argument
[error] @nowarn("msg=deprecated")
[error] ^
Workaround is to drop silencer-plugin
, but that might not be the desired solution.
It’s worth to note that scala-collection-compat
defines its own nowarn
annotation: https://github.com/scala/scala-collection-compat/blob/master/compat/src/main/scala-2.11_2.12/scala/annotation/nowarn.scala
Related: https://github.com/zio/izumi-reflect/pull/121 https://github.com/scala/scala-collection-compat/issues/413#issuecomment-767967951 https://github.com/scala/scala-collection-compat/pull/417
/cc @SethTisue @ekrich
continuation of https://github.com/scala/scala-collection-compat/issues/418
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Using scala-collection-compat together with silencer-plugin is ...
When you use scala-collection-compat library together with the silencer-plugin compiler plugin, you get errors like this: [error] ...
Read more >Silencer: Scala compiler plugin for warning suppression
If you're still cross compiling for 2.11 then this plugin can be used in conjunction with scala-collection-compat in order to suppress warnings in...
Read more >scala/scala - Gitter
In 2.12, views are supposed to be more powerful, but are occasionally broken, so it's generally better not to use them unless you're...
Read more >What's new in Gradle 5.0
We've broken down the major improvements in recent releases into the ... Today, the plugins for Android, Kotlin, C++, Scala, and many other...
Read more >My mixed Scala/Java Maven project doesn't compile
The problem arises when Java code is trying to call Scala code in the same package. Of course, I have the standard layout:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sideeffffect there should be 1.7.2 soon, see https://github.com/ghik/silencer/actions
@rdesgroppes Since you’re bound by Scala version used by sbt, I’m assuming you are developing an sbt plugin? I’m not familiar with sbt plugin development but in principle you should be able to force 2.12.13 to be used in your plugin. This should work because minor Scala versions are supposed to be both backwards and forward compatible.