Thread overview | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
July 23, 2010 [dmd-internals] assert inside unittest still sucks | ||||
---|---|---|---|---|
| ||||
Sorry for bringing this up again. I still dream of the good ol' assert. Right now with the latest druntime, assert(expr) goes completely silent. No message at all. The program exits with errorcode 1, but you have no idea what happened. I tried to check out and build the latest compiler, there are compile-time errors. Andrei |
July 23, 2010 [dmd-internals] assert inside unittest still sucks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Jul 23, 2010, at 8:24 AM, Andrei Alexandrescu wrote:
> Sorry for bringing this up again. I still dream of the good ol' assert. Right now with the latest druntime, assert(expr) goes completely silent. No message at all. The program exits with errorcode 1, but you have no idea what happened.
In the last thread someone suggested providing an overridable routine that prints unhandled exceptions during the unittest run. How about that? I'd left it silent thus far to avoid cluttering specifically formatted unittest results with runtime-level output.
|
July 23, 2010 [dmd-internals] assert inside unittest still sucks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | I'd love it if by default:
a) everything were EXACTLY as before,
b) except the assert stops the current unittest, not the entire thing.
This is what's sensible. Beyond that, feel free to introduce configurability.
Andrei
Sean Kelly wrote:
> On Jul 23, 2010, at 8:24 AM, Andrei Alexandrescu wrote:
>
>> Sorry for bringing this up again. I still dream of the good ol' assert. Right now with the latest druntime, assert(expr) goes completely silent. No message at all. The program exits with errorcode 1, but you have no idea what happened.
>
> In the last thread someone suggested providing an overridable routine that prints unhandled exceptions during the unittest run. How about that? I'd left it silent thus far to avoid cluttering specifically formatted unittest results with runtime-level output.
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
|
July 23, 2010 [dmd-internals] assert inside unittest still sucks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu |
Andrei Alexandrescu wrote:
>
> I tried to check out and build the latest compiler, there are compile-time errors.
>
Hmm, what are they?
|
July 23, 2010 [dmd-internals] assert inside unittest still sucks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | That's how the current behavior should be in druntime SVN. The problem is that the granularity is per file rather than per unittest block.
On Jul 23, 2010, at 10:22 AM, Andrei Alexandrescu wrote:
> I'd love it if by default:
>
> a) everything were EXACTLY as before,
>
> b) except the assert stops the current unittest, not the entire thing.
>
> This is what's sensible. Beyond that, feel free to introduce configurability.
>
>
> Andrei
>
> Sean Kelly wrote:
>> On Jul 23, 2010, at 8:24 AM, Andrei Alexandrescu wrote:
>>> Sorry for bringing this up again. I still dream of the good ol' assert. Right now with the latest druntime, assert(expr) goes completely silent. No message at all. The program exits with errorcode 1, but you have no idea what happened.
>> In the last thread someone suggested providing an overridable routine that prints unhandled exceptions during the unittest run. How about that? I'd left it silent thus far to avoid cluttering specifically formatted unittest results with runtime-level output.
>> _______________________________________________
>> dmd-internals mailing list
>> dmd-internals at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/dmd-internals
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
|
July 23, 2010 [dmd-internals] assert inside unittest still sucks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | On Jul 23, 2010, at 4:39 PM, Sean Kelly <sean at invisibleduck.org> wrote:
> That's how the current behavior should be in druntime SVN. The problem is that the granularity is per file rather than per unittest block.
Other than being a D front end implementation detail, why should that work at a per-file level instead of per-test level? I've seen many people lament over the lack of per-test exception safety and haven't ever heard of anyone using the per-file handler.
|
July 23, 2010 [dmd-internals] assert inside unittest still sucks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright, el 23 de julio a las 13:21 me escribiste: > > > Andrei Alexandrescu wrote: > > > >I tried to check out and build the latest compiler, there are compile-time errors. > > > > Hmm, what are they? For D1 branch: g++ -m32 -c -Wno-deprecated -Wstrict-aliasing -D__near= -D__pascal= -fno-exceptions -O2 -Ibackend -Itk -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH backend/el.c backend/el.c: In function ?elem* el_picvar(symbol*)?: backend/el.c:1376: error: ?elfobj_refGOTsym? was not declared in this scope backend/el.c: In function ?elem* el_var(symbol*)?: backend/el.c:1592: error: ?elfobj_refGOTsym? was not declared in this scope -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- Did you see the frightened ones? Did you hear the falling bombs? Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath a clear blue sky? |
July 23, 2010 [dmd-internals] assert inside unittest still sucks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jason House | On Jul 23, 2010, at 1:53 PM, Jason House wrote:
> On Jul 23, 2010, at 4:39 PM, Sean Kelly <sean at invisibleduck.org> wrote:
>
>> That's how the current behavior should be in druntime SVN. The problem is that the granularity is per file rather than per unittest block.
>
> Other than being a D front end implementation detail, why should that work at a per-file level instead of per-test level? I've seen many people lament over the lack of per-test exception safety and haven't ever heard of anyone using the per-file handler.
No idea. That's simply how it's always been.
|
July 25, 2010 [dmd-internals] More build (link) errors [was: assert inside unittest still sucks] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Leandro Lucarella | Leandro Lucarella, el 23 de julio a las 22:25 me escribiste: > > > Walter Bright, el 23 de julio a las 13:21 me escribiste: > > > > > > Andrei Alexandrescu wrote: > > > > > >I tried to check out and build the latest compiler, there are compile-time errors. > > > > > > > Hmm, what are they? > > For D1 branch: > > g++ -m32 -c -Wno-deprecated -Wstrict-aliasing -D__near= -D__pascal= -fno-exceptions -O2 -Ibackend -Itk -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH backend/el.c > backend/el.c: In function ?elem* el_picvar(symbol*)?: > backend/el.c:1376: error: ?elfobj_refGOTsym? was not declared in this scope > backend/el.c: In function ?elem* el_var(symbol*)?: > backend/el.c:1592: error: ?elfobj_refGOTsym? was not declared in this scope I don't know if this is a know issue, but just in case... With svn r587, D1 branch: gcc -m32 -lstdc++ -lpthread access.o array.o attrib.o bcomplex.o bit.o blockopt.o cast.o code.o cg.o cg87.o cgcod.o cgcs.o cgelem.o cgen.o cgreg.o cgsched.o class.o cod1.o cod2.o cod3.o cod4.o cod5.o constfold.o irstate.o dchar.o cond.o debug.o declaration.o dsymbol.o dt.o dump.o e2ir.o ee.o eh.o el.o dwarf.o enum.o evalu8.o expression.o func.o gdag.o gflow.o glocal.o gloop.o glue.o gnuc.o go.o gother.o html.o iasm.o id.o identifier.o impcnvtab.o import.o inifile.o init.o inline.o lexer.o link.o lstring.o mangle.o mars.o rmem.o module.o msc.o mtype.o nteh.o cppmangle.o opover.o optimize.o os.o out.o outbuf.o parse.o ph.o ptrntab.o root.o rtlsym.o s2ir.o scope.o statement.o stringtable.o struct.o csymbol.o template.o tk.o tocsym.o todt.o type.o typinf.o util.o var.o version.o strtold.o utf.o staticassert.o unialpha.o toobj.o toctype.o toelfdebug.o entity.o doc.o macro.o hdrgen.o delegatize.o aa.o ti_achar.o toir.o interpret.o traits.o builtin.o clone.o aliasthis.o man.o arrayop.o port.o response.o async.o json.o speller.o aav.o unittests.o imphint.o libelf.o elfobj.o -o dmd expression.o:(.bss+0x0): multiple definition of `precedence' attrib.o:(.bss+0x0): first defined here module.o:(.bss+0x0): multiple definition of `precedence' attrib.o:(.bss+0x0): first defined here parse.o:(.bss+0x0): multiple definition of `precedence' attrib.o:(.bss+0x0): first defined here statement.o:(.bss+0x0): multiple definition of `precedence' attrib.o:(.bss+0x0): first defined here traits.o:(.bss+0x0): multiple definition of `precedence' attrib.o:(.bss+0x0): first defined here collect2: ld returned 1 exit status make: *** [dmd] Error 1 -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- HOMBRE DESNUDO AMENAZA A LOS VECINOS CON UNA "KATANA" DESDE SU BALCON -- Cr?nica TV |
July 26, 2010 [dmd-internals] More build (link) errors [was: assert inside unittest still sucks] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Leandro Lucarella |
Leandro Lucarella wrote:
>
> I don't know if this is a know issue, but just in case...
>
> With svn r587, D1 branch:
>
> gcc -m32 -lstdc++ -lpthread access.o array.o attrib.o bcomplex.o bit.o blockopt.o cast.o code.o cg.o cg87.o cgcod.o cgcs.o cgelem.o cgen.o cgreg.o cgsched.o class.o cod1.o cod2.o cod3.o cod4.o cod5.o constfold.o irstate.o dchar.o cond.o debug.o declaration.o dsymbol.o dt.o dump.o e2ir.o ee.o eh.o el.o dwarf.o enum.o evalu8.o expression.o func.o gdag.o gflow.o glocal.o gloop.o glue.o gnuc.o go.o gother.o html.o iasm.o id.o identifier.o impcnvtab.o import.o inifile.o init.o inline.o lexer.o link.o lstring.o mangle.o mars.o rmem.o module.o msc.o mtype.o nteh.o cppmangle.o opover.o optimize.o os.o out.o outbuf.o parse.o ph.o ptrntab.o root.o rtlsym.o s2ir.o scope.o statement.o stringtable.o struct.o csymbol.o template.o tk.o tocsym.o todt.o type.o typinf.o util.o var.o version.o strtold.o utf.o staticassert.o unialpha.o toobj.o toctype.o toelfdebug.o entity.o doc.o macro.o hdrgen.o delegatize.o aa.o ti_achar.o toir.o interpret.o traits.o builtin.o clone.o aliasthis.o man.o arrayop.o port.o response.o async.o json.o speller.o aav.o unittests.o imphint.o libelf.o elfobj.o -o dmd
> expression.o:(.bss+0x0): multiple definition of `precedence'
> attrib.o:(.bss+0x0): first defined here
> module.o:(.bss+0x0): multiple definition of `precedence'
> attrib.o:(.bss+0x0): first defined here
> parse.o:(.bss+0x0): multiple definition of `precedence'
> attrib.o:(.bss+0x0): first defined here
> statement.o:(.bss+0x0): multiple definition of `precedence'
> attrib.o:(.bss+0x0): first defined here
> traits.o:(.bss+0x0): multiple definition of `precedence'
> attrib.o:(.bss+0x0): first defined here
> collect2: ld returned 1 exit status
> make: *** [dmd] Error 1
>
>
Sorry about that. A fix was checked in.
|
Copyright © 1999-2021 by the D Language Foundation