public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* Show all warnings and errors
@ 2018-12-31 23:18 Duncan Mak
  2019-01-01  2:12 ` Per Bothner
  0 siblings, 1 reply; 15+ messages in thread
From: Duncan Mak @ 2018-12-31 23:18 UTC (permalink / raw)
  To: kawa mailing list

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.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2018-12-31 23:18 Show all warnings and errors Duncan Mak
@ 2019-01-01  2:12 ` Per Bothner
  2019-01-01  2:33   ` Duncan Mak
  2019-01-01 20:47   ` Duncan Mak
  0 siblings, 2 replies; 15+ messages in thread
From: Per Bothner @ 2019-01-01  2:12 UTC (permalink / raw)
  To: Duncan Mak, kawa mailing list

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
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2019-01-01  2:12 ` Per Bothner
@ 2019-01-01  2:33   ` Duncan Mak
  2019-01-01  2:42     ` Per Bothner
  2019-01-01 20:47   ` Duncan Mak
  1 sibling, 1 reply; 15+ messages in thread
From: Duncan Mak @ 2019-01-01  2:33 UTC (permalink / raw)
  To: Per Bothner; +Cc: kawa mailing list

Very cool, thanks!

Are you planning on making a 3.1 release soon?

On Mon, Dec 31, 2018 at 9:12 PM Per Bothner <per@bothner.com> 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
> per@bothner.com   http://per.bothner.com/



-- 
Duncan.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2019-01-01  2:33   ` Duncan Mak
@ 2019-01-01  2:42     ` Per Bothner
  0 siblings, 0 replies; 15+ messages in thread
From: Per Bothner @ 2019-01-01  2:42 UTC (permalink / raw)
  To: Duncan Mak; +Cc: kawa mailing list

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
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2019-01-01  2:12 ` Per Bothner
  2019-01-01  2:33   ` Duncan Mak
@ 2019-01-01 20:47   ` Duncan Mak
  2019-01-01 20:58     ` Per Bothner
  1 sibling, 1 reply; 15+ messages in thread
From: Duncan Mak @ 2019-01-01 20:47 UTC (permalink / raw)
  To: Per Bothner; +Cc: kawa mailing list

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 <per@bothner.com> 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
> per@bothner.com   http://per.bothner.com/



-- 
Duncan.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2019-01-01 20:47   ` Duncan Mak
@ 2019-01-01 20:58     ` Per Bothner
  2019-01-01 21:16       ` Duncan Mak
  0 siblings, 1 reply; 15+ messages in thread
From: Per Bothner @ 2019-01-01 20:58 UTC (permalink / raw)
  To: Duncan Mak; +Cc: kawa mailing list

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
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2019-01-01 20:58     ` Per Bothner
@ 2019-01-01 21:16       ` Duncan Mak
  2019-01-01 21:24         ` Per Bothner
  0 siblings, 1 reply; 15+ messages in thread
From: Duncan Mak @ 2019-01-01 21:16 UTC (permalink / raw)
  To: Per Bothner; +Cc: kawa mailing list

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 <per@bothner.com> 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
> per@bothner.com   http://per.bothner.com/



-- 
Duncan.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2019-01-01 21:16       ` Duncan Mak
@ 2019-01-01 21:24         ` Per Bothner
  2019-01-01 21:31           ` Duncan Mak
  0 siblings, 1 reply; 15+ messages in thread
From: Per Bothner @ 2019-01-01 21:24 UTC (permalink / raw)
  To: Duncan Mak; +Cc: kawa mailing list

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
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2019-01-01 21:24         ` Per Bothner
@ 2019-01-01 21:31           ` Duncan Mak
  2019-01-01 21:42             ` Per Bothner
  0 siblings, 1 reply; 15+ messages in thread
From: Duncan Mak @ 2019-01-01 21:31 UTC (permalink / raw)
  To: Per Bothner; +Cc: kawa mailing list

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 <per@bothner.com> 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
> per@bothner.com   http://per.bothner.com/



-- 
Duncan.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2019-01-01 21:31           ` Duncan Mak
@ 2019-01-01 21:42             ` Per Bothner
  2019-01-01 22:08               ` Duncan Mak
  0 siblings, 1 reply; 15+ messages in thread
From: Per Bothner @ 2019-01-01 21:42 UTC (permalink / raw)
  To: Duncan Mak; +Cc: kawa mailing list

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

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
per@bothner.com   http://per.bothner.com/

[-- Attachment #2: ModExp.patch --]
[-- Type: text/x-patch, Size: 613 bytes --]

diff --git a/gnu/expr/ModuleExp.java b/gnu/expr/ModuleExp.java
index f2e3c2ec0..f017a72b8 100644
--- a/gnu/expr/ModuleExp.java
+++ b/gnu/expr/ModuleExp.java
@@ -230,7 +230,8 @@ public class ModuleExp extends LambdaExp
             comp.process(Compilation.RESOLVED);
             comp.getMinfo().loadByStages(Compilation.WALKED);
 
-            if (msg != null ? messages.checkErrors(msg, 20) : messages.seenErrors())
+            if (msg != null ? messages.checkErrors(msg, Compilation.maxErrors())
+                : messages.seenErrors())
                 return null;
 
             if (! comp.mustCompile) {

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2019-01-01 21:42             ` Per Bothner
@ 2019-01-01 22:08               ` Duncan Mak
  2022-09-18  3:03                 ` Duncan Mak
  0 siblings, 1 reply; 15+ messages in thread
