April 08, 2017 [Issue 17308] New: [TEST/PROCESS] Beta releases should not be built with -release | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=17308 Issue ID: 17308 Summary: [TEST/PROCESS] Beta releases should not be built with -release Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: ibuclaw@gdcproject.org The quality of assertions just seems to be going downhill post conversion to D. https://github.com/dlang/dmd/pull/6412 I squinted with mistrust at this line for a full 5 minutes. --- assert(cdto.sizeok == SIZEOKdone || !cdto.isBaseOf(cdto, null)) Assert that `cdto' has had it's size determined, or that `cdto' is *not* a base class of... itself? Hmmm... surely that would be identical to having. --- assert(cdto.sizeok == SIZEOKdone || true) Which is identical to having. --- assert(true); At which point, one begins to wonder what on earth is this doing here if it's a no-op. If beta releases are compiled with -release, IMO they shouldn't be, as lots of bugs are falling through the gaps. The frequency that I'm getting assertion failures in code backported from D is just unnerving. Some past examples include. Change: https://github.com/dlang/dmd/pull/5875 Asserts with: extern(C++, ...) void ice(); Change: https://github.com/dlang/dmd/pull/5972 Asserts with: struct BitRange { this(size_t) { } } Change: https://github.com/dlang/dmd/pull/6065 Asserts with: struct DSO { MG mg; } struct TDSO { int a; DSO* b; } All these examples are reasonably simple code tests, so can not imagine them *not* being caught by beta testers. -- |
Copyright © 1999-2021 by the D Language Foundation