Surprised this hasn’t come up to this forum till now.
Take a look at this notebook for example
https://beta.observablehq.com/d/a34c4faedcce7b1a - we know, on which row is an error occurring, but it’s hard to find (unless if you ctrl+f find error text)
Would be a nice and useful addition
P.S. I know how to fix this particular case, but it’s for problem representation
This is an interesting corner. I suspect the reason why line numbering hasn’t come up much is because we built error indications into Observable that show the little red error caret inline, on the correct line and usually also the character position. So with few exceptions, there isn’t the need to track down a line by number.
The thing about line numbers in this case is that they wouldn’t directly point to the error: the GraphQL template tag calculates line numbers versus the template string itself - so if
In the case, when reported line numbers will be off from 1 , we can do simple math I guess (query start line number + reported line number)
Other alternative would be adding line numbers only, when cell has fired error, and hiding it when cell’s value successfully resolved
I was wondering about that, because I haven’t seen that caret in quite a while. Is it limited to certain types of errors? Perhaps someone could share a notebook and screenshot so that I can try to replicate it on my end?