Issue 3541 - Add -oq to dmd (use fully qualified module name as object filename) #563

Merged
merged 2 commits into from Dec 19, 2011

Projects

None yet

4 participants

@jacob-carlborg

Issue 3541 - Add -oq to dmd (use fully qualified module name as object filename).

Trying this again, I've just updated my fork. I have tested this on Mac OS X by running the Phobos unit tests and they all DO PASS. The command line I used to run the unit tests was "make unittest".

http://d.puremagic.com/issues/show_bug.cgi?id=3541

@yebblies yebblies and 1 other commented on an outdated diff Dec 16, 2011
@@ -207,7 +207,7 @@ void verror(Loc loc, const char *format, va_list ap)
#endif
fprintf(stdmsg, "\n");
fflush(stdmsg);
-//halt();
+halt();
@yebblies
yebblies Dec 16, 2011 D Programming Language member

Could you please get rid of this?

@jacob-carlborg
jacob-carlborg Dec 16, 2011

I wonder where that came from but it's restored now.

@yebblies
yebblies Dec 17, 2011 D Programming Language member

Walter adds it in for debugging and it accidentally ended up getting left in the master branch for a couple of weeks.

@WalterBright
Member

It would be nice to also include a pull request for the documentation to add documentation for -oq

@WalterBright WalterBright merged commit cf8c00b into dlang:master Dec 19, 2011
@WalterBright
Member

Sigh. Windows still fails to build the phobos unittests with this patch. I'm going to have to revert it again. I want to emphasize that existing behavior must not change if -oq is not used - we cannot break peoples' existing build processes.


..\dmd -O -nofloat -w -d -property -L/co -unittest unittest.d std\variant.d std
\stream.d std\socket.d std\socketstream.d std\perf.d std\container.d std\conv.d
std\zip.d std\cstream.d std\loader.d std__fileinit.d std\datebase.d std\re
gex.d std\stdarg.d std\stdint.d std\json.d std\parallelism.d std\gregorian.
d std\mathspecial.d std\internal\math\biguintcore.d std\internal\math\biguint
noasm.d std\internal\math\biguintx86.d std\internal\math\gammafunction.d std\in
ternal\math\errorfunction.d std\internal\windows\advapi32.d crc32.d std\c\pro
cess.d std\c\stdarg.d std\c\stddef.d std\c\stdlib.d std\c\string.d std\c\ti
me.d std\c\math.d std\c\windows\com.d std\c\windows\stat.d std\c\windows\win
dows.d std\c\windows\winsock.d std\windows\charset.d std\windows\iunknown.d
std\windows\registry.d std\windows\syserror.d unittest11.obj unittest12.obj uni
ttest2.obj etc\c\zlib\zlib.lib ..\druntime\lib\druntime.lib
std.contracts has been scheduled for deprecation. Please use std.exception inste
ad.
Notice: As of Phobos 2.055, std.date and std.dateparse have been deprecated. The
y will be removed in February 2012. Please use std.datetime instead.
std.perf has been scheduled for deprecation. Please use std.datetime instead.
Notice: As of Phobos 2.055, std.regexp has been deprecated. It will be removed i
n February 2012. Please use std.regex instead.
std.stdarg is deprecated. You should import core.vararg instead.
Notice: As of Phobos 2.055, std.gregorian has been deprecated. It will be remove
d in February 2012. Please use std.datetime instead.

unittest
Error: 'unittest' not found

--- errorlevel 1

@WalterBright
Member

Also, please do not use tabs in source files.

@jacob-carlborg

I guess I have to try and test this on Windows. I apologize for the problems this has caused. I'll fix the tabs and documentation in a, hopefully, upcoming pull request.

@timotheecour timotheecour commented on the diff Feb 10, 2014
src/module.c
@@ -646,6 +662,9 @@ void Module::parse()
*/
if (!Lexer::isValidIdentifier(this->ident->toChars()))
error("has non-identifier characters in filename, use module declaration instead");
+
+ if (global.params.packagePaths)
+ error("has no module declaration; this is not allowed when using option -oq");
@timotheecour
timotheecour Feb 10, 2014

this is unusually restrictive. AndrejMitrovic@6d9f4e9 doesn't have this restriction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment