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
When a '.test.pq' file contains a syntax error, the error is reported (good) but the line number reported for it does not necessarily correspond to the location of the error in the '.test.pq' file.
Steps to Reproduce
Create a new PQ SDK project.
Set the '.test.pq' file's contents to:
[a
=
3 +]
Evaluate the '.test.pq' file.
Notice that the error is reported as occurring on line 4, when the problem is actually on line 3.
Actual Experience
Evaluation dies with:
Token Literal expected. Start position: (4, 4). End position (4, 5).
Expected Experience
Error's start and end position should reflect line 3, not line 4.
Is this stemming from the '.test.pq' file being converted to a section document before evaluation (e.g. because that adds a line of M code into the mix, causing the reported line number to be one off from the original source file)?
Is this stemming from the '.test.pq' file being converted to a section document before evaluation (e.g. because that adds a line of M code into the mix, causing the reported line number to be one off from the original source file)?
Probably. I remember taking this into account in the initial implementation, but it looks like it might have been broken in subsequent refactoring.
Preflight Checklist
Power Query SDK
0.3.1
Regression From
No response
Platform
All
Architecture
x64
OS Version
No response
VSCode version
No response
PQSdkTool Path
No response
Bug Description
When a '.test.pq' file contains a syntax error, the error is reported (good) but the line number reported for it does not necessarily correspond to the location of the error in the '.test.pq' file.
Steps to Reproduce
Notice that the error is reported as occurring on line 4, when the problem is actually on line 3.
Actual Experience
Evaluation dies with:
Expected Experience
Error's start and end position should reflect line 3, not line 4.
Additional Context
Related: #286
The text was updated successfully, but these errors were encountered: