[
https://issues.apache.org/jira/browse/DAFFODIL-2145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454850#comment-17454850
]
Mike Beckerle commented on DAFFODIL-2145:
-----------------------------------------
git hash 178867d806d57bace29a3966d9fd6d6fda3fa235
adds warning flags
"-Ywarn-infer-any", "-Ywarn-inaccessible", "-Ywarn-unused-import"
Note we cannot use -Ywarn-nullary-unit, as it interferes with the ability to
create def foo: Unit and override it as any of def, val, or lazy val. Scala is
also changing relative to this with Scala 2.13 and 3.0 which will eventually
require call sites to have () if the definition has (). Today in Scala 2.12 if
the def has () parameter list, the call site can either have, or not have, the
().
I believe all the other warnings are dependent on features in Scala 2.13 (the
unused annotation), or are fundamentally not workable for us, so I am resolving
this ticket. There are other Jira tickets about upgrading the code base to use
scala 2.13.
> Add scalac warnings
> -------------------
>
> Key: DAFFODIL-2145
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2145
> Project: Daffodil
> Issue Type: Bug
> Components: Infrastructure
> Reporter: Steve Lawrence
> Assignee: Mike Beckerle
> Priority: Major
> Labels: beginner
>
> DAFFODIL-1652 removed the follwoing scalac flag warnings when adding suport
> for scala 2.12 because the build flags changed:
> * -Ybackend:GenBCode
> * -Ydead-code
> * -Yinline
> * -Yinline-warnings
> * -Yopt:inline-global
> * -Yopt-warnings
> * -Ywarn-inaccessible
> * -Ywarn-infer-any
> * -Ywarn-nullary-override
> * -Ywarn-unused
> * -Ywarn-unused-import
> In some of these cases scala 2.12 just changed the name of the warning (e.g.
> -Ywarn-unused-import became -Ywarn-unused:imports). We should find the
> equivalent 2.12 warnings if they exist and add conditional logic to apply the
> correct flags based on scala version a scala version.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)