Path bug list

Torsten Anders torstenanders at gmx.de
Sat Mar 10 19:30:32 CET 2007


Hi,

I tried to add a link from the TODO list entry concerning Path (see  
link below) to to the posting I sent on 28.02.2007. It appears I don't  
have the rights to do that. Could perhaps somebody else add such a  
link, so this bug list is not lost when someone else finally looks at  
this issue.

http://gforge.info.ucl.ac.be/pm/task.php? 
func=detailtask&project_task_id=15&group_id=17&group_project_id=26

BTW: Should there perhaps be some general policy what to do in case  
someone submitted a patch and nobody raised any specific concerns for  
about a month (as in this case).

Thank you!

Best,
Torsten

On 28.02.2007, at 08:39, Torsten Anders wrote:
> Dear Hackers,
>
> On 26.02.2007, at 14:08, Boriss Mejias wrote:
>> +Decide about patch for Path.oz
>> - I haven't assigned anybody here. Denys, do you want to take care of  
>> this? In that case, please feel free to change the ending date and  
>> the estimated time.
>
> It seems nobody had time so far to look into my patch for the Path  
> std-lib, which I posted here on Mon Feb 12. In order to demonstrate  
> the urgency that something is done about Path, following is a (rather  
> long!) list of bugs in Path (see below). All these bugs are fixed in  
> my patch. In addition, I refactored the Path functor, added  
> definitions for consistency, and also added comments plus test cases  
> in order to simplify the job for the next guy doing fixes.
>
> Thank  you!
>
> Best,
> Torsten
>
> --
> Torsten Anders
> Sonic Arts Research Centre • Queen's University Belfast
> Frankstr. 49 • D-50996 Köln
> Tel: +49-221-3980750
> http://strasheela.sourceforge.net
> http://www.torsten-anders.de
>
> ------------------------------------------------
>
>
> %% orig Path
> declare [Path]={Module.link ['x-oz://system/os/Path.ozf']}
>
>
> %% [1: init] On MacOS, this call results in an error: every path  
> object must end with a slash, even a plain file like  
> '/home/test/tmp.txt/'
> %% NB: This problem pops up with every definition in the functional  
> Path API, because all rely on Path.make.
> {Path.make '/home/test/tmp.txt'}
>
> %******************** Error: conditional failed *****************
> %**
> %** Missing else clause
> %**
>
> /*
> %% some kludge to avoid the problem, but this is not the expected way  
> to do things
> {New Path.'class' init('/home/test/tmp.txt' exact:true)}
> */
>
>
> %% All the following tests were run on Linux:
>
> %% [2: init]
> {{Path.make '/'} toString($)}
> %% -> nil
> {{Path.make '/'} toAtom($)}
> %% -> ''
>
> %% [3]
> {{Path.make '/'} isAbsolute($)}
> %% -> false
>
> %% NB: several other Path methods fail on "/" as well.
>
> %% [4: basename] .. neither correct path, nor does it cut of the  
> dirname
> {{{Path.make '/home/test.txt'} basename($)}  toString($)}
> %% -> "/homehome/test.txt"
>
> %% [5: dirname] ... neither correct path, nor does it cut of the  
> basename
> {{{Path.make '/home/test/tmp.txt'} dirname($)}  toString($)}
> %% -> "/homehome/testhomehomte/test/tmp.txt"
>
> %% [6: basenameString] .. outputs string in list
> {{Path.make '/home/test/tmp.txt'} basenameString($)}
> %% ["tmp.txt"]
>
>
> %% [7: resolve] .. garbles the first path and ignores the second  
> instead of appending it
> {{{Path.make '/home/test/'} resolve('testDir/myFile.txt' $)}  
> toString($)}
> %% "/homehome/test/"
>
>
> %% [8: isRoot] .. isRoot can not distinguish between empty path and  
> root
> {{Path.make nil} isRoot($)}
> %% -> true
>
> %% [9: extension] .. extension never returns the extension, always  
> unit for a non-existing extension. BTW:
> {{Path.make '/home/test/tmp.txt'} extension($)}
> %% -> unit
>
> %% [10: dropExtension] .. dropExtension drops more than the extension
> {{{Path.make '/home/test/tmp.txt'} dropExtension($)} toString($)}
> %% -> "/homehome/test"
>
> %% [11: addExtension] .. addExtension drops stuff instead
> {{{Path.make '/home/test/tmp'} addExtension('txt' $)} toString($)}
> %% -> "/homehome/test"
>
>
> %% [12: readdir] .. garbles pathes
> {Map {{Path.getcwd} readdir($)} fun {$ P} {P toString($)} end}
>
> _______________________________________________________________________ 
> __________
> mozart-hackers mailing list                            
> mozart-hackers at mozart-oz.org
> http://www.mozart-oz.org/mailman/listinfo/mozart-hackers
>
>
--
Torsten Anders
Sonic Arts Research Centre • Queen's University Belfast
Frankstr. 49 • D-50996 Köln
Tel: +49-221-3980750
http://strasheela.sourceforge.net
http://www.torsten-anders.de



More information about the mozart-hackers mailing list