std.path review: second update

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Sun Jul 31 03:40:53 PDT 2011


On Sat, 30 Jul 2011 14:09:47 -0700, Jonathan M Davis wrote:

> On Saturday 30 July 2011 15:38:33 Lars T. Kyllingstad wrote:
>> On Sat, 30 Jul 2011 23:27:33 +0800, KennyTM~ wrote:
>> > On Jul 30, 11 17:00, Lars T. Kyllingstad wrote:
>> >> On Sat, 30 Jul 2011 03:47:55 +0800, KennyTM~ wrote:
>> >>> - hasDrive, isDriveRoot: the path
>> >>> 
>> >>>       "#:\x"
>> >>> 
>> >>> should not pass hasDrive. In Windows only /[a-zA-Z]/ are supported
>> >>> drive letters. '#:' may work but is not officially supported.
>> >> 
>> >> True, but then "#:" must be considered a directory name, which is
>> >> not much better.  The module generally assumes that any path you
>> >> pass to it
>> >> is well-formed.  If not, the results are undefined.
>> >> 
>> >> The rationale for this is that you don't know whether a path is
>> >> valid, i.e. well-formed AND correct (pointing to the right place in
>> >> the file system), until you try to use it.  std.path can in
>> >> principle verify well- formedness, but since it cannot verify
>> >> correctness, both may just
>> >> as well be taken care of by the OS.
>> > 
>> > Fair enough.
>> 
>> I've added a note stating this to the module documentation.
>> 
>> >>> - Bug 6390 (= 6337) has been fixed. Some CTFE tests can be enabled.
>> >> 
>> >> I know, but the fix hasn't been released yet.  I'd prefer if people
>> >> didn't have to build the compiler from repo to test the module. 
>> >> I'll be sure to enable the tests when DMD 2.055 has been released.
>> > 
>> > If this module is accepted, it will be released along with 2.055
>> > which carries the fix of 6337 also. Have to delay those tests to
>> > 2.056 doesn't sound reasonable to me. It's OK if those are just
>> > disabled to ease reviewing, but I'd argue that in the final commit,
>> > the tests must be enabled whenever the trunk allows it.
>> 
>> I think the current policy is that Phobos trunk must compile with the
>> latest released compiler.  I'll check up on this, and if I'm wrong, I
>> will of course enable the tests when I commit the code to Phobos.
> 
> That's wrong. The latest druntime and Phobos in github do _not_ have to
> compile with the latest released version of the compiler - just the
> latest version of the compiler on github. The autotester is constantly
> running with the latest of all 3, and it's not altogether uncommon that
> a change is made in druntime and/or Phobos so that they'll still compile
> after a change to the compiler (or even upon occasion that a change is
> made in the compiler to make something in druntime or Phobos possible).
> It would be problematic for dmd's tests if Phobos and druntime were
> forced to work with the released version of the compiler instead of the
> latest in github, and it could cause problems for druntime and Phobos
> when you went to do a release. Such issues are likely to be fewer and
> farther between than they used to be, since the language doesn't have
> huge changes from release to release, but both the compiler and the
> libraries are in enough flux that tying the libraries to the last
> released version of the compiler would be a problem.
> 
> I don't think that it's unreasonable to comment out some tests during
> the review process so that people aren't forced to grab the latest dmd
> from github, but they should be uncommented if/when the code gets merged
> into Phobos.

All right, thanks for clearing that up.

-Lars


More information about the Digitalmars-d mailing list