Re: Compiler plugin for warning suppression

Roman Janusz <[email protected]>
Newsgroups gmane.comp.lang.scala
Message-ID <[email protected]>
I'm really happy to see that Scala is open for that feature. From various 
discussions I kind of deduced that warning suppression is considered bad 
and that's why it isn't there.
I will try to dig a bit into the compiler and see what I can do, but it 
seems to me that native implementation would have to be done differently 
than what's currently in the plugin.

W dniu środa, 15 kwietnia 2015 00:24:43 UTC+2 użytkownik Adriaan Moors 
napisał:
>
> Awesome -- I'm really glad you picked this up! 
>
> We're actually in favor of making reporting configurable (that "won't fix" 
> ticket is a bit overloaded). I actually refactored quite a bit of code 
> <http://11bfa25e37> to enable this a while ago, but didn't get around to 
> implementing the user-facing part.
>
> If you're willing to do the work, I'd be happy to merge this plugin into 
> the standard 2.11.x compiler (albeit under a -Xreporter switch). Ideally, 
> we should SIP a reporting configuration mechanism for 2.12.
>
> thank you!
> adriaan
>
> On Tue, Apr 14, 2015 at 2:46 PM, Roman Janusz <[email protected] 
> <javascript:>> wrote:
>
>> Hello,
>>
>> Recently, inspired by the Towards a Safer Scala 
>> <http://confreaks.tv/videos/pnws2014-towards-a-safer-scala> talk from 
>> this year's ScalaDays, I wanted to try out the set of scalac options 
>> recommended by the speaker:
>>
>> scalacOptions ++= Seq(
>>   "-Xlint",
>>   "-Xdeprecation",  
>>   "-Xfatal-warnings"
>> )
>>
>> Unfortunately, almost immediately I ran into a show-stopper: Scala has no 
>> warning suppression similar to Java's @SuppressWarnings. I googled 
>> around and unpleasantly found out that requests for this feature have been 
>> rejected. See for example SI-1781 
>> <https://issues.scala-lang.org/browse/SI-1781>.
>>
>> But I realized that writing a compiler plugin which could fill that gap 
>> would not be that hard.
>>
>> So here it is: 
>>
>> *silencer <https://github.com/ghik/silencer>*It would be nice to have 
>> some feedback from you, Scala users, to see if there is any interest in 
>> maintaining such plugin. The current proof-of-concept implementation is 
>> really simple and small, but uses internal scalac API, so I guess there's 
>> no guarantee that it won't break with some new Scala version. That is also 
>> why I think some community support would help a lot.
>>
>> Cheers,
>> Roman
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "scala-language" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.