New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
output errors as JSON #5589
Comments
From nxadm@apt-get.beHi, I having a go at adding syntax checking support to vim using the syntastic plugin (https://github.com/scrooloose/syntastic). My plugin, syntastic-perl6 (https://github.com/nxadm/syntastic-perl6), adds Perl 6 support and so far it seems to work. Syntastic upstream accepted my PR adding support to Perl 6 (so regular users would get Perl 6 support out of the box), but the changes live for now in a test branch. I agree with upstream that error parsing for languages that don't spit out structured data is fragile (Perl 6 is not alone) and thus needs tesing. And the error parsing is fragile indeed (e.g. ignoring new types of errors) as it's based on vimscript regular expressions of the rather irregular "perl6 -c" error output. As jnthn suggested on irc, maybe an additional JSON error output would be great solution for this. This would make error parsing for external tooling very easy and stable. And good tooling is one of the things that Perl 6 needs at the moment. So, consider this as a post-it note in case you run out of bugs. I am looking now at the rakudo internals, but I doubt I know it enough to implement it myself. Regards, C. (El_Che) |
From @zoffixznetOn Thu Aug 18 06:08:06 2016, nxadm wrote:
I rather not add anything specific like that and dream bigger (or smaller, depending on how you look at it). It should be possible to expose to module-space the point where all of our Exception objects So then I could write a module Exceptions::JSON that will convert received Exception objects to JSON and have all of the exceptions dumped as JSON. Or write Exceptions::Rollbar and have the exceptions be shipped off to rollbar.com. Or write Exceptions::Rust and output Rust-like exceptions with expressive pointers to code. Or write Exceptions::Russian and have all of the errors be translated to Russian language. There are far many more desired options for exceptions output. We should make it possible for module-space to implement all of those options rather than add a specific one in core. |
The RT System itself - Status changed from 'new' to 'open' |
From nxadm@apt-get.beHi Zoffix, You indeed have a point. More abstraction is always the right answer :). Some generic framework exposing the necessary information is a very elegant 1. For something as basic and fundamental as simple syntax checking it's Regards, C. On Fri, Aug 19, 2016 at 2:37 PM, Zoffix Znet via RT <
|
From @zoffixznetThis has been implemented using RAKUDO_EXCEPTIONS_HANDLER env var, with JSON included with Rakudo. On Fri Aug 19 20:27:03 2016, nxadm wrote:
|
@zoffixznet - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#128983 (status was 'resolved')
Searchable as RT128983$
The text was updated successfully, but these errors were encountered: