question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using scala-collection-compat together with silencer-plugin is broken

See original GitHub issue

When 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:closed
  • Created 3 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
ghikcommented, Feb 1, 2021
0reactions
ghikcommented, Feb 3, 2021

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found