[phobos] phobos commit, revision 2354

Brad Roberts braddr at puremagic.com
Fri Jan 21 23:18:18 PST 2011


Ok, I had to not just to!string(envData.sep), but also change it to:
   s = replace(...);

I predict lots of pain from the next release.  User impacting changes suck.  I'm
tempted to suggest that we pile on as many as we can squeeze into this one just
to concentrate the pain into one release rather than spread out over several
that are individually painful.

Thoughts?

On 1/21/2011 6:13 PM, Brad Roberts wrote:
> Ok.
> 
> On Fri, 21 Jan 2011, Andrei Alexandrescu wrote:
> 
>> Date: Fri, 21 Jan 2011 18:57:31 -0600
>> From: Andrei Alexandrescu <andrei at erdani.com>
>> Reply-To: Discuss the phobos library for D <phobos at puremagic.com>
>> To: Discuss the phobos library for D <phobos at puremagic.com>
>> Subject: Re: [phobos] phobos commit, revision 2354
>>
>> That's due to replace()'s inability to deal with fixed-size immutable arrays.
>> I don't want to do surgery on it because I think we need to look for a
>> principled solution for the future.
>>
>> I can't commit d_do_test.d. To make it work, replace envData.sep with
>> to!string(envData.sep) in lines 132 and 139.
>>
>>
>> Andrei
>>
>> On 1/21/11 1:04 PM, Brad Roberts wrote:
>>> On 1/21/2011 12:39 AM, dsource.org wrote:
>>>> phobos commit, revision 2354
>>>>
>>>>
>>>> user: andrei
>>>>
>>>> msg:
>>>> Improvements to replicate(); documented splitter() for strings; renamed
>>>> replace() in place to replaceInPlace(); removed replace() that takes void*
>>>> in the last position; moved replace() from string to array and generalized
>>>> it; attached constraint to functional.not; more cleanup of std.string;
>>>> improved std.algorithm.util and count to accept ranges; improved
>>>> constraint in std.algorithm.remove
>>>>
>>>> http://www.dsource.org/projects/phobos/changeset/2354
>>>>
>>>> paths changed:
>>>> U   trunk/phobos/std/algorithm.d
>>>> U   trunk/phobos/std/array.d
>>>> U   trunk/phobos/std/functional.d
>>>> U   trunk/phobos/std/path.d
>>>> U   trunk/phobos/std/string.d
>>>
>>> Sigh.. since this submit, the dmd test suite has been failing since the
>>> driver
>>> no longer builds.
>>>
>>>              s = replace(s, "/", envData.sep);
>>>
>>> d_do_test.d(132): Error: template std.array.replace(R1,R2,R3) if
>>> (isDynamicArray!(R1)&&  isForwardRange!(R2)&&  isForwardRange!(R3)) does not
>>> match any function template declaration
>>> d_do_test.d(132): Error: template std.array.replace(R1,R2,R3) if
>>> (isDynamicArray!(R1)&&  isForwardRange!(R2)&&  isForwardRange!(R3)) cannot
>>> deduce template function from argument types
>>> !()(string,string,const(immutable(char)[]))
>>>
>>> I tried changing it to: replaceInPlace(s, "/", envData.sep); with no
>>> improvement.
>>>
>>> d_do_test.d(132): Error: template std.array.replaceInPlace(T,Range) if
>>> (isDynamicArray!(Range)&&  is(ElementType!(Range) : T)) does not match any
>>> function template declaration
>>> d_do_test.d(132): Error: template std.array.replaceInPlace(T,Range) if
>>> (isDynamicArray!(Range)&&  is(ElementType!(Range) : T)) cannot deduce
>>> template
>>> function from argument types !()(string,string,const(immutable(char)[]))
>>>
>>>
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>>



More information about the phobos mailing list