June 10, 2010 [dmd-beta] dmd 1.062 and 2.047 beta | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Steve Schveighoffer | On Jun 10, 2010, at 5:55 PM, Steve Schveighoffer <schveiguy at yahoo.com> wrote: > Namely, I'm asking phobos developers who fix bugs, not dmd developers. There's a mailing list for just that purpose... > | |||
June 10, 2010 [dmd-beta] dmd 1.062 and 2.047 beta | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright, el 10 de junio a las 14:47 me escribiste: > > > Steve Schveighoffer wrote: > >And the concrete version numbers? You mean you were in there adding stuff, and you didn't add those?! > > Right. I think Don made a pretty good case. One thing he didn't mention is that there are too many version numbers, adding two more each month makes the list completely impractical sooner or later. This can be fixed easily, just add a text field for the version, and let the people put whatever they like. Then have D1, D2 and D1&D2 as a combobox in a different field. There will be cases where the precise version is garbage, and cases where is meaningful. Try starting trusting in people, if they don't fill the correct version (having the chance to do so, which is not the case right now when the available versions are not kept up to date), you can remove the useless field later. Just my 2 cents... -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- Una mujer en bicicleta, con sombrero de paja, es la m?s flagrante violaci?n a las leyes de la aerodinamia. -- Ricardo Vaporeso. 21 de Septiembre de 1917. | |||
June 11, 2010 [dmd-beta] dmd 1.062 and 2.047 beta | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | The corruption is gone now, but as Walter says, it doesn't handle 0 bytes in the middle of strings. | |||
June 11, 2010 [dmd-beta] dmd 1.062 and 2.047 beta | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | 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
>
| |||
June 12, 2010 [dmd-beta] dmd 1.062 and 2.047 beta | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Rainer Schuetze | Hi, this is what happens: while deducing a template match, - a template instance of binaryFunImpl!false is created to evaluate is(binaryFunImpl!(false).ReturnType) - the template instance is added as a member to the module - semantic analysis fails, so the respective startsWith alternative is rejected - compiler attempts to compile added binaryFunImpl!false and fails so it helps to write template binaryFunImpl(bool b) if(b) { ... avoiding creation of the template instance, but I was not able to add a similar test to startsWith in std.algorithm. Maybe someone else has an idea how to do it? Though this is kind of a blocker for me, should I add just add it as a regression to bugzilla? Rainer 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. | |||
June 13, 2010 [dmd-beta] dmd 1.062 and 2.047 beta | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Rainer Schuetze |
I agree it's too late for this to be fixed for the release, as it does not seem like an easy fix without side effects. I'll put my findings into bugzilla.
It's also no longer a blocker for me, I have just replaced my uses of startsWith inside CTFE with a very simple version of it.
DMD 2.047 looks like a great release, thanks to everybody involved.
Rainer
Rainer Schuetze wrote:
> Hi,
>
> this is what happens:
>
> while deducing a template match,
> - a template instance of binaryFunImpl!false is created to evaluate
> is(binaryFunImpl!(false).ReturnType)
> - the template instance is added as a member to the module
> - semantic analysis fails, so the respective startsWith alternative is
> rejected
> - compiler attempts to compile added binaryFunImpl!false and fails
>
> so it helps to write
>
> template binaryFunImpl(bool b)
> if(b)
> {
> ...
>
> avoiding creation of the template instance, but I was not able to add a similar test to startsWith in std.algorithm. Maybe someone else has an idea how to do it?
>
> Though this is kind of a blocker for me, should I add just add it as a regression to bugzilla?
>
> Rainer
>
>
> 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.
>
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>
| |||
August 26, 2010 [dmd-beta] dmd 1.062 and 2.047 beta | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Rainer Schuetze | 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
| |||
August 27, 2010 [dmd-beta] dmd 1.062 and 2.047 beta | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | 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 > | |||
August 27, 2010 [dmd-beta] dmd 1.062 and 2.047 beta | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Rainer Schuetze | 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 > | |||
August 27, 2010 [dmd-beta] dmd 1.062 and 2.047 beta | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Steve Schveighoffer | 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
>
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply