[erlang-patches] Print column numbers when compiling

Anthony Ramine n.oxyde@REDACTED
Wed Jun 6 13:36:58 CEST 2012


I added a commit to my branch to fix compile:err_info/0, it is now
just an alias for erl_scan:error_info/0.

Please refetch:

	git fetch https://github.com/nox/otp.git compile-column-numbers

Regards,

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 198ef4b41ce0b22898b7642354ea5062bc3cc896:

  Fix type compile:err_info/0 (2012-06-06 13:31:10 +0200)

----------------------------------------------------------------
Anthony Ramine (6):
      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

 lib/compiler/doc/src/compile.xml  |    5 +++++
 lib/compiler/src/compile.erl      |   13 ++++++++---
 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, 66 insertions(+), 15 deletions(-)


--
Anthony Ramine

Le 5 juin 2012 à 18:19, Gustav Simonsson a écrit :

> Hi Anthony,
> 
> We've added your patch to the 'pu' branch for testing of proposed updates.
> We'll get back to you with further feedback after it has been reviewed.
> 
> Thank you for the contribution!
> 
> Regards,
> Gustav Simonsson
> Erlang/OTP team
> 
> On 2012-06-03 14:34, Anthony Ramine wrote:
>> As discussed with Tuncer Ayaz off-list, I added a test to error_SUITE checking
>> that column numbers are correctly included in warnings and errors messages.
>> 
>> I don't think this should be extensively tested but I maybe I could tweak
>> epp_SUITE and put all of its tests in a group and execute them with and
>> without the column option as it is already full of {Line, Column} locations
>> that could be tested, the column numbers are currently stripped in
>> messages_compare/1.
>> 
>> 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 c98bc0eb21aae3011b09c37c0efd4dd5316b6d30:
>> 
>>   Test column number reporting in error_SUITE (2012-06-03 14:27:21 +0200)
>> 
>> ----------------------------------------------------------------
>> Anthony Ramine (5):
>>       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
>> 
>>  lib/compiler/doc/src/compile.xml  |    5 +++++
>>  lib/compiler/src/compile.erl      |   11 ++++++++--
>>  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, 65 insertions(+), 14 deletions(-)
>> 
>> Regards,
>> 
>> --
>> Anthony Ramine
>> 
>> Le 3 juin 2012 à 11:05, Anthony Ramine a écrit :
>> 
>>> This patch makes erlc print column numbers when compiling .erl files through a
>>> new compile option, "column":
>>> 
>>> 	$ cat foo.erl
>>> 	-module(foo).
>>> 	foo(X) ->  bar.
>>> 	$ bin/erlc foo.erl
>>> 	foo.erl:2: Warning: function foo/1 is unused
>>> 	foo.erl:2: Warning: variable 'X' is unused
>>> 	$ bin/erlc +column foo.erl
>>> 	foo.erl:2:1: Warning: function foo/1 is unused
>>> 	foo.erl:2:5: Warning: variable 'X' is unused
>>> 
>>> 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 5af6bd403862b10693035bebfd88d326541ca4bb:
>>> 
>>>  Fix printing of errors with column numbers (2012-06-03 10:45:51 +0200)
>>> 
>>> ----------------------------------------------------------------
>>> Anthony Ramine (4):
>>>      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
>>> 
>>> lib/compiler/doc/src/compile.xml |    5 +++++
>>> lib/compiler/src/compile.erl     |   11 ++++++++--
>>> lib/stdlib/doc/src/epp.xml       |    2 ++
>>> lib/stdlib/src/epp.erl           |   44 ++++++++++++++++++++++++++++++--------
>>> lib/stdlib/src/erl_scan.erl      |    2 +-
>>> 5 files changed, 52 insertions(+), 12 deletions(-)
>>> 
>>> Regards,
>> _______________________________________________
>> erlang-patches mailing list
>> erlang-patches@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-patches
> 




More information about the erlang-patches mailing list