--checks:off also turns off assertions (optAssert) as one can see in definition of ChecksOptions in
From comparison of the above resources and factoring in also:
Wait, -d:release already removes stacktrace, excessiveStackTrace, linetrace, debugger, line_dir and adds opt:speed, define:release.
https://github.com/nim-lang/Nim/blob/4e438f9096fc413824bdbe8377a4ca376d63be35/config/nim.cfg#L72
It seems that -d:danger is very similar -d:release --checks:off with optNaNCheck, optInfCheck, being possibly different.
To get a definitive answer, can one dump the list of all options in effect for a given nim compilation run?
ach, you are right!
then I guess that -d:danger and -d:release --checks:off are the same except for StyleCheck (I still see no reason to doubt that optNanCheck and optInfCheck are off by default so there should be no difference there).
To get a definitive answer...
Well people read the source code successfully. Can't get more definite than that. :-)
But yeah, danger is release + checks:off. And the default config should probably be simplified to use --checks:off.
Well people read the source code successfully. Can't get more definite than that. :-)
Well, as you can see from this thread several people read the same code and arrived at different conclusions :-) The definite answer is how compiler reads the code :-)
But yeah, danger is release + checks:off. And the default config should probably be simplified to use --checks:off.
Lots of projects ask the user to use both of them, there is a lot of misconceptions out there, for example https://github.com/mratsim/Arraymancer#performance-notice-on-nim-020--compilation-flags
Lots of projects ask the user to use both of them, there is a lot of misconceptions
That was due to a bug in Nim before 1.0.
I hope for beginners my explanation is good enough?
http://ssalewski.de/nimprogramming.html#_launching_the_compiler_and_running_the_program