http://d.puremagic.com/bugzilla/show_bug.cgi?id=93
godaves yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |blocker
Version|0.152 |0.153
------- Comment #2 from godaves yahoo.com 2006-04-11 09:08 -------
"Blocker: Blocks development and/or testing work." It's a blocker if you run
into that bug and want to use Contract Programming during the course of
development and testing. After all, that's a major part of the langauge. Let
Walter make the call.
--

http://d.puremagic.com/bugzilla/show_bug.cgi?id=93
godaves yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |blocker
Version|0.152 |0.153
------- Comment #2 from godaves yahoo.com 2006-04-11 09:08 -------
"Blocker: Blocks development and/or testing work." It's a blocker if you run
into that bug and want to use Contract Programming during the course of
development and testing. After all, that's a major part of the langauge. Let
Walter make the call.

That category list really should be changed, it is completely
inappropriate for a compiler. Almost every bug affects development and
testing work in that sense! (And segfaults of the compiler are not as
bad as incorrect code generation).
The fact that a particular example does not compile with -release is not
a blocker. I can assure you that contract programming works in general.
Blockers are very rare, one example occurred in an early DMD release
where almost any program would fail to compile. I doubt that any
blockers will be discovered that aren't regressions.
(An example of a blocker would be: "dmd can no longer be used with build").
To have any chance of this being fixed, you need to have a go at cutting
down the error. Walter generally ignores bug reports which are longer
than 20 lines. I suspect he'll completely ignore the severity.

http://d.puremagic.com/bugzilla/show_bug.cgi?id=93
godaves yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |blocker
Version|0.152 |0.153
------- Comment #2 from godaves yahoo.com 2006-04-11 09:08 -------
"Blocker: Blocks development and/or testing work." It's a blocker if
you run
into that bug and want to use Contract Programming during the course of
development and testing. After all, that's a major part of the
langauge. Let
Walter make the call.

That category list really should be changed, it is completely
inappropriate for a compiler. Almost every bug affects development and
testing work in that sense! (And segfaults of the compiler are not as
bad as incorrect code generation).
The fact that a particular example does not compile with -release is not
a blocker. I can assure you that contract programming works in general.
Blockers are very rare, one example occurred in an early DMD release
where almost any program would fail to compile. I doubt that any
blockers will be discovered that aren't regressions.
(An example of a blocker would be: "dmd can no longer be used with build").
To have any chance of this being fixed, you need to have a go at cutting
down the error. Walter generally ignores bug reports which are longer
than 20 lines. I suspect he'll completely ignore the severity.

I appreciate your concerns and believe it or not put some thought into
the original report severity, etc. If Walter wants to ignore it that is
his prerogative. If Walter wants to 'downgrade' it that is fine w/ me.
Believe me, I'm not doing this stuff to make Walter's job harder.
I did not try to reduce the error any more than it is because the
summary of the example says:
"What follows is a cut-down version of Eric Anderton's regex compiler.
It is just enough to compile the regular expression above, serving to
illustrate how it is done."
In fact I went to the extra 'trouble' of copying and pasting the code to
put it all in one spot, and tested it both on Windows and Linux.
I agree it probably a recent regression - all the more reason IMHO to
get it taken care of right away because Walter knows what he's changed
recently in that area.
I also agree that perhaps some better bug report descriptions could be
developed, but I hesitate to say that because I don't have the time
right now to come up with suggestions and/or make the changes myself.
- Dave

http://d.puremagic.com/bugzilla/show_bug.cgi?id=93
godaves yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |blocker
Version|0.152 |0.153
------- Comment #2 from godaves yahoo.com 2006-04-11 09:08 -------
"Blocker: Blocks development and/or testing work." It's a blocker if
you run
into that bug and want to use Contract Programming during the course of
development and testing. After all, that's a major part of the
langauge. Let
Walter make the call.