From: Duncan Mak @ 2019-01-01 22:08 UTC (permalink / raw)
  To: Per Bothner; +Cc: kawa mailing list

Woohoo, that worked!

On Tue, Jan 1, 2019 at 4:42 PM Per Bothner <per@bothner.com> 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
> per@bothner.com   http://per.bothner.com/



-- 
Duncan.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2019-01-01 22:08               ` Duncan Mak
@ 2022-09-18  3:03                 ` Duncan Mak
  2022-09-18 19:11                   ` Per Bothner
  0 siblings, 1 reply; 15+ messages in thread
From: Duncan Mak @ 2022-09-18  3:03 UTC (permalink / raw)
  To: Per Bothner; +Cc: kawa mailing list

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

Hello Per,

I started using Kawa for some hacking recently and I'm running into the
same issue here, so I looked up this conversation and set `--max-errors=-1`.

It seems like the number of errors printed is still capped at 20, did this
regress somehow?


Duncan.


On Tue, Jan 1, 2019 at 5:07 PM Duncan Mak <duncanmak@gmail.com> wrote:

> Woohoo, that worked!
>
> On Tue, Jan 1, 2019 at 4:42 PM Per Bothner <per@bothner.com> 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
> > per@bothner.com   http://per.bothner.com/
>
>
>
> --
> Duncan.
>


-- 
Duncan.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2022-09-18  3:03                 ` Duncan Mak
@ 2022-09-18 19:11                   ` Per Bothner
  2022-09-18 22:06                     ` Duncan Mak
  0 siblings, 1 reply; 15+ messages in thread
From: Per Bothner @ 2022-09-18 19:11 UTC (permalink / raw)
  To: Duncan Mak; +Cc: kawa mailing list



On 9/18/22 20:03, Duncan Mak wrote:
> Hello Per,
> 
> I started using Kawa for some hacking recently and I'm running into the same issue here, so I looked up this conversation and set `--max-errors=-1`.
> 
> It seems like the number of errors printed is still capped at 20, did this regress somehow?

Or the fix was incomplete.

I see that in gnu/expr/ModuleExp.java line 259 there is:
                 if (msg != null ? messages.checkErrors(msg, 20)

Perhaps that should be:
                 if (msg != null ? messages.checkErrors(msg, Compilation.maxErrors())

-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2022-09-18 19:11                   ` Per Bothner
@ 2022-09-18 22:06                     ` Duncan Mak
  2022-09-19 10:48                       ` Per Bothner
  0 siblings, 1 reply; 15+ messages in thread
From: Duncan Mak @ 2022-09-18 22:06 UTC (permalink / raw)
  To: Per Bothner; +Cc: kawa mailing list

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

Thanks for the idea, i made a merge request here:

Use Compilation.maxErrors instead of a hardcoded constant (!37) · Merge
requests · kashell / Kawa · GitLab
<https://gitlab.com/kashell/Kawa/-/merge_requests/37>

With this patch, I can see all the errors now, thanks!

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Show all warnings and errors
  2022-09-18 22:06                     ` Duncan Mak
@ 2022-09-19 10:48                       ` Per Bothner
  0 siblings, 0 replies; 15+ messages in thread
From: Per Bothner @ 2022-09-19 10:48 UTC (permalink / raw)
  To: Duncan Mak; +Cc: kawa mailing list



On 9/19/22 15:06, Duncan Mak wrote:
> Thanks for the idea, i made a merge request here:
> 
> Use Compilation.maxErrors instead of a hardcoded constant (!37) · Merge requests · kashell / Kawa · GitLab <https://gitlab.com/kashell/Kawa/-/merge_requests/37>
> 
> With this patch, I can see all the errors now, thanks!

Merged - thanks!
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-09-19 10:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-31 23:18 Show all warnings and errors Duncan Mak
2019-01-01  2:12 ` Per Bothner
2019-01-01  2:33   ` Duncan Mak
2019-01-01  2:42     ` Per Bothner
2019-01-01 20:47   ` Duncan Mak
2019-01-01 20:58     ` Per Bothner
2019-01-01 21:16       ` Duncan Mak
2019-01-01 21:24         ` Per Bothner
2019-01-01 21:31           ` Duncan Mak
2019-01-01 21:42             ` Per Bothner
2019-01-01 22:08               ` Duncan Mak
2022-09-18  3:03                 ` Duncan Mak
2022-09-18 19:11                   ` Per Bothner
2022-09-18 22:06                     ` Duncan Mak
2022-09-19 10:48                       ` Per Bothner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).