Show all warnings and errors

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Show all warnings and errors

Duncan Mak
Hello all,

Happy new year, happy holidays!

I've been porting some code to Kawa lately, but I still have a lot of
work left to do.

Right now, when I load in the code, Kawa prints out a list of "warning
- no declaration seen for XXX", and it ends with:

note - skipped 0 errors, 164 warnings, 0 notes

Is there a switch to force it to print out all the warnings? Right
now, i'm getting only the top 20.

Thanks!

--
Duncan.
Reply | Threaded
Open this post in threaded view
|

Re: Show all warnings and errors

Per Bothner
On 12/31/18 3:18 PM, Duncan Mak wrote:

> I've been porting some code to Kawa lately, but I still have a lot of
> work left to do.

Cool.

> Right now, when I load in the code, Kawa prints out a list of "warning
> - no declaration seen for XXX", and it ends with:
>
> note - skipped 0 errors, 164 warnings, 0 notes
>
> Is there a switch to force it to print out all the warnings? Right
> now, i'm getting only the top 20.

There is now :-)

--max-errors=NNN

--
        --Per Bothner
[hidden email]   http://per.bothner.com/
Reply | Threaded
Open this post in threaded view
|

Re: Show all warnings and errors

Duncan Mak
Very cool, thanks!

Are you planning on making a 3.1 release soon?

On Mon, Dec 31, 2018 at 9:12 PM Per Bothner <[hidden email]> wrote:

>
> On 12/31/18 3:18 PM, Duncan Mak wrote:
>
> > I've been porting some code to Kawa lately, but I still have a lot of
> > work left to do.
>
> Cool.
>
> > Right now, when I load in the code, Kawa prints out a list of "warning
> > - no declaration seen for XXX", and it ends with:
> >
> > note - skipped 0 errors, 164 warnings, 0 notes
> >
> > Is there a switch to force it to print out all the warnings? Right
> > now, i'm getting only the top 20.
>
> There is now :-)
>
> --max-errors=NNN
>
> --
>         --Per Bothner
> [hidden email]   http://per.bothner.com/



--
Duncan.
Reply | Threaded
Open this post in threaded view
|

Re: Show all warnings and errors

Per Bothner
On 12/31/18 6:32 PM, Duncan Mak wrote:

> Are you planning on making a 3.1 release soon?

I hadn't planned it (I've mostly been focusing on DomTerm these days),
but I guess there are enough changes (and it's been long enough) that a
3.1 release would make sense.


--
        --Per Bothner
[hidden email]   http://per.bothner.com/
Reply | Threaded
Open this post in threaded view
|

Re: Show all warnings and errors

Duncan Mak
In reply to this post by Per Bothner
I tried out the --max-error=NNN option and it doesn't seem to have
changed how the output comes out.

Here's what I see:
https://gist.github.com/duncanmak/38f451c9f26ba0000be38d0bd304313b

On Mon, Dec 31, 2018 at 9:12 PM Per Bothner <[hidden email]> wrote:

>
> On 12/31/18 3:18 PM, Duncan Mak wrote:
>
> > I've been porting some code to Kawa lately, but I still have a lot of
> > work left to do.
>
> Cool.
>
> > Right now, when I load in the code, Kawa prints out a list of "warning
> > - no declaration seen for XXX", and it ends with:
> >
> > note - skipped 0 errors, 164 warnings, 0 notes
> >
> > Is there a switch to force it to print out all the warnings? Right
> > now, i'm getting only the top 20.
>
> There is now :-)
>
> --max-errors=NNN
>
> --
>         --Per Bothner
> [hidden email]   http://per.bothner.com/



--
Duncan.
Reply | Threaded
Open this post in threaded view
|

Re: Show all warnings and errors

Per Bothner
On 1/1/19 12:47 PM, Duncan Mak wrote:
> I tried out the --max-error=NNN option and it doesn't seem to have
> changed how the output comes out.
>
> Here's what I see:
> https://gist.github.com/duncanmak/38f451c9f26ba0000be38d0bd304313b

I'm guessing the --max-errors flag isn't being passed down to your test-runner?

You could try a adding:

     new Error("skipping tests max:"+gnu.expr.Compilation.maxErrors()).printStackTrace();

in the place in SourcesMessages.java where the "skipped " message is printed.

I assume this is all in the same kawa run on a single JVM instance?  If not you have to pass
the -max-errors flag to the inferior kawa.
--
        --Per Bothner
[hidden email]   http://per.bothner.com/
Reply | Threaded
Open this post in threaded view
|

Re: Show all warnings and errors

