Skip to content

Commit

Permalink
shorten parse error message - less is more (#5409)
Browse files Browse the repository at this point in the history
  • Loading branch information
mccanne authored Oct 31, 2024
1 parent 6485155 commit a11256b
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
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()
=== ^ ===

0 comments on commit a11256b

Please sign in to comment.