On Monday, 19 February 2018 at 11:27:11 UTC, Nick Sabalausky (Abscissa) wrote:
On 02/19/2018 05:49 AM, Martin Nowak wrote:
http://dlang.org/changelog/2.079.0.html

...WOW O_o!!!!

This release is seriously, just...wow!

One question though: I'm unclear on the "include imports". Do those basically obviate the original purpose of rdmd? Ie, so dmd doesn't need to be passed a list of every individual file to be compiled? Just do this and be done?:

$ dmd -offoobar -Isource -i=foobar source/foobar/main.d
$ ./foobar

Or do I misunderstand it?

Yes, you didn't misunderstand ;-)
`-i` does the dependency resolution which was one of the main use cases for rdmd, but `rdmd` has "pivoted" over time and has still a few nice features:

- caching
- --eval & --loop
- older compilers don't support -i (and IIRC Ian said that he isn't planning on adding it to gdc)
-- --makedepend (Makefile dependency output)
- shebang
...

BTW in case someone is asking: "why was this required?". Try:

rdmd -c -o- foo.d

---
pragma(msg, "Hello");
---

tl;dr: `rdmd` invokes dmd twice as it needs a first invocation to figure out which files to import. What the changelog entry sadly doesn't mention is that once -i has been integrated with rdmd, it will make rdmd about 30-40% faster (this integration has been moved to 2.080 as there were some concerns with compatibility of rdmd with older compilers)

Reply via email to