SPCodeOrg / SPCode

A lightweight SourcePawn editor.
https://forums.alliedmods.net/showthread.php?p=2693577
61 stars 14 forks source link

[BUG] "Go to error" features buggy on sub-files. #97

Closed kratos1812 closed 3 years ago

kratos1812 commented 3 years ago

Description

Whenever I work on a plugin that has sub files and an error occurs while compiling the main SP file, if i tap on the error line it won't jump to the file nor the line of the error. This has been going on for ages and I would love to see a fix in the next update.

Step to reproduce

Create 2 .sp files in the same folder, first one will be names main_file.sp and the second one sub_file.sp. Now open main_file.sp and type to following

#include "sub_file.sp"

Now write a code that will throw an error/warning while compiling in sub_file.sp. Something like the following and compile main_file.sp.

int g_iValue = 1;

void f()
{
 g_iValue = true;
}

Profit.

maxijabase commented 3 years ago

Thank you a lot for reporting this, I totally forgot this was a thing lol

maxijabase commented 3 years ago

So from what I know this is on the 1.10 compiler's side - it doesn't know where to indicate the errors if they happened on another file. This is fixed in 1.11, but we would have to see if there's something we can do to make this feature work with 1.10, or just straight up wontfix the issue due to the nature of this problem.

maxijabase commented 3 years ago

I'm going to be closing this, as I arrived to the aforementioned conclusion. I'll make sure this feature is working properly with the 1.11 compiler - this feature is officially not supported within 1.10 and earlier.