Comments (18)
Same here. Reproduces both with Scala 2.13.10 and 3.2.2
from fastparse.
presumably this started with #281
from fastparse.
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.
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.
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.
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.
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.
@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.
Maybe it's specific to particular Scala versions? @soufianexmx @limansky @fanf what Scala versions are you guys seeing this in?
from fastparse.
2.13.10 for me I think.
from fastparse.
We first saw it in 2.13.10, and I checked it's still the case in 2.13.11
from fastparse.
@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.
Ah I think it must be the -Xlint
flag that I've been missing
from fastparse.
@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)
- Custom error message in Fail HOT 3
- Packrat parser example (or implementation) HOT 1
- Scala 3 port HOT 2
- .log to print success value
- scala3parse HOT 5
- CSS fails to parse when comment is at the end of a block HOT 1
- Mention fix for scala 2.13.7 HOT 4
- Capture success on failure if type is annotated or infered to `P[Unit]`
- SBT version conflict error when fastparse and os-lib are used together HOT 5
- Python argument typing is not supported in pythonparse HOT 1
- Warning about whitespace equality inside rep macro HOT 3
- Handle errors found in .map
- scala3 tracing failing to detect name of method HOT 1
- Failure `msg` reports incorrect line number on Windows HOT 3
- Python 2.7 support dropped from actions/setup-python HOT 1
- Easily produced stacktrace HOT 1
- easy stacktrace redux HOT 1
- Parser that succeeds when run in its home project, but fails when used through a dependency
- How to detect invalid utf-8 sequences in scala fastparse?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastparse.