Bug 7610 – DMD -H switch doesn't output interfaces to package hierarchy

Status
RESOLVED
Resolution
INVALID
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-29T07:59:00Z
Last change time
2012-07-01T23:13:50Z
Keywords
pull
Assigned to
renezwanenburg
Creator
renezwanenburg

Attachments

IDFilenameSummaryContent-TypeSize
10790001-Improved-documentation-on-the-op-compiler-switch.patchImproves documentation of -op switch in dcompiler.ddtext/plain1806

Comments

Comment #0 by renezwanenburg — 2012-02-29T07:59:18Z
When using DMD to generate interface files for it's input, the generated interfaces are all put directly in the directory specified by -Hd. If the original source files are in a package hierarchy, for example source/package1/module1.d source/package2/module2.d and we output the interfaces to headers/, the output will be headers/module1.di headers/module2.di When adding headers/ to the include path of the compiler and we want to import the modules, we'd first have to recreate the package hierarchy which is less than ideal. It would be better if DMD could output the interfaces to headers/package1/module1.di headers/package2/module2.di
Comment #1 by code — 2012-02-29T10:12:41Z
You can use the -op option. dmd -o- -op -Hdheaders pkg1/mod1.d pkg2/mod2.d
Comment #2 by renezwanenburg — 2012-03-01T05:48:50Z
Created attachment 1079 Improves documentation of -op switch in dcompiler.dd Created patch for the compiler documentation in dcompiler.dd, the documentation now states the -op switch also keeps file paths for interface and Ddoc files. The -Dd, -Hd, and -od switches now mention the -op switch.
Comment #3 by technocrat7 — 2012-05-28T08:46:09Z
I turned the patch from http://d.puremagic.com/issues/show_bug.cgi?id=7610#c2 into a pull request: https://github.com/D-Programming-Language/d-programming-language.org/pull/127. I don't know if the status should be changed, so I didn't adjust it.
Comment #4 by github-bugzilla — 2012-07-01T23:13:50Z
Commits pushed to master at https://github.com/D-Programming-Language/d-programming-language.org https://github.com/D-Programming-Language/d-programming-language.org/commit/84b7788b920d024f9d9f1ee61e75062cf33aee63 fix Issue 7610 - DMD -H switch doesn't output interfaces to package hierarchy changes based on patch from http://d.puremagic.com/issues/show_bug.cgi?id=7610#c2 https://github.com/D-Programming-Language/d-programming-language.org/commit/04166240bec1f05ed50efc8c70ecfa1eb530b34c Revert "fix Issue 7610 - DMD -H switch doesn't output interfaces to package hierarchy " This reverts commit 84b7788b920d024f9d9f1ee61e75062cf33aee63. https://github.com/D-Programming-Language/d-programming-language.org/commit/b4106d0d3f6149d44c0855836c97ed95dd69200f fix Issue 7610 - DMD -H switch doesn't output interfaces to package hierarchy changes based on patch from http://d.puremagic.com/issues/show_bug.cgi?id=7610#c2 https://github.com/D-Programming-Language/d-programming-language.org/commit/be9ca40f7f2aaee2747e581297d0b6710c196251 Merge pull request #127 from OlioEngr/issue-7610 Issue 7610