groovy
  1. groovy
  2. GROOVY-5063

Cannot set "-Werror" javac option when using Groovyc ant task.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.5, 2.0-beta-2
    • Component/s: Compiler
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When trying to configure the joint compiler to treat java compile warnings as errors I tried to set the following javac args:

      • -Xlint:all
      • -Werror

      I found that -Xlint:all worked, but -Werror gave me an error saying that it was an unrecognised option. After some digging it seems that the joint compiler prefixes all options bound for javac with -F, which means the lint option was transformed to "-FXlint:all" but the -Werror option didn't get this same transformation. If I manually added the "-F" making it "-FWerror" everything worked as it should.

      I went looking for whereabouts this prefixing gets applied to try and determine why it wasn't happening to "-Werror" but couldn't find it.

        Activity

        Hide
        Luke Daley added a comment -

        I guess there's not many other options than just amending the list as new args are found.

        Show
        Luke Daley added a comment - I guess there's not many other options than just amending the list as new args are found.
        Hide
        Roshan Dawrani added a comment -

        +1 to Luke's suggestion. Otherwise it is un-necessarily stuck holding even the options that we know about.

        Show
        Roshan Dawrani added a comment - +1 to Luke's suggestion. Otherwise it is un-necessarily stuck holding even the options that we know about.
        Hide
        blackdrag blackdrag added a comment -

        ok then.. Roshan, you want to take the issue?

        Show
        blackdrag blackdrag added a comment - ok then.. Roshan, you want to take the issue?
        Hide
        Roshan Dawrani added a comment -

        Done. In joint compilation, -W options are now passed to javac like -X options.

        Show
        Roshan Dawrani added a comment - Done. In joint compilation, -W options are now passed to javac like -X options.
        Hide
        Luke Daley added a comment - - edited

        Nice one Roshan, thanks.

        Show
        Luke Daley added a comment - - edited Nice one Roshan, thanks.

          People

          • Assignee:
            Roshan Dawrani
            Reporter:
            Luke Daley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: