-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TODO] on error, we shouldn't discard valuable information #34
Comments
Pushed fixes to master, please check
Works with |
reopening: the following compilation errors are "relevant" and should not be discarded: bugs/inim/t01_error_msg_discards.nim: proc fun(a:int):auto =
a*2
3
let b=4
echo fun(2)
expected output:
|
By compiling your example with Nim 0.18.1 [Linux: amd64] I get: ~ nim c -r bugs/t01_error_msg_discards.nim
Hint: used config file '/home/user/.choosenim/toolchains/nim-#devel/config/nim.cfg' [Conf]
Hint: system [Processing]
Hint: t01_error_msg_discards [Processing]
t01_error_msg_discards.nim(2, 6) Error: expression 'a * 2' is of type 'int' and has to be discarded
~ With INim I get same output above: ~ inim -s bugs/t01_error_msg_discards.nim
馃憫 INim 0.4.1
Nim Compiler Version 0.18.1 [Linux: amd64] at /home/user/.nimble/bin/nim
inim_1533504761.nim(4, 6) Error: expression 'a * 2' is of type 'int' and has to be discarded
~ Since it's the same, does seem good enough to close this issue, what do you think? How did you get the arrow thing?
|
IIRC, btw: IMO if we have to test on only 1 thing, priority should be given to devel, instead of stable |
@0atman I think we might be able to close this (unless you think otherwise @timotheecour). Unless I'm doing something wrong, I can't get --hints:on to print out more than INim gives me. |
follow up from #29: my original bug report was actually only half valid / imprecise (sorry for any confusion!); let me clarify what I think is ideal default behavior:
let's reuse bugs/t59_array_index.nim: same as in #29
the useful context is lost here.
@["a", "b", "c"]
stdout normal output should be shown (but i think that's just on error, should flush stdout聽#30)which shows the relevant useful runtime stacktrace
the only non-relevant information, that we can discard, is:
Error: execution of an external program failed: '/tmp/nim//app '
NOTE: this is also how ipython3 does it.
NOTE: same with
inim -s=bugs/t59_array_index.nim
, the useful error should be:ie, only
Error: execution of an external program failed: '/private/tmp/inim_1531876765 '
would be discardedNOTE: the existing behavior is correct in the following case:
since there's no relevant stacktrace
summary
The text was updated successfully, but these errors were encountered: