When using @chain, line numbers are given at the level of the @chain command, not sub-commands. This makes it hard to debug. Consider the following script
using Chain
foo(x, y) = x * y
x = [1, 2]
@chain x begin
identity
identity
identity
foo([3, 4])
end
The stacktrace says the error occurs starting on line 7. This makes it hard to debug long @chains. We should try to ensure line number propogation within the chain block.