Duncan Mak
Hmm, my test runner is just an scm file that loads in a few files.

It first loads in a file with some R7RS module definitions, and then I
load in some test files.

Each of my test files look something like this:

https://gist.github.com/duncanmak/03147dad1cd1697ca9ac3c2a7ee5ca8f

I'm using SRFI 64 (ha! i just realized that's one of your SRFIs!),
maybe I need to write more code to explicitly instantiate a test
runner?

On Tue, Jan 1, 2019 at 3:58 PM Per Bothner <[hidden email]> wrote:

>
> On 1/1/19 12:47 PM, Duncan Mak wrote:
> > I tried out the --max-error=NNN option and it doesn't seem to have
> > changed how the output comes out.
> >
> > Here's what I see:
> > https://gist.github.com/duncanmak/38f451c9f26ba0000be38d0bd304313b
>
> I'm guessing the --max-errors flag isn't being passed down to your test-runner?
>
> You could try a adding:
>
>      new Error("skipping tests max:"+gnu.expr.Compilation.maxErrors()).printStackTrace();
>
> in the place in SourcesMessages.java where the "skipped " message is printed.
>
> I assume this is all in the same kawa run on a single JVM instance?  If not you have to pass
> the -max-errors flag to the inferior kawa.
> --
>         --Per Bothner
> [hidden email]   http://per.bothner.com/



--
Duncan.
Reply | Threaded
Open this post in threaded view
|

Re: Show all warnings and errors

Per Bothner
On 1/1/19 1:15 PM, Duncan Mak wrote:

> Hmm, my test runner is just an scm file that loads in a few files.
>
> It first loads in a file with some R7RS module definitions, and then I
> load in some test files.
>
> Each of my test files look something like this:
>
> https://gist.github.com/duncanmak/03147dad1cd1697ca9ac3c2a7ee5ca8f
>
> I'm using SRFI 64 (ha! i just realized that's one of your SRFIs!),
> maybe I need to write more code to explicitly instantiate a test
> runner?

Probably not.   First try what I suggested in my previous message,
to see where printAll is being called.  That could be a place where
we should (but don't) call Compilation.maxErrors().

--
        --Per Bothner
[hidden email]   http://per.bothner.com/
Reply | Threaded
Open this post in threaded view
|

Re: Show all warnings and errors

Duncan Mak
It looks like this:
https://gist.github.com/duncanmak/38f451c9f26ba0000be38d0bd304313b#file-more-changes

My patch looks like this:
https://gist.github.com/duncanmak/38f451c9f26ba0000be38d0bd304313b#file-sourcemessages-patch

On Tue, Jan 1, 2019 at 4:24 PM Per Bothner <[hidden email]> wrote:

>
> On 1/1/19 1:15 PM, Duncan Mak wrote:
> > Hmm, my test runner is just an scm file that loads in a few files.
> >
> > It first loads in a file with some R7RS module definitions, and then I
> > load in some test files.
> >
> > Each of my test files look something like this:
> >
> > https://gist.github.com/duncanmak/03147dad1cd1697ca9ac3c2a7ee5ca8f
> >
> > I'm using SRFI 64 (ha! i just realized that's one of your SRFIs!),
> > maybe I need to write more code to explicitly instantiate a test
> > runner?
>
> Probably not.   First try what I suggested in my previous message,
> to see where printAll is being called.  That could be a place where
> we should (but don't) call Compilation.maxErrors().
>
> --
>         --Per Bothner
> [hidden email]   http://per.bothner.com/



--
Duncan.
Reply | Threaded
Open this post in threaded view
|

Re: Show all warnings and errors

Per Bothner
On 1/1/19 1:30 PM, Duncan Mak wrote:
> It looks like this:
> https://gist.github.com/duncanmak/38f451c9f26ba0000be38d0bd304313b#file-more-changes

Ah - as I suspected, I missed a call to Compilation.maxERrors.
Try the attached patch.

--
        --Per Bothner
[hidden email]   http://per.bothner.com/

ModExp.patch (627 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Show all warnings and errors

Duncan Mak
Woohoo, that worked!

On Tue, Jan 1, 2019 at 4:42 PM Per Bothner <[hidden email]> wrote:

>
> On 1/1/19 1:30 PM, Duncan Mak wrote:
> > It looks like this:
> > https://gist.github.com/duncanmak/38f451c9f26ba0000be38d0bd304313b#file-more-changes
>
> Ah - as I suspected, I missed a call to Compilation.maxERrors.
> Try the attached patch.
>
> --
>         --Per Bothner
> [hidden email]   http://per.bothner.com/



--
Duncan.