v8 Errors: input line numbers missing
See original GitHub issueI quite like the new (v8) simple format for syntax and other compile errors from Input, like Input In [25]
. But compared to the old (v7) error header with pseudo-files (e.g. File "<ipython-input-6-9e0b5ab16b5e>", line 4
), the line number has gone missing. There are tools which parse iPython’s errors which will be missing this line information. This is also particularly problematic for syntax/indentation errors in Plain
style with multi-line input:
In [25]: if True:
...: same_var = 1
...: else:
...: same_var = 2
...: same_var = 1
...: same_var = 1
Input In [25]
same_var = 1
^
IndentationError: unexpected indent
I think Input In [25], line 5
would be perfect, or, for consistency with the file version, Input In [25]:5
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Accessing line number in V8 JavaScript (Chrome & Node.js)
Object.defineProperty(global, '__stack', { get: function(){ var orig = Error.prepareStackTrace; Error.prepareStackTrace = function(_, stack){ return stack; }; ...
Read more >Add / Remove Line Numbers - MZ-Tools 8.0 Help
VB.NET VB6 VBA. The Add / Remove Line Numbers feature allows you to add or remove line numbers to the source code of...
Read more >How can I get my line numbers back inmy code file
Click on the tab labeled "'ASM' File Types". In the left column at the top, you'll need to place a check in the...
Read more >Why don't the line numbers in an error message match the ...
If you are seeing error messages that are out by a number of lines, one thing you can check is that your source...
Read more >src/messages.js - v8/v8 - Git at Google
@return {number} 0 if input too small, -1 if input too large,. else the line number. */. function ScriptLineFromPosition(position) {.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @MrMino, just checking on the status of this issue. I have tooling standing by to learn the final decision on restoring line numbers for input blocks across the board. Thanks.
In case you haven’t checked in on PR #13560 recently, I got confirmation that the <cell line...> stuff was no longer needed and can be reverted. I also went ahead a just pushed the small change changing “Input cell” -> “Cell” for a short and consistent layout. Let me know if you see anything else needed in #13560 before it could be merged.