When running ghc with -Werror, EclipseFP can not find the error location

Help
2014-06-10
2014-06-10
  • Aleksey Nogin
    Aleksey Nogin
    2014-06-10

    Since GHC 7.2, ghc -Werror no longer stops on errors, but rather it prints

    <no location info>:
    Failing due to -Werror.

    at the end. It seems that currently EclipseFP does not know how to deal with that. Ideally, it needs to recognize the Werror message and then parse warnings as if they were errors.

     
    Last edit: Aleksey Nogin 2014-06-10
  • Aleksey Nogin
    Aleksey Nogin
    2014-06-10

    JP, thanks a lot. For the most part it have fixed my problem as I can now navigate to these warnings from the "Problems" pane and can see them marked as errors in the code editor.

    However a mostly cosmetic problem remains:

    • In "Problems Pane", there is still an extra "error" without a location (I am guessing due to final "Failing due to -Werror" message that does not have a location information associted with it).

    • In the "Error Log", there is an error:

      java.lang.NullPointerException
      at net.sf.eclipsefp.haskell.buildwrapper.types.Location.getMarkerProperties(Location.java:297)
      at net.sf.eclipsefp.haskell.buildwrapper.types.Note.addMarker(Note.java:124)
      at net.sf.eclipsefp.haskell.buildwrapper.types.Note.applyAsMarker(Note.java:100)
      at net.sf.eclipsefp.haskell.buildwrapper.types.Note.applyAsMarker(Note.java:75)
      at net.sf.eclipsefp.haskell.buildwrapper.BWFacade.parseNotes(BWFacade.java:1184)
      at net.sf.eclipsefp.haskell.buildwrapper.BWFacade.build1LongRunning(BWFacade.java:448)
      at net.sf.eclipsefp.haskell.buildwrapper.JobFacade$5.run(JobFacade.java:345)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

    P.S. To test it further, I have also added -ferror-spans GHC option. It resulted in a few more NullPointerException errors of the same kind.

     
  • JP Moresmau
    JP Moresmau
    2014-06-10

    These I've fixed also, but on the EclipseFP side of things. The error is still showing as a general error that the warnings caused an error, but the NPE is gone.