reggae
reggae copied to clipboard
doesnt compile on windows
Fetching unit-threaded 0.7.28 (getting selected version)... Performing "debug" build using dmd for x86. reggae 0.5.13: building configuration "executable"... payload\reggae\rules\common.d(307,9): Error: static assert "Can only create static libraries on Posix" dmd failed with exit code 1.
This is due to a dmd bug. Basically, currently reggae can't be compiled on Windows. And then if it were I'd have to go fix the many bugs due to assumptions of running on Linux. Fortunately there are tests and they'd fail.
I've got it to build now by commenting the assert. I also edited reggae.d:
private bool isExecutable(in char[] path) @trusted nothrow @nogc //TODO: @safe { version(Posix) { import core.sys.posix.unistd; import std.internal.cstring; return (access(path.tempCString(), X_OK) == 0); } version(Windows) { import core.sys.windows.shellapi; import core.sys.windows.windef; char res[MAX_PATH]; return (cast(ulong)FindExecutableA(path.ptr,null,res.ptr)>32); } }
and call.d: getConfigurations replacing array[1..$] with ".drop(1)" from std.range.
The error now is:
Couldn't execute ./dcompile ... ... '.' is not regcognized as an internal or external command, operable program or batch file.
dub test reggae
Error: Could not execute dub describe -c unittest: Unknown build configuration: unittest
Fixed by #114.