Now I'm curious. Is it possible to somehow communicate the real source file name to `dmd`, so that it shows up in the error log instead of "__stdin.d"?
the sequence `#line "filename.d" 1` at the top of the thing might do what you need.
https://dlang.org/spec/lex.html#special-token-sequence might also suggest putting a `module` declaration in the file.