zadean / xqerl

Erlang XQuery 3.1 Processor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compile time errors

grantmacken opened this issue · comments

https://github.com/zadean/xqerl/blob/master/src/xqerl_error.erl

%% -record(xqError, {
%%       name,
%%       description,
%%       value,
%%       location % {Module, Line, Column} %TODO
%%    }).

Yes please, I really need xQuery compile time errors, to contain
location: file:line:column

This will take quite a few changes to fully implement, but is already part of the way there.

How critical is the column number? This would mean rewriting the XQuery scanner to a large degree. Currently it is always set to 0.

For me column number, not important, as long the xQuery compile error comes with with file:line number, so I know were to look, when my xQuery fails to compile.

I've got a new branch for this fix: https://github.com/zadean/xqerl/tree/feature/static-line-numbers

Most of the static errors will return the file and line number. Others may not...
It is still a work in progress, but early feedback is appreciated.

thanks I'll check this out

here is a travis build from
https://github.com/zadean/xqerl/tree/feature/static-line-numbers
https://travis-ci.org/grantmacken/alpine-xqerl/builds/586311828

Most of the static errors will return the file and line number. Others may not...
It is still a work in progress, but early feedback is appreciated

From the limited examples I have tried, I can't see any file or line numbers yet.
If you have a simple example, I can add it, then I'll know what to grep.

I think the branch used in the build can't be right. The line numbers in the stack trace don't line up to the most recent changes.

For the XPST0081 example, I get the correct file name(but with line number 1).

My bad, forgot to adjust the make build target
https://travis-ci.org/grantmacken/alpine-xqerl/builds/586401309
Looking good, thanks.