Showing all errors at startup

Moderator: GZDoom Developers

Post Reply
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Showing all errors at startup

Post by Apeirogon »

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 all

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Showing all errors at startup

Post by Graf Zahl »

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
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Showing all errors at startup

Post by Apeirogon »

Graf Zahl wrote:that's not going to happen.
"At all" or "at least not now/near future"?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Showing all errors at startup

Post by Graf Zahl »

Since it would necessitate rewriting the entire compiler backend, "never" is far more likely.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”