August 27, 2010
Most likely it is.

I updated the code for stdio for windows, but I didn't have a setup on a windows box to test with.  (yay at least it compiles!)

I'll try getting my windows box up to snuff and try to fix this.

-Steve




----- Original Message ----
> From: Don Clugston <dclugston at googlemail.com>
> To: Discuss the dmd beta releases for D <dmd-beta at puremagic.com>
> Sent: Fri, August 27, 2010 10:22:03 AM
> Subject: Re: [dmd-beta] dmd 1.062 and 2.047 beta
> 
> std.stdio is failing unit tests on Windows. Behaves the same way with 2.048,  so it's a Phobos issue, not a compiler bug. Maybe another appender  issue?
> --------------------
> unittest
> core.exception.AssertError at std.stdio(549):  unittest failure
> object.Exception at std\file.d(1429): Trailing characters at  the end of line: `
> 
>                                      '
> --------------------
> 
> On 27 August 2010 15:39, Steve Schveighoffer  <schveiguy at yahoo.com> wrote:
> > I  realized that I broke this right away and fixed it, but I forgot to check
>in.
> > Try again now:
> >
> >  http://www.dsource.org/projects/phobos/changeset/1934
> >
> >  -Steve
> >
> >
> > ----- Original Message ----
> >> From:  Rainer Schuetze <r.sagitario at gmx.de>
> >>
> >>  Hi Andrei,
> >>
> >> I think Walter has just committed a fix for  this. See
> >>  http://d.puremagic.com/issues/show_bug.cgi?id=4302
> >>
> >> I  could not verify  it yet, because the current dmd/phobos combination
> >>  causes an error for  me
> >>
> >> std\xml.d(373): Error: cannot  implicitly convert expression
> >> (result.data()) of type string to  char[]
> >> std\xml.d(1148): Error: template  instance  std.xml.encode!(char[]) error
> >> instantiating
> >>
> >>  This seems to  have to crept in with the recent Appender  changes.
> >>
> >> Rainer
> >>
> >> Andrei   Alexandrescu wrote:
> >> > Hello Rainer,
> >> >
> >>  > Catching up with my  email backlog. Was there a fix on this  issue?
> >> >
> >> >  Andrei
> >> >
> >>  > On 6/11/10 11:30 PDT, Rainer Schuetze wrote:
> >> >>   Hi,
> >> >>
> >> >> I've tried to untangle the  startsWith code, and  here's the minimal
test
> >> >> case I could  come up with so  far:
> >> >>
> >> >>  ///////////////////////
> >> >> template  binaryFunImpl(bool  b)
> >> >> {
> >> >> template Body()
> >>  >>  {
> >> >> static assert(b);
> >> >> alias  bool BodyType;
> >> >>  }
> >> >> alias  Body!().BodyType ReturnType; // line 9
> >> >>  }
> >>  >>
> >> >> uint startsWith(A)(A a) if (is(binaryFunImpl!(true   ).ReturnType)) {
> >> >> return 1; }
> >> >> uint  startsWith(A)(A a) if  (is(binaryFunImpl!(false).ReturnType)) {
> >>  >> return 0; } // line  13
> >> >>
> >> >> const  uint var = startsWith(1);
> >> >>   ///////////////////////
> >> >> dmd produces:
> >>  >>
> >> >>  test.d(6): Error: static assert (b) is  false
> >> >> test.d(9): instantiated  from here:  Body!()
> >> >> test.d(13): instantiated from here:   binaryFunImpl!(false)
> >> >>
> >> >> The error does  not show up if var  is not const. Also, dmd 2.032 to
>2.045
> >> >>  do not produce this error  (2.046 fails), so it must be some  compiler
> >> >>  regression.
> >> >>
> >>  >> As it seems, the compile time evaluation of  startsWith uses the  wrong
> >> >> specialization. Maybe, it is just not  gagging error  output?
> >> >>
> >> >> Any other ideas? I have not  yet  dived too deep into the template code
>of
> >> >> the compiler,  but if nobody  has a better clue (and time), I can give
it
> >> >>  a  try.
> >> >>
> >> >> Rainer
> >>  >>
> >> >> Andrei Alexandrescu  wrote:
> >>  >>> Thanks. It may take a while before I can tend to this.  Could  someone
> >> >>> else look at it?
> >>  >>>
> >> >>>  Andrei
> >>  >>>
> >> >>> On 06/10/2010 12:53 PM, Rainer Schuetze   wrote:
> >> >>>> Sorry, but it still doesn't work. The error  occurs  when the
>expression
> >> >>>> is evaluated at compile  time, so the  code added to the unittest
> >> >>>> does  not
> >> >>>>  cover the issue.
> >>  >>>>
> >> >>>>  Rainer
> >>  >>>>
> >> >>>> Andrei Alexandrescu   wrote:
> >> >>>>> Apologies. svn up should fix it, and  bring some  more goodies too
>:o).
> >> >>>>>
> >>  >>>>>  Andrei
> >> >>>>>
> >>  >>>>> On 06/10/2010 10:14 AM,  Don Clugston wrote:
> >>  >>>>>> const bool fails =  startsWith("ab", "a");
> >>  >>>>>   _______________________________________________
> >>  >>>>> dmd-beta  mailing list
> >> >>>>> dmd-beta at puremagic.com
> >>  >>>>>  http://lists.puremagic.com/mailman/listinfo/dmd-beta
> >>  >>>>>
> >> >>>>
> >> >>>> ;  _______________________________________________
> >> >>>>  dmd-beta  mailing list
> >> >>>> dmd-beta at puremagic.com
> >>  >>>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
> >>  >>>
> >> >>
> >> >>   _______________________________________________
> >> >> dmd-beta  mailing  list
> >> >> dmd-beta at puremagic.com
> >>  >> http://lists.puremagic.com/mailman/listinfo/dmd-beta
> >> >   _______________________________________________
> >> > dmd-beta  mailing  list
> >> > dmd-beta at puremagic.com
> >> > http://lists.puremagic.com/mailman/listinfo/dmd-beta
> >>  >
> >>
> >>  _______________________________________________
> >> dmd-beta  mailing  list
> >> dmd-beta at puremagic.com
> >> http://lists.puremagic.com/mailman/listinfo/dmd-beta
> >>
> >
> >
> >
> >  _______________________________________________
> > dmd-beta mailing  list
> > dmd-beta at puremagic.com
> > http://lists.puremagic.com/mailman/listinfo/dmd-beta
> >
> _______________________________________________
> dmd-beta  mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
> 



August 27, 2010
Hi,

thanks, it compiles now and the test cases seem to work. But trying it in the larger context where it happened first, I'm running into more problems with the latest phobos. But these are probably unrelated...

Rainer

Steve Schveighoffer wrote:
> I realized that I broke this right away and fixed it, but I forgot to check in. Try again now:
>
> http://www.dsource.org/projects/phobos/changeset/1934
>
> -Steve
>
>
> ----- Original Message ----
> 
>> From: Rainer Schuetze <r.sagitario at gmx.de>
>>
>> Hi Andrei,
>>
>> I think Walter has just committed a fix for this. See http://d.puremagic.com/issues/show_bug.cgi?id=4302
>>
>> I could not verify  it yet, because the current dmd/phobos combination causes an error for  me
>>
>> std\xml.d(373): Error: cannot implicitly convert expression
>> (result.data()) of type string to char[]
>> std\xml.d(1148): Error: template  instance std.xml.encode!(char[]) error
>> instantiating
>>
>> This seems to  have to crept in with the recent Appender changes.
>>
>> Rainer
>>
>> Andrei  Alexandrescu wrote:
>> 
>>> Hello Rainer,
>>>
>>> Catching up with my  email backlog. Was there a fix on this issue?
>>>
>>>  Andrei
>>>
>>> On 6/11/10 11:30 PDT, Rainer Schuetze wrote:
>>> 
>>>>  Hi,
>>>>
>>>> I've tried to untangle the startsWith code, and  here's the minimal test case I could come up with so  far:
>>>>
>>>> ///////////////////////
>>>> template  binaryFunImpl(bool b)
>>>> {
>>>> template Body()
>>>>  {
>>>> static assert(b);
>>>> alias bool BodyType;
>>>>  }
>>>> alias Body!().BodyType ReturnType; // line 9
>>>>  }
>>>>
>>>> uint startsWith(A)(A a) if (is(binaryFunImpl!(true  ).ReturnType)) {
>>>> return 1; }
>>>> uint startsWith(A)(A a) if  (is(binaryFunImpl!(false).ReturnType)) {
>>>> return 0; } // line  13
>>>>
>>>> const uint var = startsWith(1);
>>>>  ///////////////////////
>>>> dmd produces:
>>>>
>>>>  test.d(6): Error: static assert (b) is false
>>>> test.d(9): instantiated  from here: Body!()
>>>> test.d(13): instantiated from here:  binaryFunImpl!(false)
>>>>
>>>> The error does not show up if var  is not const. Also, dmd 2.032 to 2.045
>>>> do not produce this error  (2.046 fails), so it must be some compiler
>>>>  regression.
>>>>
>>>> As it seems, the compile time evaluation of  startsWith uses the wrong specialization. Maybe, it is just not  gagging error output?
>>>>
>>>> Any other ideas? I have not yet  dived too deep into the template code of the compiler, but if nobody  has a better clue (and time), I can give it a  try.
>>>>
>>>> Rainer
>>>>
>>>> Andrei Alexandrescu  wrote:
>>>> 
>>>>> Thanks. It may take a while before I can tend to this.  Could someone else look at it?
>>>>>
>>>>>  Andrei
>>>>>
>>>>> On 06/10/2010 12:53 PM, Rainer Schuetze  wrote:
>>>>> 
>>>>>> Sorry, but it still doesn't work. The error occurs  when the expression
>>>>>> is evaluated at compile time, so the  code added to the unittest
>>>>>> does not
>>>>>>  cover the issue.
>>>>>>
>>>>>>  Rainer
>>>>>>
>>>>>> Andrei Alexandrescu  wrote:
>>>>>> 
>>>>>>> Apologies. svn up should fix it, and bring some  more goodies too :o).
>>>>>>>
>>>>>>>  Andrei
>>>>>>>
>>>>>>> On 06/10/2010 10:14 AM,  Don Clugston wrote:
>>>>>>> 
>>>>>>>> const bool fails =  startsWith("ab", "a");
>>>>>>>> 
>>>>>>>  _______________________________________________
>>>>>>> dmd-beta  mailing list
>>>>>>> dmd-beta at puremagic.com
>>>>>>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>>>>>
>>>>>>> 
>>>>>> ; _______________________________________________
>>>>>> dmd-beta  mailing list
>>>>>> dmd-beta at puremagic.com
>>>>>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>>>> 
>>>>  _______________________________________________
>>>> dmd-beta mailing  list
>>>> dmd-beta at puremagic.com
>>>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>> 
>>>  _______________________________________________
>>> dmd-beta mailing  list
>>> dmd-beta at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>
>>> 
>> _______________________________________________
>> dmd-beta  mailing list
>> dmd-beta at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>
>> 
>
>
> 
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>
> 

August 27, 2010
Fixed:

http://www.dsource.org/projects/phobos/changeset/1935

-Steve



----- Original Message ----
> From: Don Clugston <dclugston at googlemail.com>
> To: Discuss the dmd beta releases for D <dmd-beta at puremagic.com>
> Sent: Fri, August 27, 2010 10:22:03 AM
> Subject: Re: [dmd-beta] dmd 1.062 and 2.047 beta
> 
> std.stdio is failing unit tests on Windows. Behaves the same way with 2.048,  so it's a Phobos issue, not a compiler bug. Maybe another appender  issue?
> --------------------
> unittest
> core.exception.AssertError at std.stdio(549):  unittest failure
> object.Exception at std\file.d(1429): Trailing characters at  the end of line: `
> 
>                                      '
> --------------------
> 
> On 27 August 2010 15:39, Steve Schveighoffer  <schveiguy at yahoo.com> wrote:
> > I  realized that I broke this right away and fixed it, but I forgot to check
>in.
> > Try again now:
> >
> >  http://www.dsource.org/projects/phobos/changeset/1934
> >
> >  -Steve
> >
> >
> > ----- Original Message ----
> >> From:  Rainer Schuetze <r.sagitario at gmx.de>
> >>
> >>  Hi Andrei,
> >>
> >> I think Walter has just committed a fix for  this. See
> >>  http://d.puremagic.com/issues/show_bug.cgi?id=4302
> >>
> >> I  could not verify  it yet, because the current dmd/phobos combination
> >>  causes an error for  me
> >>
> >> std\xml.d(373): Error: cannot  implicitly convert expression
> >> (result.data()) of type string to  char[]
> >> std\xml.d(1148): Error: template  instance  std.xml.encode!(char[]) error
> >> instantiating
> >>
> >>  This seems to  have to crept in with the recent Appender  changes.
> >>
> >> Rainer
> >>
> >> Andrei   Alexandrescu wrote:
> >> > Hello Rainer,
> >> >
> >>  > Catching up with my  email backlog. Was there a fix on this  issue?
> >> >
> >> >  Andrei
> >> >
> >>  > On 6/11/10 11:30 PDT, Rainer Schuetze wrote:
> >> >>   Hi,
> >> >>
> >> >> I've tried to untangle the  startsWith code, and  here's the minimal
test
> >> >> case I could  come up with so  far:
> >> >>
> >> >>  ///////////////////////
> >> >> template  binaryFunImpl(bool  b)
> >> >> {
> >> >> template Body()
> >>  >>  {
> >> >> static assert(b);
> >> >> alias  bool BodyType;
> >> >>  }
> >> >> alias  Body!().BodyType ReturnType; // line 9
> >> >>  }
> >>  >>
> >> >> uint startsWith(A)(A a) if (is(binaryFunImpl!(true   ).ReturnType)) {
> >> >> return 1; }
> >> >> uint  startsWith(A)(A a) if  (is(binaryFunImpl!(false).ReturnType)) {
> >>  >> return 0; } // line  13
> >> >>
> >> >> const  uint var = startsWith(1);
> >> >>   ///////////////////////
> >> >> dmd produces:
> >>  >>
> >> >>  test.d(6): Error: static assert (b) is  false
> >> >> test.d(9): instantiated  from here:  Body!()
> >> >> test.d(13): instantiated from here:   binaryFunImpl!(false)
> >> >>
> >> >> The error does  not show up if var  is not const. Also, dmd 2.032 to
>2.045
> >> >>  do not produce this error  (2.046 fails), so it must be some  compiler
> >> >>  regression.
> >> >>
> >>  >> As it seems, the compile time evaluation of  startsWith uses the  wrong
> >> >> specialization. Maybe, it is just not  gagging error  output?
> >> >>
> >> >> Any other ideas? I have not  yet  dived too deep into the template code
>of
> >> >> the compiler,  but if nobody  has a better clue (and time), I can give
it
> >> >>  a  try.
> >> >>
> >> >> Rainer
> >>  >>
> >> >> Andrei Alexandrescu  wrote:
> >>  >>> Thanks. It may take a while before I can tend to this.  Could  someone
> >> >>> else look at it?
> >>  >>>
> >> >>>  Andrei
> >>  >>>
> >> >>> On 06/10/2010 12:53 PM, Rainer Schuetze   wrote:
> >> >>>> Sorry, but it still doesn't work. The error  occurs  when the
>expression
> >> >>>> is evaluated at compile  time, so the  code added to the unittest
> >> >>>> does  not
> >> >>>>  cover the issue.
> >>  >>>>
> >> >>>>  Rainer
> >>  >>>>
> >> >>>> Andrei Alexandrescu   wrote:
> >> >>>>> Apologies. svn up should fix it, and  bring some  more goodies too
>:o).
> >> >>>>>
> >>  >>>>>  Andrei
> >> >>>>>
> >>  >>>>> On 06/10/2010 10:14 AM,  Don Clugston wrote:
> >>  >>>>>> const bool fails =  startsWith("ab", "a");
> >>  >>>>>   _______________________________________________
> >>  >>>>> dmd-beta  mailing list
> >> >>>>> dmd-beta at puremagic.com
> >>  >>>>>  http://lists.puremagic.com/mailman/listinfo/dmd-beta
> >>  >>>>>
> >> >>>>
> >> >>>> ;  _______________________________________________
> >> >>>>  dmd-beta  mailing list
> >> >>>> dmd-beta at puremagic.com
> >>  >>>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
> >>  >>>
> >> >>
> >> >>   _______________________________________________
> >> >> dmd-beta  mailing  list
> >> >> dmd-beta at puremagic.com
> >>  >> http://lists.puremagic.com/mailman/listinfo/dmd-beta
> >> >   _______________________________________________
> >> > dmd-beta  mailing  list
> >> > dmd-beta at puremagic.com
> >> > http://lists.puremagic.com/mailman/listinfo/dmd-beta
> >>  >
> >>
> >>  _______________________________________________
> >> dmd-beta  mailing  list
> >> dmd-beta at puremagic.com
> >> http://lists.puremagic.com/mailman/listinfo/dmd-beta
> >>
> >
> >
> >
> >  _______________________________________________
> > dmd-beta mailing  list
> > dmd-beta at puremagic.com
> > http://lists.puremagic.com/mailman/listinfo/dmd-beta
> >
> _______________________________________________
> dmd-beta  mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
> 



August 27, 2010
Suggestion: you may want to use wine for your Windows unittests. To build using wine, do this:

$ make -f posix.mak OS=win32wine unittest

That will build and unittest both debug and release.

Andrei

On 8/27/10 10:29 PDT, Steve Schveighoffer wrote:
> Fixed:
>
> http://www.dsource.org/projects/phobos/changeset/1935
>
> -Steve
>
>
>
> ----- Original Message ----
>> From: Don Clugston<dclugston at googlemail.com>
>> To: Discuss the dmd beta releases for D<dmd-beta at puremagic.com>
>> Sent: Fri, August 27, 2010 10:22:03 AM
>> Subject: Re: [dmd-beta] dmd 1.062 and 2.047 beta
>>
>> std.stdio is failing unit tests on Windows. Behaves the same way with 2.048,  so it's a Phobos issue, not a compiler bug. Maybe another appender  issue?
>> --------------------
>> unittest
>> core.exception.AssertError at std.stdio(549):  unittest failure
>> object.Exception at std\file.d(1429): Trailing characters at  the end of line: `
>>
>>                                       '
>> --------------------
>>
>> On 27 August 2010 15:39, Steve Schveighoffer<schveiguy at yahoo.com>  wrote:
>>> I  realized that I broke this right away and fixed it, but I forgot to check
>> in.
>>> Try again now:
>>>
>>>   http://www.dsource.org/projects/phobos/changeset/1934
>>>
>>>   -Steve
>>>
>>>
>>> ----- Original Message ----
>>>> From:  Rainer Schuetze<r.sagitario at gmx.de>
>>>>
>>>>   Hi Andrei,
>>>>
>>>> I think Walter has just committed a fix for  this. See
>>>>   http://d.puremagic.com/issues/show_bug.cgi?id=4302
>>>>
>>>> I  could not verify  it yet, because the current dmd/phobos combination
>>>>   causes an error for  me
>>>>
>>>> std\xml.d(373): Error: cannot  implicitly convert expression
>>>> (result.data()) of type string to  char[]
>>>> std\xml.d(1148): Error: template  instance  std.xml.encode!(char[]) error
>>>> instantiating
>>>>
>>>>   This seems to  have to crept in with the recent Appender  changes.
>>>>
>>>> Rainer
>>>>
>>>> Andrei   Alexandrescu wrote:
>>>>> Hello Rainer,
>>>>>
>>>>   >  Catching up with my  email backlog. Was there a fix on this  issue?
>>>>>
>>>>>   Andrei
>>>>>
>>>>   >  On 6/11/10 11:30 PDT, Rainer Schuetze wrote:
>>>>>>    Hi,
>>>>>>
>>>>>> I've tried to untangle the  startsWith code, and  here's the minimal
> test
>>>>>> case I could  come up with so  far:
>>>>>>
>>>>>>   ///////////////////////
>>>>>> template  binaryFunImpl(bool  b)
>>>>>> {
>>>>>> template Body()
>>>>   >>   {
>>>>>> static assert(b);
>>>>>> alias  bool BodyType;
>>>>>>   }
>>>>>> alias  Body!().BodyType ReturnType; // line 9
>>>>>>   }
>>>>   >>
>>>>>> uint startsWith(A)(A a) if (is(binaryFunImpl!(true   ).ReturnType)) {
>>>>>> return 1; }
>>>>>> uint  startsWith(A)(A a) if  (is(binaryFunImpl!(false).ReturnType)) {
>>>>   >>  return 0; } // line  13
>>>>>>
>>>>>> const  uint var = startsWith(1);
>>>>>>    ///////////////////////
>>>>>> dmd produces:
>>>>   >>
>>>>>>   test.d(6): Error: static assert (b) is  false
>>>>>> test.d(9): instantiated  from here:  Body!()
>>>>>> test.d(13): instantiated from here:   binaryFunImpl!(false)
>>>>>>
>>>>>> The error does  not show up if var  is not const. Also, dmd 2.032 to
>> 2.045
>>>>>>   do not produce this error  (2.046 fails), so it must be some  compiler
>>>>>>   regression.
>>>>>>
>>>>   >>  As it seems, the compile time evaluation of  startsWith uses the  wrong
>>>>>> specialization. Maybe, it is just not  gagging error  output?
>>>>>>
>>>>>> Any other ideas? I have not  yet  dived too deep into the template code
>> of
>>>>>> the compiler,  but if nobody  has a better clue (and time), I can give
> it
>>>>>>   a  try.
>>>>>>
>>>>>> Rainer
>>>>   >>
>>>>>> Andrei Alexandrescu  wrote:
>>>>   >>>  Thanks. It may take a while before I can tend to this.  Could  someone
>>>>>>> else look at it?
>>>>   >>>
>>>>>>>   Andrei
>>>>   >>>
>>>>>>> On 06/10/2010 12:53 PM, Rainer Schuetze   wrote:
>>>>>>>> Sorry, but it still doesn't work. The error  occurs  when the
>> expression
>>>>>>>> is evaluated at compile  time, so the  code added to the unittest
>>>>>>>> does  not
>>>>>>>>   cover the issue.
>>>>   >>>>
>>>>>>>>   Rainer
>>>>   >>>>
>>>>>>>> Andrei Alexandrescu   wrote:
>>>>>>>>> Apologies. svn up should fix it, and  bring some  more goodies too
>> :o).
>>>>>>>>>
>>>>   >>>>>   Andrei
>>>>>>>>>
>>>>   >>>>>  On 06/10/2010 10:14 AM,  Don Clugston wrote:
>>>>   >>>>>>  const bool fails =  startsWith("ab", "a");
>>>>   >>>>>    _______________________________________________
>>>>   >>>>>  dmd-beta  mailing list
>>>>>>>>> dmd-beta at puremagic.com
>>>>   >>>>>   http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>>   >>>>>
>>>>>>>>
>>>>>>>> ;  _______________________________________________
>>>>>>>>   dmd-beta  mailing list
>>>>>>>> dmd-beta at puremagic.com
>>>>   >>>>  http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>>   >>>
>>>>>>
>>>>>>    _______________________________________________
>>>>>> dmd-beta  mailing  list
>>>>>> dmd-beta at puremagic.com
>>>>   >>  http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>>>    _______________________________________________
>>>>> dmd-beta  mailing  list
>>>>> dmd-beta at puremagic.com
>>>>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>>   >
>>>>
>>>>   _______________________________________________
>>>> dmd-beta  mailing  list
>>>> dmd-beta at puremagic.com
>>>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>>
>>>
>>>
>>>
>>>   _______________________________________________
>>> dmd-beta mailing  list
>>> dmd-beta at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>>
>> _______________________________________________
>> dmd-beta  mailing list
>> dmd-beta at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>>
>
>
>
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
August 27, 2010

Rainer Schuetze wrote:
>
>
> thanks, it compiles now and the test cases seem to work. But trying it in the larger context where it happened first, I'm running into more problems with the latest phobos. But these are probably unrelated...
>

Sounds like we need better unit tests.
August 27, 2010
Walter Bright wrote:
>
>
> Rainer Schuetze wrote:
>>
>>
>> thanks, it compiles now and the test cases seem to work. But trying it in the larger context where it happened first, I'm running into more problems with the latest phobos. But these are probably unrelated...
>>
>
> Sounds like we need better unit tests.

If you mean the way the unit tests currently work: yes, it seems in an ugly state of transition...

After fixing bug 4328, I could narrow the problems down to the polishing of std.thread (and involves attaching to threads that are not created from within D, so it is not easily covered by unit tests):

Index: thread.d ===================================================================
--- thread.d    (revision 373)
+++ thread.d    (working copy)
@@ -1903,7 +1903,6 @@
             thisThread.m_isRunning = true;
         }
         thisThread.m_isDaemon = true;
-        Thread.setThis( thisThread );

         version( OSX )
         {
@@ -1922,6 +1921,10 @@
             obj.m_tls = p[0 .. sz];
             memcpy( p, &_tls_beg, sz );
             // used gc_malloc so no need to free
+
+            if( t.m_addr == pthread_self() )
+                Thread.setThis( thisThread );
+
         }
         else version( Windows )
         {
@@ -1930,6 +1933,7 @@
                 auto pstart = cast(void*) &_tlsstart;
                 auto pend   = cast(void*) &_tlsend;
                 thisThread.m_tls = pstart[0 .. pend - pstart];
+                Thread.setThis( thisThread );
             }
             else
             {


can somebody apply this patch to druntime, please?

The original project also compiles fine now with the std.startsWith.

Rainer

August 27, 2010
Changeset 374

Rainer Schuetze wrote:
>
>
> After fixing bug 4328, I could narrow the problems down to the polishing of std.thread (and involves attaching to threads that are not created from within D, so it is not easily covered by unit tests):
>
> Index: thread.d ===================================================================
> --- thread.d    (revision 373)
> +++ thread.d    (working copy)
> @@ -1903,7 +1903,6 @@
>             thisThread.m_isRunning = true;
>         }
>         thisThread.m_isDaemon = true;
> -        Thread.setThis( thisThread );
>
>         version( OSX )
>         {
> @@ -1922,6 +1921,10 @@
>             obj.m_tls = p[0 .. sz];
>             memcpy( p, &_tls_beg, sz );
>             // used gc_malloc so no need to free
> +
> +            if( t.m_addr == pthread_self() )
> +                Thread.setThis( thisThread );
> +
>         }
>         else version( Windows )
>         {
> @@ -1930,6 +1933,7 @@
>                 auto pstart = cast(void*) &_tlsstart;
>                 auto pend   = cast(void*) &_tlsend;
>                 thisThread.m_tls = pstart[0 .. pend - pstart];
> +                Thread.setThis( thisThread );
>             }
>             else
>             {
>
>
> can somebody apply this patch to druntime, please?
>
> The original project also compiles fine now with the std.startsWith.
>
> Rainer
>
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>
>


1 2 3 4 5
Next ›   Last »