You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forgetting a comma seems to be very common when writing the package file.
There's a version(JsonLineNumbers) in parseJson that emits line numbers, although it currently doesn't compile due to an outdated import - import vibecompat.core.log; instead of import dub.internal.vibecompat.core.log;.
Additionally enabling that switch should probably print the next line rather than the previous one, e.g. for this:
{
"name": "dtk"
"targetName": "dtk",
}
It prints line 0, but I would prefer line 3 or line 4. 4 is more accurate, but it prints 3 if I write scope(failure) logError("Error in line: %d", line ? *line : 0);
And the diagnostic itself could be nicer, before:
Error in line: 4
Error executing command run: Failed to load package at C:\dev\projects\test_dub: Expected '}' or ',' - got '"'.
Desired:
Error executing command run: Failed to load package at C:\dev\projects\test_dub:
C:\dev\projects\test_dub\dub.json(4): Error: Expected '}' or ',' - got '"'.
This will enable jump-to-file in editors to work and will highlight the offending line properly.
The text was updated successfully, but these errors were encountered:
Forgetting a comma seems to be very common when writing the package file.
There's a
version(JsonLineNumbers)
inparseJson
that emits line numbers, although it currently doesn't compile due to an outdated import -import vibecompat.core.log;
instead ofimport dub.internal.vibecompat.core.log;
.Additionally enabling that switch should probably print the next line rather than the previous one, e.g. for this:
It prints line
0
, but I would prefer line3
or line4
. 4 is more accurate, but it prints 3 if I writescope(failure) logError("Error in line: %d", line ? *line : 0);
And the diagnostic itself could be nicer, before:
Desired:
This will enable jump-to-file in editors to work and will highlight the offending line properly.
The text was updated successfully, but these errors were encountered: