On Sunday, 9 September 2018 at 04:32:32 UTC, Jonathan Marler
wrote:
- --build-only should imply -od.
Maybe...I actually have use cases where I want "--build-only"
but want the executable to be built in the normal cache
location. Build the program and cache it but don't run it yet.
Adding a different switch to get rdmd's behavior would work too.
FWIW, here's when this was added in rdmd:
https://github.com/dlang/tools/pull/14
Later amended here (so it's not quite -od.):
https://github.com/dlang/tools/commit/155e19c478260c2da6369715f48c201f53c8e45e
- The .d extension is not implied, like for dmd/rdmd
I haven't come up with any reasons to support this. Maybe you
can enlighten me?
"rund prog" is shorter and easier to type than "rund prog.d".
I never invoke rdmd directly, though, so I guess I could add this
to my wrapper scripts around rdmd/rund.
Also, --pass is weird. Why not use the standard-ish -- ?
It is a bit weird. I've never had a reason to use this option
myself. Is this the syntax you are thinking of?
rund other.d main.d -- <program-args>...
The problem with this is it's not "composable". Say you were
running a D program that also used "--", then it's ambiguous
whether the "--" belongs to rund or to the program being
compiled. But maybe I'm missing something? If you have an
idea that's less weird than "--pass=<src>.d" then I'm all for
it :)
Well, the way rdmd works is that it stops looking at arguments
once it sees the first non-option argument (i.e. an argument that
doesn't start with -). As it happens, all relevant dmd arguments
can be passed as one, i.e. "-opt=value" instead of "-opt value",
so it can use this to cleanly separate arguments to itself/dmd
from arguments to the program.
I guess --pass can be useful if you want to include a .d file in
the compilation that's not otherwise compiled (i.e. it's not
imported from anywhere). This is currently not possible with
rdmd, AFAIK.
Was there a problem with the idea of forking rdmd? The above
plus things like its -lib support would then not be needed to
be reimplemented.
I would actually consider this a "fork" of rdmd. But I rebuilt
it from the ground up, re-integrating each feature one by one
so I could ensure they were "cohesive". I also haven't
integrated all features from rdmd yet. I will probably
integrate more of them when I see the need. So far it's just
been me using it so that's why I want to get people using it so
we can flush out the rest.
The big difference with rdmd and rund is that rund is not
compatible with compilers that don't support "-i". Since this
is such a fundamental change, I thought a rename made sense,
and "rund" fits the modern times where we have more D compilers
than just dmd.
I see, thanks!