Giter Site home page Giter Site logo

Comments (18)

limansky avatar limansky commented on July 17, 2024

Same here. Reproduces both with Scala 2.13.10 and 3.2.2

from fastparse.

SethTisue avatar SethTisue commented on July 17, 2024

presumably this started with #281

from fastparse.

SethTisue avatar SethTisue commented on July 17, 2024

we get compilation error

well, presumably just a warning, that you have yourself promoted to an error with -Werror?

if someone is looking for a workaround, I think "@nowarn annotation does not suppress any warning" is itself a warning that can be suppressed with @nowarn?

from fastparse.

fanf avatar fanf commented on July 17, 2024

I tried to add @nowarn("msg=@nowarn annotation does not suppress any warnings") (or generic @nowarn) at the class and method using macro level, and it does not suppress the warning (and add a new @nowarn annotation does not suppress any warnings)

from fastparse.

fanf avatar fanf commented on July 17, 2024

I wasn't able to find an other way than disabling useless nowarn warning with -Wconf:cat=unused-nowarn:s (see https://www.scala-lang.org/api/current/scala/annotation/nowarn.html).
I would prefer that scalac don't report nowarn inside macro, because as the user of the macro, I can't do anything about them.

from fastparse.

fanf avatar fanf commented on July 17, 2024

So, one can selectively silent the problematic warning on specific file but keep them for other files with combined filter.
For ex:
-Wconf:cat=unused-nowarn&src=com/normation/utils/Version.scala:s,cat=unused-nowarn&src=com/normation/rudder/services/policies/InterpolatedValueCompiler.scala:s

Will silent the @nowarn annotation does not suppress any warnings warnings in com/normation/utils/Version.scala and com/normation/rudder/services/policies/InterpolatedValueCompiler.scala, but keep them in other files.
More info with scala -Wconf:help

This is good enought for the time being for me.

from fastparse.

lihaoyi avatar lihaoyi commented on July 17, 2024

Somehow I'm not able to reproduce this inside my test suite. Would appreciate any help if someone wants to look into this inside the Fastparse repo and come up with a repro

from fastparse.

kitbellew avatar kitbellew commented on July 17, 2024

@lihaoyi I don't know if this is related, but here's the error I got for 2.13.1 (and only that version): https://github.com/scalameta/scalameta/actions/runs/5503580335/jobs/10028930479?pr=3246

from fastparse.

lihaoyi avatar lihaoyi commented on July 17, 2024

Maybe it's specific to particular Scala versions? @soufianexmx @limansky @fanf what Scala versions are you guys seeing this in?

from fastparse.

Bathtor avatar Bathtor commented on July 17, 2024

2.13.10 for me I think.

from fastparse.

fanf avatar fanf commented on July 17, 2024

We first saw it in 2.13.10, and I checked it's still the case in 2.13.11

from fastparse.

limansky avatar limansky commented on July 17, 2024

@lihaoyi I've tried with both 2.13.10 and 2.13.11. It looks like you have to have -Xlint in your scalacOptions.

from fastparse.

lihaoyi avatar lihaoyi commented on July 17, 2024

Ah I think it must be the -Xlint flag that I've been missing

from fastparse.

limansky avatar limansky commented on July 17, 2024

@lihaoyi
Hi, I've checked 3.0.2 and the issue is still there. Please let me know if you need minimal example to demonstrate the problem.

from fastparse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.