That category list really should be changed, it is completely
inappropriate for a compiler. Almost every bug affects development and
testing work in that sense! (And segfaults of the compiler are not as
bad as incorrect code generation).
The fact that a particular example does not compile with -release is
not a blocker. I can assure you that contract programming works in
general.
Blockers are very rare, one example occurred in an early DMD release
where almost any program would fail to compile. I doubt that any
blockers will be discovered that aren't regressions.
(An example of a blocker would be: "dmd can no longer be used with
build").
To have any chance of this being fixed, you need to have a go at
cutting down the error. Walter generally ignores bug reports which are
longer than 20 lines. I suspect he'll completely ignore the severity.

I appreciate your concerns and believe it or not put some thought into
the original report severity, etc. If Walter wants to ignore it that is
his prerogative. If Walter wants to 'downgrade' it that is fine w/ me.
Believe me, I'm not doing this stuff to make Walter's job harder.
I did not try to reduce the error any more than it is because the
summary of the example says:
"What follows is a cut-down version of Eric Anderton's regex compiler.
It is just enough to compile the regular expression above, serving to
illustrate how it is done."

It's just a bit of proof-of-concept code showing what's possible with D
templates. No-one should be using the code for any other purpose.
Minimal for a regexp does not mean minimal for a bug report. The whole
regexp thing is completely irrelevant to this bug.

In fact I went to the extra 'trouble' of copying and pasting the code to
put it all in one spot, and tested it both on Windows and Linux.
I agree it probably a recent regression - all the more reason IMHO to
get it taken care of right away because Walter knows what he's changed
recently in that area.

Actually, the template part of the compiler has changed a lot since Eric
wrote that code. I'm a little surprised that it compiles at all.
(My compile-time regex, which greatly improves upon that one, was
written against a much more recent compiler, is currently broken due to
improvements in the template syntax).

I also agree that perhaps some better bug report descriptions could be
developed, but I hesitate to say that because I don't have the time
right now to come up with suggestions and/or make the changes myself.

When bugzilla was set up, Walter proposed some definitions which made a
lot of sense. I don't understand why the default inappropriate ones were
retained. A compiler is so different to a normal app.

http://d.puremagic.com/bugzilla/show_bug.cgi?id=93
------- Comment #3 from clugdbug yahoo.com.au 2006-04-12 09:55 -------
I've tried to reproduce this on Windows with DMD 0.153. It always compiles for
me.
I also don't understand the reference to Contract Programming in message #3
(there's no contract programming in this code).
--

I've tried to reproduce this on Windows with DMD 0.153. It always compiles for
me.
I also don't understand the reference to Contract Programming in message #3
(there's no contract programming in this code).

The linker error happens because of array bounds checking code that is omitted
with -release. I recreated it, but it is arguably my mistake (read on).
I copied the code into two files, test_regex.d and temp_regex.d.
Then I recompiled:
C:\Zz\temp>dmd test_regex.d
C:\dmd\bin\..\..\dm\bin\link.exe test_regex,,,user32+kernel32/noi;
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
test_regex.obj(test_regex)
Error 42: Symbol Undefined _array_10temp_regex
--- errorlevel 1
Then I recompiled again with -release and ran it:
C:\Zz\temp>dmd test_regex.d -release
C:\dmd\bin\..\..\dm\bin\link.exe test_regex,,,user32+kernel32/noi;
C:\Zz\temp>test_regex
matches: [hello]
That recreates the problem, and I should have specified the exact steps better.
But, if I recompile w/o -release like so:
C:\Zz\temp>dmd test_regex.d temp_regex.d
C:\dmd\bin\..\..\dm\bin\link.exe test_regex+temp_regex,,,user32+kernel32/noi;
C:\Zz\temp>test_regex
matches: [hello]
Then it works. The reason I didn't compile in temp_regex.d (or link in the .obj
compiled separately) is because the code in tempregex.d is all of either const
or template code. Being used to C/++ #include <header>, I just compiled the
main() module.
So under normal circumstances (e.g. the regex code is linked into a lib and
that lib is linked with the app.) this 'bug' would probably not have happened,
so along with the other things you pointed out, I lowered the Severity for it
to 'trivial' and priority to 'informational'.
This is a potentially frustrating inconsistency between the compiler switches
because, as the templates are always instantiated in the declaritive scope, the
compiler generated stuff is (correctly) generated for the same scope. I say
potentially frustrating because sometimes compiler generated stuff is "out of
sight, out of mind", at least for me.
Walter probably spotted this right away from the linker error and just ignored
it or sat back and chuckled as the e-mails went back and forth <g>
(The reference to contract programming is because the -release switch omits pre
and post contracts, along with asserts, invariants, etc. So, what I was
referring to is that if you ran into this bug, then in order to get it to
compile the -release switch would remove your CP code, hence "blocker").
Thanks,
- Dave
--