Bug 18076 – dmd -run should work with `-` (stdin) too

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-12-14T01:22:13Z
Last change time
2017-12-18T22:58:23Z
Keywords
pull
Assigned to
No Owner
Creator
hsteoh

Comments

Comment #0 by hsteoh — 2017-12-14T01:22:13Z
Currently, `dmd -` causes dmd to read source code from stdin and compile it. However, there is currently no way to also specify `-run` to run the resulting executable, because `-run` requires a filename argument, but when stdin is used, `-` isn't a valid filename for -run. This enhancement request is to propose to modify `-run` so that it works with `-` too.
Comment #1 by hsteoh — 2017-12-14T01:54:01Z
https://github.com/dlang/dmd/pull/7435 Turns out, the code change to implement this is trivial.
Comment #2 by github-bugzilla — 2017-12-15T02:01:21Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/91701a41304a4c1eda79ec89420babf0c513bc1d Fix issue 18076: make -run work with - (stdin) Turns out, a trivial change is all that's needed. https://github.com/dlang/dmd/commit/0b8d1fc0d5f6d09478d282202ad50a0c964b75b0 Merge pull request #7435 from quickfur/issue18076 Fix issue18076: allow -run to work with - (stdin)
Comment #3 by github-bugzilla — 2017-12-18T22:58:23Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/91701a41304a4c1eda79ec89420babf0c513bc1d Fix issue 18076: make -run work with - (stdin) https://github.com/dlang/dmd/commit/0b8d1fc0d5f6d09478d282202ad50a0c964b75b0 Merge pull request #7435 from quickfur/issue18076