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

Merged
merged 2 commits into from Dec 19, 2011

Conversation

Projects
None yet
4 participants
@jacob-carlborg
Contributor

jacob-carlborg commented Dec 16, 2011

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

Revert "revert pull 169"
This reverts commit 9d664ad.
@yebblies

View changes

src/mars.c
@@ -207,7 +207,7 @@ void verror(Loc loc, const char *format, va_list ap)
#endif
fprintf(stdmsg, "\n");
fflush(stdmsg);
-//halt();
+halt();

This comment has been minimized.

@yebblies

yebblies Dec 16, 2011

Member

Could you please get rid of this?

@yebblies

yebblies Dec 16, 2011

Member

Could you please get rid of this?

This comment has been minimized.

@jacob-carlborg

jacob-carlborg Dec 16, 2011

Contributor

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

@jacob-carlborg

jacob-carlborg Dec 16, 2011

Contributor

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

This comment has been minimized.

@yebblies

yebblies Dec 17, 2011

Member

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

@yebblies

yebblies Dec 17, 2011

Member

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

@WalterBright

This comment has been minimized.

Show comment
Hide comment
@WalterBright

WalterBright Dec 19, 2011

Member

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

Member

WalterBright commented Dec 19, 2011

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

WalterBright added a commit that referenced this pull request Dec 19, 2011

Merge pull request #563 from jacob-carlborg/issue3541
Issue 3541 - Add -oq to dmd (use fully qualified module name as object filename)

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

@WalterBright

This comment has been minimized.

Show comment
Hide comment
@WalterBright

WalterBright Dec 19, 2011

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

Member

WalterBright commented Dec 19, 2011

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

This comment has been minimized.

Show comment
Hide comment
@WalterBright

WalterBright Dec 19, 2011

Member

Also, please do not use tabs in source files.

Member

WalterBright commented Dec 19, 2011

Also, please do not use tabs in source files.

@jacob-carlborg

This comment has been minimized.

Show comment
Hide comment
@jacob-carlborg

jacob-carlborg Dec 19, 2011

Contributor

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.

Contributor

jacob-carlborg commented Dec 19, 2011

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.

@@ -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");

This comment has been minimized.

@timotheecour

timotheecour Feb 10, 2014

Contributor

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

@timotheecour

timotheecour Feb 10, 2014

Contributor

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

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