ANN: FancyDiagnostics package for better syntax errors

I tagged this a few days ago, but forgot to announce, so here goes:

The FancyDiagnostics package is now available on a julia 0.6 near you. It uses CSTParser to replace the built-in julia parser and provide nicer error messages:

30 PM

The new parser is activated as soon as the FancyDiagnostics package is loaded,
no further steps necessary. Coverage of syntax errors is not as comprehensive as the base julia parser right now, but should improve as CSTParser gets better. Let me know if you run into any trouble.

I’d also like to acknowledge the Sloan foundation for funding part of this work.


I’m using Windows, but get the following error:
(Sorry about the screen shot, error seems to break copy & paste of text)

Am I doing something wrong?


I’m seeing this:

julia> using FancyDiagnostics

julia> omitting /Users/malmaud/.julia/v0.6/AbstractTrees/src/AbstractTrees.jl due to parsing error near line 16omitting /Users/malmaud/.julia/v0.6/CSTParser/src/CSTParser.jl due to parsing error near line 6omitting /Users/malmaud/.julia/v0.6/FancyDiagnostics/src/display.jl due to parsing error near line 5

julia> REPL:15:20 REPL:4:14 REPL:5:27 ERRORERRORERROR: Unexpected )
                   : ^Unexpected operator

global debug = true
             : ^Unexpected )

diag_code(D::Diagnostic{C}) where {C} = C

Revise + Fancydiagnostics apparently doesn’t work together.

I’ve found the Revise incompatibility.

Will release a new version with the fix.