[erlang-patches] Print column numbers when compiling
Lukas Larsson
lukas@REDACTED
Wed Aug 22 17:30:24 CEST 2012
Hi,
We have now looked at this patch and there are a couple of issues
remaining which have to be solved.
The patch changes the representation of the abstract format which has a
couple of implications:
* Any parse transform which uses the line number position might brake
when this new option (this could include OTP parse transforms)
* Any tool which depend on having an integer as the line number
position will break (syntax tools might be one such tool)
In order to mitigate this backwards incompatibility, we suggest making
the line/column number an opaque datatype which is only accessible via
an api and update the documentation to reflect this.
In addition all of the different warnings/errors in erl_lint and friends
have to be checked with the new column number so that they point to the
correct position.
Also the erl_lint, epp and any other suite which deal with error
messages/warnings have to be updated to run tests with and without this
option.
I'm sure that I've forgotten some things which have to be done. This is
a major change and will take some time to get correct.
I hope I have not deterred you from getting this patch into the
Erlang/OTP. If you have any questions about anything I will do what I
can to help you.
Lukas
On 10/06/12 13:24, nox wrote:
> I added a commit to correctly order locations in compile:messages_per_file/1
> which didn't take into account column numbers.
>
> git fetch https://github.com/nox/otp.git compile-column-numbers
>
>
> The following changes since commit 9bbda97f63ba4ee7cd58c266ee69af1059352189:
>
> Merge branch 'raimo/tools/remove-fprof-tuple-funs/OTP-10091' into
> maint (2012-05-23 16:15:58 +0200)
>
> are available in the git repository at:
>
>
> https://github.com/nox/otp.git compile-column-numbers
>
> for you to fetch changes up to d932ad582676f1593d917f222b1d8dec71fe88b3:
>
> Fix messages ordering with column numbers (2012-06-10 13:01:50 +0200)
>
> ----------------------------------------------------------------
> Anthony Ramine (7):
> Export type erl_scan:location/0
> Allow setting of initial position in epp
> Create a new "column" option in compile
> Fix printing of errors with column numbers
> Test column number reporting in error_SUITE
> Fix type compile:err_info/0
> Fix messages ordering with column numbers
>
> lib/compiler/doc/src/compile.xml | 5 +++++
> lib/compiler/src/compile.erl | 25 +++++++++++++++++----
> lib/compiler/test/error_SUITE.erl | 15 +++++++++++--
> lib/stdlib/doc/src/epp.xml | 2 ++
> lib/stdlib/src/epp.erl | 44 +++++++++++++++++++++++++++++--------
> lib/stdlib/src/erl_scan.erl | 2 +-
> 6 files changed, 77 insertions(+), 16 deletions(-)
>
> --
> Anthony Ramine
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
>
More information about the erlang-patches
mailing list