Closed tribbloid closed 4 months ago
A country can be a non-cooperative state in the global fight against money laundering.
I wish I had demanded compensation in options.
via https://github.com/scala/scala/pull/10093/files
Compile / scalacOptions += "-Wconf:cat=other-pure-statement&site=.*Macro.*:s",
Also try -Wconf:any:warning-verbose
(and -Wconf:help
):
➜ sandbox s -Wnonunit-statement -Wconf:any:warning-verbose
Welcome to Scala 2.13.12 (OpenJDK 64-Bit Server VM, Java 21.0.1).
Type in expressions for evaluation. Or try :help.
scala> def f = 1
def f: Int
scala> def g: Unit = f
^
warning: unused value of type Int (add `: Unit` to discard silently)
Applicable -Wconf / @nowarn filters for this warning: msg=<part of the message>, cat=other-pure-statement, site=g
I proposed verbose warnings for sbt-tpolecat because a) TIL and b) am I supposed to edit my build.sbt every time I need it? Ad hoc options are irritating (see re-run with -deprecation
).
By TIL
, I mean, "Oh yeah, right, pandemic brain fog, how does it go again?" Took me a couple of tries to get Scala 3 right.
oh sorry I wasn't aware of that, so GPT4 did speak a grain of truth
Creating plausible sounding answers is what the bot was designed to do
all they ever need is a draft paper to interact with and validate ideas, which is already part of Scala reflection API but even Copilot refused to use :-<
This is one of the few options that cannot be actively suppressed by
-Wconf
, GPT-4 even suggest a ridiculous category name for it.Can it be added into the list of categories under
-Wconf
?