www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13716] New: Phobos std.file fails to build


          Issue ID: 13716
           Summary: Phobos std.file fails to build
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

The error message is:

std\file.d(1503): Error: safe function 'std.file.mkdir' cannot call system
function 'std.windows.syserror.wenforce!(int, const(char)[]).wenforce'

And in std\file.d:
void mkdir(in char[] pathname)  safe
        static auto trustedCreateDirectoryW(in char[] path)  trusted
            return CreateDirectoryW(path.tempCStringW(), null);
        wenforce(trustedCreateDirectoryW(pathname), pathname);
    else version(Posix)
        static auto trustedMkdir(in char[] path, mode_t mode)  trusted
            return core.sys.posix.sys.stat.mkdir(path.tempCString(), mode);
        cenforce(trustedMkdir(pathname, octal!777) == 0, pathname);
And in std\windows\syserror.d:
T wenforce(T, S)(T value, lazy S msg = null,
    string file = __FILE__, size_t line = __LINE__) if (isSomeString!S)
    if (!value)
        throw new WindowsException(GetLastError(), to!string(msg), file, line);
    return value;

Yep, it's a system function. This is the current HEAD. I have no idea how any
of this passes the build tester; it won't build on my machine.

Nov 12 2014