Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #337 (new enhancement)

Opened 1 year ago

Last modified 1 year ago

Parsing of module dependancy text file.

Reported by: Derek Parnell Assigned to: lindquist
Priority: minor Milestone:
Component: frontend (both) Version: hg tip
Keywords: build dependancy Cc:

Description

The -deps= switch is helpful, but can we also have a "-nogen" switch so that a compile is done but no object files are created. Kind of like the "-c" switch which does a compile but no linking.

Then we can use "-deps=dep.txt -nogen" to get the dependency data so build tools can then work out what needs to actually be compiled. And in that vein, a hash (eg CRC32, MD5, SHA256) of the file's used by DMD would be nice to see in the 'deps' file. Would help build tools detect which files have been modified.

May I make a small syntax suggestion for the deps format. Instead of enclosing a path in parentheses, and using ':' as a field delimiter, have the first (and last) character of each line be the field delimiter to use in that line. The delimiter would be guaranteed to never be part of any of the fields' characters. That way, we don't need escape characters and parsing the text is greatly simplified.

Also, simplifying the paths by resolving the ".." and "." would be nice.

eg.

!std.stdio!c:\dmd\dmd\src\phobos\std\stdio.d!public!std.format!c:\dmd\dmd\src\phobos\std\format.d!E521D0FA!

Change History

07/06/09 10:52:11 changed by ChristianK

Sounds like a good idea. I recommend you talk to Tomasz (http://h3.team0xf.com/) since xfBuild is - as far as I know - the only program depending on the current format. I'd be glad to merge a patch you agree on. Are you interested in using this info for bud?

Copyright © 2008, LDC Development Team.