[Issue 2816] Sudden-death static assert is not very useful
https://issues.dlang.org/show_bug.cgi?id=2816 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Version|1.042 |D1 --
[Issue 2816] Sudden-death static assert is not very useful
http://d.puremagic.com/issues/show_bug.cgi?id=2816 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2816] Sudden-death static assert is not very useful
http://d.puremagic.com/issues/show_bug.cgi?id=2816 --- Comment #13 from Walter Bright bugzi...@digitalmars.com 2009-12-31 11:11:36 PST --- Fixed dmd 1.054 and 2.038 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2816] Sudden-death static assert is not very useful
http://d.puremagic.com/issues/show_bug.cgi?id=2816 Leandro Lucarella llu...@gmail.com changed: What|Removed |Added CC||llu...@gmail.com --- Comment #12 from Leandro Lucarella llu...@gmail.com 2009-12-15 07:14:58 PST --- http://www.dsource.org/projects/dmd/changeset/294 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2816] Sudden-death static assert is not very useful
http://d.puremagic.com/issues/show_bug.cgi?id=2816 --- Comment #11 from clugd...@yahoo.com.au 2009-04-18 17:13 --- Found another bug in this patch. Should start the count from 0, not 1. Otherwise you can get a segfault when the out-by-1 error shows up in the only show first and last iterations case. in TemplateInstance::printInstantiationTrace() // determine instantiation depth and number of recursive instantiations int n_instantiations = 0; --
[Issue 2816] Sudden-death static assert is not very useful
http://d.puremagic.com/issues/show_bug.cgi?id=2816 --- Comment #6 from kamm-removet...@incasoftware.de 2009-04-08 07:43 --- Created an attachment (id=318) -- (http://d.puremagic.com/issues/attachment.cgi?id=318action=view) template instantiation trace patch patch against DMD 1.043, superficially tested Note that this originated as a hack and might have been possible without adding tinst to Scope and TemplateInstance. There were discussions about including only certain template instantiations in such a trace: http://www.mail-archive.com/digitalmar...@puremagic.com/msg03614.html --
[Issue 2816] Sudden-death static assert is not very useful
http://d.puremagic.com/issues/show_bug.cgi?id=2816 clugd...@yahoo.com.au changed: What|Removed |Added Keywords|patch | --- Comment #2 from clugd...@yahoo.com.au 2009-04-07 05:55 --- (In reply to comment #1) The static assert does give you file/line, so it does give context. But I'll add the expression print, too. But I think static assert errors should be fatal. They usually involve misconfigured code, it is pointless to continue. Yes, there will not be any more meaningful errors. But you still need a back trace. If the static assert occurs in (say) a library template, knowing that it happened in std.functional at line 92 doesn't help very much -- you want to know where the problem is in _your_ code. (That's a real example, BTW). Actually, I'll have another try, and see if I can create a backtrace, and THEN make it a fatal error. So I'm retracting this patch. --
[Issue 2816] Sudden-death static assert is not very useful
http://d.puremagic.com/issues/show_bug.cgi?id=2816 --- Comment #4 from clugd...@yahoo.com.au 2009-04-07 10:47 --- (In reply to comment #3) Don, LDC already implemented template instantiation traces. Check StaticAssert::semantic2 and TemplateInstance::printInstantiationTrace. I emailed Walter about them at the time. If desired, I can provide a patch against DMD. That'd be great! --
[Issue 2816] Sudden-death static assert is not very useful
http://d.puremagic.com/issues/show_bug.cgi?id=2816 --- Comment #5 from shro8...@vandals.uidaho.edu 2009-04-07 11:07 --- For that matter, if template errors could all be given optional (some flag?) stack traces (not just chained errors) that would be cool. I'm thinking somthing like: template error foo bla bla bla. invoked at file.d:7235 from TBar invoked at file.d:752 from TBaz invoked at code.d:7235 from Bling ... maybe (another flag?) some formatted printing of the args to (limited to 80 columns) --