com-lihaoyi / fastparse

Writing Fast Parsers Fast in Scala
https://com-lihaoyi.github.io/fastparse
MIT License
1.09k stars 164 forks source link

Squelch useless warnings on `.rep` #281

Closed lihaoyi closed 1 year ago

lihaoyi commented 1 year ago

Fixes https://github.com/com-lihaoyi/fastparse/issues/279

I added the appropriate @nowarn annotation in the macro.

Tested by enabling -Xfatal-warnings. For now I only do this in Scala 2.13, as Scala 2.11/2.12 have no @nowarn (I had to leave a stub for them) and Scala 3.x (a) doesn't have the same warning and (b) somehow has a bunch of other is more specialized than the right hand side warnings that @nowarn doesn't seem to squelch

luigimarano commented 1 year ago

Unfortunately I think this change has been causing problems with my build. I now get the following error message:

@nowarn annotation does not suppress any warnings scala version 2.13.10

Given that it didn't happen with v3.0.0 I'm just going to stick with that version for now

gipeshka commented 1 year ago

Can confirm that update to 3.0.1 fails with the same message for me.

SethTisue commented 1 year ago

ticket on the "@nowarn annotation does not suppress any warnings" problem is https://github.com/com-lihaoyi/fastparse/issues/285