[No] Showing all errors at startup

Moderator: GZDoom Developers

Showing all errors at startup

Postby Apeirogon » Sun Jan 20, 2019 4:57 am

Right now, gzdoom dont shows ALL errors in zscript files, if there are some, only some parts. This is mostly case of converting decorate do zscript.

For example, this
Code: Select allExpand view
class test : actor
{
....
line 15 : DropItem "pistol" 5;
....
line 99: tnt1 q 0 a_chase("", "");
....
line 123: tnt1 q 1 a_playsoundex("BOOM");
}

class another_test : test
{
.....
line 200: damagetype yellow;
.....
line 234: tnmt 4 b ();
.....
line 300: tnt1 q 0 a_jumpif( (momx == 0), "stop_right_there");
.....
}

pseudo code, if launched in gzdoom, produce errors
at first "Line 15, unexpected integer constant; line 200, unknown global identifier yellow", an that all
after fixing this errors and launch again "(line 99, try to jump to undefined state) x 2; line 200, function without prototype must have defined values by hand, or something like this", an that all
and after fixing this "line 123, call to deprecated function a_playsoundex; line 300, call to deprecated variable momx, deprecated since 2.4", and there are, possible, some more.

This is tedious, run - check for errors - fix it, run again - fix "new" errors - run again, continue until there are no errors. I know about -norun command, but you still need to restart gzdoom several times and wait until it load resources before shows "all" errors.
So it would be great if gzdoom would shown all errors at the first time.

I can provide real example of such buggy file, if you want.
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Showing all errors at startup

Postby Graf Zahl » Sun Jan 20, 2019 5:33 am

Can't be done. If the front end fails to build an internal tree structure the backend cannot run so you only get the frontend's errors.
Equally, a backend error will render the entire block it is in invalid, the remaining code of that block cannot be processed because the data needed to output the errors does not exist.

All things summed up, this would necessitate a complete rewrite of the entire compiler and that's not going to happen.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Showing all errors at startup

Postby Apeirogon » Mon Jan 21, 2019 8:02 am

Graf Zahl wrote:that's not going to happen.

"At all" or "at least not now/near future"?
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Showing all errors at startup

Postby Graf Zahl » Mon Jan 21, 2019 8:12 am

Since it would necessitate rewriting the entire compiler backend, "never" is far more likely.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: BLEX [Bot], Yandex [Bot] and 0 guests