Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006287OCamlstandard librarypublic2014-01-06 03:442015-01-26 11:47
Assigned To 
PlatformOSOS Version
Product Version4.01.0 
Target VersionFixed in Version 
Summary0006287: FIlename.{Unix,Win32,Cygwin} should be exported
Descriptionstdlib's Filename provides filename handling functions specific for the current OS, but actually it defines for the 3 main flavors: Unix, Win32 and Cygwin. But they are hidden. They should be exported, probably with a small tweak to have the same signatures (for example, has_drive is only defined in Win32.)

I got some bug reports about my software that it does not run under Win32, and it was due to a typical failure of ignoring the drive name. I wrote a fix but it was lousy to test it since Filename.Win32 is not accessible. So far I copied since its license matches with one of my software. But it is just a workaround.
Tagsjunior_job, patch
Attached Filesdiff file icon filename.diff [^] (9,461 bytes) 2014-06-24 10:39 [Show Content]
diff file icon filename_2.diff [^] (7,260 bytes) 2014-07-16 15:34 [Show Content]
diff file icon filename_3.diff [^] (7,311 bytes) 2014-07-16 15:45 [Show Content]

- Relationships

-  Notes
doligez (administrator)
2014-02-19 17:22

Indeed, when running a program under cygwin that also launches native Windows executables, you need both Filename.Unix.quote and Filename.Win32.quote.
nevor (reporter)
2014-06-24 10:38

I have attached a patch that expose the common set of functions augmented with the concat function.
doligez (administrator)
2014-07-16 14:56

Re: filename.mli

Ouch. If we want to export them with the same signature (and I agree we do), we should define one "module type" for this signature and then declare the three modules with this signature, instead of triplicating the declarations.

So don't apply the patch as-is.
nevor (reporter)
2014-07-16 15:34

Indeed, I thought about this but didn't know how detailed the documentation had to be (w.r.t. differences between implementations). I have attached a new proposition.

- Issue History
Date Modified Username Field Change
2014-01-06 03:44 furuse New Issue
2014-02-19 17:22 doligez Note Added: 0010954
2014-06-19 17:45 gasche Tag Attached: junior_job
2014-06-24 10:38 nevor Note Added: 0011776
2014-06-24 10:39 nevor File Added: filename.diff
2014-07-16 14:56 doligez Note Added: 0011844
2014-07-16 14:56 doligez Tag Attached: patch
2014-07-16 14:56 doligez Status new => confirmed
2014-07-16 15:34 nevor Note Added: 0011846
2014-07-16 15:34 nevor File Added: filename_2.diff
2014-07-16 15:45 nevor File Added: filename_3.diff
2017-02-23 16:43 doligez Category OCaml standard library => standard library

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker