-
-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nowarn fix for Whitespace
macro
#310
Conversation
168fb1e
to
5d53ff6
Compare
@fanf Would you like to give this a try? I mean locally. |
The PR looks good to me, once you get CI green I can merge it and close out the bounty |
@lihaoyi Would you like give it another round of run, thanks. |
745f2f6
to
e271ffe
Compare
@lihaoyi The CI is happy now:) Note: in Scala 2.12, I added two mina filters where the nowarn is the scala nowarn now. |
@He-Pin can we leave the original |
@lihaoyi OK, I think that would be better. |
@lihaoyi I have updated and removed the added mima. |
@@ -0,0 +1,61 @@ | |||
package scalaparse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@He-Pin is this change intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because the api in nsc is different in Scala 2.12 and newer version of scala 2.13.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I have to separate this test for Scala 2.12 and Scala 2.13, maybe I can split it into a dedicated PR. but as the commits is one by one, maybe that's fine too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
related link: scala/scala#10406
|
||
override def incompleteInputError(msg: String, actions: List[CodeAction]): Unit = { | ||
fail = true | ||
super.incompleteInputError(msg, actions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new api has a actions
|
||
override def syntaxError(offset: global.syntaxAnalyzer.Offset, msg: String, actions: List[CodeAction]): Unit = { | ||
fail = true | ||
super.syntaxError(offset, msg, actions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so does syntaxError
method. otherwise, it will report override nothing
error.
@He-Pin not sure if I'm missing something, but where is the new version of ScalacParser used in the PR? |
@lihaoyi Because I updated the Scala 2.13.x to 2.13.14 in this PR, and with scala/scala#10406 , the additional |
val scalaJS1 = "1.12.0" | ||
val scalaNative04 = "0.5.0" | ||
val scala3 = "3.3.3" | ||
val scala213 = "2.13.14" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's now 2.13.14, and the nsc is updated scala/scala#10406
@lihaoyi cc
@He-Pin got it, looks good! Can send me details at [email protected] and I'll close out the bounty |
thanks, I just implement a jsonpath (https://www.rfc-editor.org/rfc/rfc9535#name-collected-abnf-grammars) with Fastparse at work, it works great. |
Motivation:
refs: #285
with reading: https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html
Modification:
-Xlint:unused
to reproduce the problem3
is enabled.@nowarn
annotation directly.WhiteSpace
macroResult:
I think the issue is fixed now, and as I'm using Fastparse within a Java project, so I was not knowing this issue.
All tests passed locally.