Is there a way to specify -feature to the fsc Ant task?

191 Views Asked by At

I've been compiling my scala code through the fsc Ant task and keep getting the following warning:

warning: there were 3 feature warning(s); re-run with -feature for details
two warnings found

I understand that passing -feature to scalac will print a detailed report about the warnings I'm getting and, more often than not, good suggestions as to how they should be fixed.

I can't however for the life of me work out how to pass this argument to the fsc task. Is it not supported (yet)? Am I missing something obvious that will make me regret asking this question later?

1

There are 1 best solutions below

0
On

Please try below, according to scala doc, fsc ant task should share same attributes with scalac

<scalac srcdir="${scala.src.dir}"
    destdir="${build.dir}"
    classpathref="build.classpath"
    addparams="-feature">
    <include name="**/*.scala"   />
</scalac>