Message-ID: <362950017.11753.1599090265663@mail.yahoo.com>
Date: 2020-09-02T23:44:25Z
From: brodie gaslam
Subject: sys.call() 's srcref doesn't match the language
In-Reply-To: <CAJf4E3pK1m5W+-OwtvLE-Je11uDhEu2y76PuRB03UxLNvh-kmQ@mail.gmail.com>
>On Wednesday, September 2, 2020, 6:19:20 PM EDT, Lionel Henry <lionel at rstudio.com> wrote:
>
>Hello,
>
>The source references are useful for debugging tools because they
>allow linking to call sites in the source files.
>
>I agree the output can be confusing. Perhaps this could be fixed by
>tweaking the print method for calls. If the deparsed call doesn't
>match the srcref, both could be displayed along with file:line:column.
>
>```
>#> f()
>#> <srcref:file.R:2:3>
>#> 1 + f()
>```
>
>Best,
>Lionel
Why print the mismatched srcref at all?? I find that confusing.
Just omit the srcref from display. Debugging tools can
still retrieve it and use the information, presumably.
Best,
Brodie.