propagate metadata in doto forms

Description

The doto macro currently produces lists without metadata, which among other things means errors and warnings are misleading or less specific than they could be. For example, this code generates reflection warnings, but the warnings point to the beginning of the doto block itself:

Note the line and column numbers in these warnings:

A more specific and accurate output would look like this:

Similar macros like -> take pains to propagate metadata from the users forms to the macro's output. This is more important for those macros because of how they interact with type hints.
Since the return values of the interior doto forms are ignored, the metadata is somewhat less important, but the example above shows the the propagation would still be valuable.

Patch: CLJ-2184-patch-00.patch

Prescreened by: Alex Miller

Environment

None

Activity

Show:
Alex Miller
June 20, 2017, 5:20 PM

Patches welcome....

chouser
June 20, 2017, 5:24 PM

Attached "CLJ-2184-patch-00.patch" which uses a single with-meta call in doto to copy the metadata from each user-supplied form to the output form.

Completed

Assignee

Unassigned

Reporter

chouser

Labels

Approval

Ok

Patch

Code

Fix versions

Affects versions

Priority

Minor
Configure