-
Notifications
You must be signed in to change notification settings - Fork 71
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
Enable -Xsource:3 and reduce noise #663
Conversation
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.
LGTM, thanks!
@@ -11,7 +11,7 @@ inThisBuild(Seq( | |||
), | |||
scmInfo := Some(ScmInfo(url("https://github.com/lightbend/mima"), "scm:git:[email protected]:lightbend/mima.git")), | |||
dynverVTagPrefix := false, | |||
scalacOptions := Seq("-feature", "-deprecation", "-Xlint"), | |||
scalacOptions ++= Seq("-feature", "-Xsource:3", "-Xlint", "-Wconf:cat=deprecation&msg=Stream|JavaConverters:s"), |
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.
Does that deprecation warning keep the rest of the deprecations showing? Intuitively I would have thought there should be an "enable deprecations" option in addition to the "oh and silence these ones", which has me confused.
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.
-Xlint enables deprecation, and that was backported to 2.12 as well (as I did check).
Edit: you remind me that Scala 3 doesn't have -Xlint yet. I was about to restore the deprecation flag but spouse complained that I was coding at midnight and I hit PR button.
for (idx <- buf.createIndex) yield { | ||
buf.atIndex(idx) { | ||
val tag = buf.readByte() | ||
val len = buf.readNat() | ||
tag -> buf.bytes.slice(buf.readIndex, buf.readIndex + len) | ||
} | ||
} | ||
} | ||
).toIndexedSeq |
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.
What's going on here? Looks like there's an implicit conversion from Array to immutable IndexedSeq?? Wow.
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 is obvious in some contexts but not this one. There is not a good "just wrap my array" solution that cross-compiles.
I was about to tweak the loop to iterate once over buf to build an IndexedSeq but maybe that is overkill, and more of just an exercise one does at midnight when time seems momentarily infinite.
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.
❤️
References scala/scala-dev#769 (comment)