Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shorten parse error message - less is more #5409

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/super/ztests/single-arg-error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ script: |
outputs:
- name: stderr
data: |
super: error parsing SuperPipe at line 1, column 26:
super: parse error at line 1, column 26:
file sample.jsup | count(
=== ^ ===
2 changes: 1 addition & 1 deletion compiler/parser/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func convertParseErrs(err error, files *srcfiles.List) error {
if !ok {
return err
}
files.AddError("error parsing SuperPipe", pe.pos.offset, -1)
files.AddError("parse error", pe.pos.offset, -1)
}
return nil
}
2 changes: 1 addition & 1 deletion compiler/parser/ztests/syntax-error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ inputs:
outputs:
- name: stderr
data: |
super: error parsing SuperPipe at line 1, column 12:
super: parse error at line 1, column 12:
count() by ,x,y
=== ^ ===
2 changes: 1 addition & 1 deletion docs/tutorials/schools.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ super -z -c 'Defunct=' *.jsup
```
produces
```mdtest-output
super: error parsing SuperPipe at line 1, column 9:
super: parse error at line 1, column 9:
Defunct=
=== ^ ===
```
Expand Down
16 changes: 8 additions & 8 deletions lake/ztests/query-parse-error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,34 @@ outputs:
- name: stderr
data: |
=1=
error parsing SuperPipe at line 1, column 12:
parse error at line 1, column 12:
from test \ count()
=== ^ ===
=2=
error parsing SuperPipe at line 2, column 7:
parse error at line 2, column 7:
test \ count()
=== ^ ===
=3=
error parsing SuperPipe at line 1, column 12:
parse error at line 1, column 12:
from test \ count()
=== ^ ===
=4=
error parsing SuperPipe at line 2, column 7:
parse error at line 2, column 7:
test \ count()
=== ^ ===
=5=
error parsing SuperPipe in bad-single-line.spq at line 1, column 12:
parse error in bad-single-line.spq at line 1, column 12:
from test \ count()
=== ^ ===
=6=
error parsing SuperPipe in bad-multiple-lines.spq at line 2, column 7:
parse error in bad-multiple-lines.spq at line 2, column 7:
test \ count()
=== ^ ===
=7=
error parsing SuperPipe in bad-single-line.spq at line 1, column 12:
parse error in bad-single-line.spq at line 1, column 12:
from test \ count()
=== ^ ===
=8=
error parsing SuperPipe in bad-multiple-lines.spq at line 2, column 7:
parse error in bad-multiple-lines.spq at line 2, column 7:
test \ count()
=== ^ ===
2 changes: 1 addition & 1 deletion service/ztests/compile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ inputs:
outputs:
- name: stdout
data: |
{compilation_errors:[{Msg:"error parsing SuperPipe",Pos:6,End:-1}]}
{compilation_errors:[{Msg:"parse error",Pos:6,End:-1}]}
16 changes: 8 additions & 8 deletions service/ztests/query-parse-error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,34 @@ outputs:
- name: stderr
data: |
=1=
error parsing SuperPipe at line 1, column 12:
parse error at line 1, column 12:
from test \ count()
=== ^ ===
=2=
error parsing SuperPipe at line 2, column 7:
parse error at line 2, column 7:
test \ count()
=== ^ ===
=3=
error parsing SuperPipe at line 1, column 12:
parse error at line 1, column 12:
from test \ count()
=== ^ ===
=4=
error parsing SuperPipe at line 2, column 7:
parse error at line 2, column 7:
test \ count()
=== ^ ===
=5=
error parsing SuperPipe in bad-single-line.spq at line 1, column 12:
parse error in bad-single-line.spq at line 1, column 12:
from test \ count()
=== ^ ===
=6=
error parsing SuperPipe in bad-multiple-lines.spq at line 2, column 7:
parse error in bad-multiple-lines.spq at line 2, column 7:
test \ count()
=== ^ ===
=7=
error parsing SuperPipe in bad-single-line.spq at line 1, column 12:
parse error in bad-single-line.spq at line 1, column 12:
from test \ count()
=== ^ ===
=8=
error parsing SuperPipe in bad-multiple-lines.spq at line 2, column 7:
parse error in bad-multiple-lines.spq at line 2, column 7:
test \ count()
=== ^ ===